This change touches several subsystems, tools and experiments
(sal, util, cmake, import-trace, generic-tracing, nanojpeg), and
changes details not worth separate commits.
Change-Id: Icd1d664d1be5cfc2212dbf77801c271183214d08
This tool can now import extended trace information with the
--extended-trace command-line parameter. The existing importers cease
using artificial access_info_t objects in favor of passing through the
original Trace_Event wherever possible. This allows us to import
extended trace information for all importers.
Change-Id: I3613e9d05d5e69ad49e96f4dc5ba0b1c4ef95a11
It's OK if we cannot map every register LLVM knows to a Fail register
ID, but we need to explicitly skip these cases in the
RegisterImporter.
Change-Id: I2152f819fb94aa4de5720c5798b229b66988d382
The input (taken on stdin) is a gem5.opt --debug-flags=MemoryAccess
trace (--format gem5), or a dump-trace output (--format dump) for easy
trace synthesis (for testing purposes).
gem5 format: Currently imports physical, not virtual memory addresses.
dump format: Currently ignores extended trace information.
Change-Id: Ic26a996d6fb9ce4175c855fadcbcff9ac9263888
Contemporary AspectC++ versions can deal with the LLVM headers very
well, and #ifdef __puma stuff in Fail* headers results in
unmaintainable #ifdef __puma blocks in other parts of Fail* (e.g., the
trace importer).
Make sure you're using a 64-bit ac++ when living in a 64-bit userland
(the 32-bit version doesn't know about __int128), and be aware that
AspectC++ r325 introduced a regression that has not been fixed yet.
Change-Id: I5bb759b08995a74b020d44a2b40e9d7a6e18111c
For def/use pruning, the linear address mapping of the x86
sub-registers (e.g., AX represents the lower 16 bits of EAX) must
overlap. If it doesn't, e.g., AX and EAX are considered separate
registers by def/use pruning, resulting in a failure to correlate an
EAX def with a subsequent AX use.
The only user of this mapping up to now, RegisterImporter, forced all
register widths to 8 bits, thereby fortunately canceling out this
problem. Nevertheless it makes no sense to continue encoding a
constant width in these virtual addresses.
Existing trace, fspgroup, fsppilot and result tables may be converted
to the new encoding by using this query:
UPDATE <tablename> SET data_address = ((data_address >> 4) & ~0xf) | data_address & 0xf;
Change-Id: I7a942b78c34f6140803a86af639eeedef3550f34
This change introduces a CMake-style FindMySQL.cmake properly looking for
libmysqlclient_r with mysql_config. This also fixes linking on some
machines.
Change-Id: Ifdbfdc3c7440dead37a8b63aaa86732d636aa0e2
This was necessary because LLVM 3.1's
ELFObjectFile<ELFT>::sectionContainsSymbolsectionContainsSymbol() (needed
for proper functioning of our LLVM disassembler, unless you're using
-ffunction-sections) is "unimplemented".
Change-Id: I81112627ebd1c92b718ac6f4ed58d7f188aedf0c
The random jump importer defines trace events, that indicate all
possible jumps into a specific instruction range. The region where
jumps should start can be defined by a memory map given with
--jump-from. For each instruction declared in that memory range, all
possible jumps to a memory region specified by with --jump-to are
inserted. The target of the jump is saved in the data_address
field. So all database tools work as expected.
for each event E \in region(--jump-from):
foreach Instruction in region(--jump-to):
insert_trace(injection_instr = E.IP(), data_address = Instruction.addr)
Change-Id: Ie163968acae47fc6c946fc77774c47ee07950bab
The RegisterImporter disassembles the binary and adds a trace event
for each byte read or written from register. The register number (Fail
Register Numbers are used) and the offset within the register are
encoded within the trace event.
Change-Id: I2d2fd720841fedeeff5f28b64f24ec5f6d2ea0c3
The InstructionImporter does disassemble the binary and generate read
traces for every instruction byte executed.
Change-Id: I6b8697c711c009e106ed733c74c6ff8f9bbf8ac5
data_address is definitely part of the unique key to trace entries, but
instr2 is arbitrary (could be instr1, time1 or time2 as well). Moving
data_address up the hierarchy to speed up certain FSP experiments.
Change-Id: I37a1f6c1e5b3957ba2f5bf46e0cd1a9c4aa7bfef
BasicImporter is renamed to MemoryImporter. An alias for BasicImporter
in the cmdline interface will remain. The MemoryImporter does now only
handle memory and IP events. The simulation time, dynamic instruction
count and handling of open ECs is moved to Importer.
Change-Id: I04eb0fd4b52fbf5b0ca9ab97778a62130cb626ee
This importer is so similar to the basic importer, that it can be
dropped. The current state was used in the SOBRES 2013 Paper.
Change-Id: Ibed1af6e1a72286500d42e83e594557d6dcf3803
The new parameter -s/--stats shows trace statistics such as number of
instructions, number of memory reads/writes, and duration in simulator
time.
Change-Id: I39a48ff62d9c308c420fe52e7ed17ed57ae9c139
We need to cover the complete fault space when a memory map is
provided. This means fake trace entries for completely unaccessed
addresses (e.g., unused parts of the stack), and makes sure we include
all of our fault space in the statistics later.
Without a memory map, we just don't know the extents of our fault
space; just guessing by using the minimum and maximum addresses is not
a good idea, we might have large holes in the fault space.
Change-Id: Ieb4b30a2e41a9921b969bf88513bfbacfc290c93
Is now very similar to normal importer, and may be deleted in the future, but
at the moment, this should be merged, since it is the importer used in the
sobres-2013 paper.
This changes the MySQL Schema. instr1_absolute was introduced.
Change-Id: I1bc2919bd14c335beca6d586b7cc0f80767ad7d5
- Variants/benchmarks can now be selected with wildcards
(--variant/--benchmark), and can be excluded from pruning
(--variant-exclude/--benchmark-exclude).
- The database clearing step can be skipped with --no-delete to
avoid deadlocks with concurrent DB accesses.
- Internals:
* injection_instr / injection_instr_absolute moves from
fspgroup to fsppilot. fsppilot now contains all information we
need for running FI experiments.
TODO: generic campaign needs to be modified, too.
* Force MySQL to use an efficient join order (STRAIGHT_JOIN).
Change-Id: I6241ea2de9da1a1e709fae6374df4fc06ef262a0
- Import timing information from traces that were recorded with timing.
- Allow restricting import to a memory map ("vertical" restriction).
- Proper fault-space right-margin handling.
- Cleanups, data-type usage, etc.
Change-Id: I7a49e8e9e49894c458e884bfc234f36b9ba8b130
TODO: Showing timing or extended trace information should be configurable
with a commandline switch later.
Change-Id: I72ac95ddd1d54dfef87f212ec5afa30b2ed9a6ad
This adds an interface for a backend-specific notion of time, e.g. CPU
cycles since simulator start, and a concrete implementation for the
Bochs backend. This is needed to record CPU idle times (e.g., HLT
instruction), and for target backends capable of more timing-accurate
execution.
This change also modifies the tracing plugin to add the time to all
trace events.
Change-Id: I93ac1d54c07f32b0b8f84f333417741d8e9c8288
The dciao-kernelstructs experiment does a trace imported by the
DCiAOKernelImporter:
bin/import-trace -t trace.pb -i DCiAOKernelImporter --elf-file app.elf
Pruned by the basic method:
bin/prune-trace
and does CiAO fault injection experiments, where the results are
stored in the database.
Change-Id: I485dc2e5097b3ebaf354241f474ee3d317213707
The wrapper builds a temporary bochsrc and sets an FAIL_STATEDIR
environment variable to a temporary directory. FAIL_ELF_PATH is also
set in regard to the command line interface.
Change-Id: I647c6eb3a91ae22847958ca30ede6e09519fba04
The DatabaseCampaign interacts with the MySQL tables that are created
by the import-trace and prune-trace tools. It does offer all
unfinished experiment pilots from the database to the
fail-clients. Those clients send back a (by the experiment) defined
protobuf message as a result. The custom protobuf message does have to
need the form:
import "DatabaseCampaignMessage.proto";
message ExperimentMsg {
required DatabaseCampaignMessage fsppilot = 1;
repeated group Result = 2 {
// custom fields
required int32 bitoffset = 1;
optional int32 result = 2;
}
}
The DatabaseCampaignMessage is the pilot identifier from the
database. For each of the repeated result entries a row in a table is
allocated. The structure of this table is constructed (by protobuf
reflection) from the description of the message. Each field in the
Result group becomes a column in the result table. For the given
example it would be:
CREATE TABLE result_ExperimentMessage(
pilot_id INT,
bitoffset INT NOT NULL,
result INT,
PRIMARY_KEY(pilot_id)
)
Change-Id: I28fb5488e739d4098b823b42426c5760331027f8
This tool creates the fault-space pruning pilot and group
entries. Those are used by the generic campaign to do fault
experiments.
Currently prune-trace only implements conventional def/use pruning
(--prune-method "basic").
Change-Id: I1dfb431e3b1d3cd2ee891a49a3b6ac01210be11f
The import tool does support the following import strategies:
- BasicImporter: generates def-use equivalence classes for read and
write memory accesses
- DCiAOKernelImporter: generates equivalence classes for read access in
the ciao kernel space.
Change-Id: I8960561d3e14dcf5dffa3ff7a59b61a5e8f7e719
The full-tracing plugin was used in the DSN paper. It additionally
traces the data that was accessed/written on a memory access and the
contents of some CPU registers.
Change-Id: I61f5230699009ce523aba341985b98148160556d