Commit Graph

99 Commits

Author SHA1 Message Date
2f70e05db6 util: rename SumTree::get -> remove, add r/o get
SumTree::get now non-intrusively picks an element and returns a
reference to it, SumTree::remove removes and returns a copy.  The
former is needed for sampling with replacement.

Change-Id: Iefef2fdf0b7df6ea7a9949f2588528ec9e86bb7a
2015-01-21 00:17:48 +01:00
f23860c139 prune-trace: use uint64_t for pilot counts
This enables using very large data sets in the FESamplingPruner.

Change-Id: Ibf097ed8cec24c85a74e83a78d79aa07893cfa8c
2015-01-21 00:17:48 +01:00
ed18399ff6 prune-trace: remove invalid assertion
This assertion in the FESamplingPruner is invalid if the import took
place without "write" ECs.

Change-Id: I7d1bbcf1572573e2ac97e9be1191fbf9fe61f755
2015-01-21 00:17:48 +01:00
57e4541190 prune-trace: do not sort ECs for sampling
Sorting is too costly for large data sets, and not worth the
sampling-process speedup.

Change-Id: I622ff3ed9b352fc5c7586f9733d830be727b6a11
2015-01-21 00:17:48 +01:00
b2b53380f4 prune-trace: add switch to disable sample weighting
In the sampling step, the --no-weighting switch disables the
equivalence-class weighting by using a weight of one instead of the
equivalence-class size.  This is usually not a good idea, and should
only be used for demonstration purposes, or if the fault model
requires weight-less sampling.

Change-Id: Id903d1924c6ecbcd217815aa5ce9271560130071
2015-01-21 00:14:45 +01:00
a1e3b31cd5 prune-trace: sample from known results
The --use-known-results switch simulates sampling (with fault
expansion, FESamplingPruner) by reusing results from a previous
campaign covering the full fault space (that used the "basic" pruner).
The pruner only creates entries in the "fspgroup" table that refer to
already existing pilots and corresponding results.

This switch is not for normal Fail* use, but only for experimenting
with the FESamplingPruner.

Change-Id: I1bf561d93f55918d243c5306551a1c6b48027198
2015-01-21 00:09:37 +01:00
89817cf13f prune-trace: list available pruners
By using the AliasedRegistry, "prune-trace --help" (and
"prune-trace -p '?'") now lists all available Pruners to the user.

Change-Id: Ib5e3d00aabc37e6d48d804d2d709812af3f7efb2
2014-08-28 13:58:46 +02:00
f98871dd5a prune-trace: preserve existing data
With this change, prune-trace checks for existing fsppilot/fspgroup
entries for each variant to be pruned, and skips the variant in this
case.  This safety measure can be switched off with --overwrite.

Change-Id: I7e758a9853a25685ca176cf1a1810523753cdd4a
2014-08-28 11:57:40 +02:00
0e1ed1feab prune-trace+DBCampaign: default to variant/benchmark %
If no --variant / --benchmark is specified, it's more reasonable to
prune or run *all* variants/benchmarks (using the wildcard "%")
instead of defaulting to "none"/"none".  The trivial case with only
one single variant/benchmark (which may still be "none"/"none" if
import-trace's default is used) is still covered by this new default
behavior.

Change-Id: I0e9001137d5e052183dd74211e2edbcfab749528
2014-07-03 15:42:25 +02:00
0da8ba0dec prune-trace: added "sampling with fault expansion"
The FESamplingPruner implements the fault-expansion variance reduction
technique (FE-VRT) as described in: Smith, D. Todd and Johnson, Barry W. and
Andrianos, Nikos and Profeta, III, Joseph A., "A variance-reduction technique
via fault-expansion for fault-coverage estimation" (1997), 366--374.

Change-Id: I04a0c9bb2622974278bd8c73793e51451119e650
2014-07-03 15:42:25 +02:00
9a81ab4222 Database: more flexible get_variants()
This change moves prune-trace's --variants-exclude / --benchmarks-exclude
capabilities to Database::get_variants() to make it available to all users.

Change-Id: Icbc6bb1a3ae7c846d2de40b881f47a9cc1ed7bbf
2014-07-03 15:42:25 +02:00
5efebea5d1 prune-trace: limit row deletion to the pruner's FSP method
Otherwise it's not possible to keep a "basic" and a "sampling" pruned
version of one variant in the same database.

Change-Id: Ic71eb27ea16df23e2289cbf9f96ae10209745791
2014-07-03 15:42:25 +02:00
0cf5a34a9f prune-trace: pruners may add own command-line switches
Change-Id: I23293e7e6cf8ab1c3456337ba5e4af9b5e106ccb
2014-07-03 15:42:25 +02:00
ad0a15855d import-trace: log output number formatting fixed
Change-Id: Ifb81df86cb16254c04c946fa2cefca7030d2dd7a
2014-06-26 13:52:39 +02:00
7394a2cd53 import-trace: let RegisterImporter ignore unknown IP
This change makes the RegisterImporter continue importing if it
encounters an instruction pointer that is not part of the disassembled
ELF binary (and, thus, cannot be disassembled).  This is OK if we
don't want to inject into registers used by these instructions.

Change-Id: Ia9b5e7f789367f8386d63f235451dae5d399610d
2014-06-26 13:52:18 +02:00
c827750090 Merge branch 'failpanda'
Conflicts:
	src/core/comm/DatabaseCampaignMessage.proto.in
	src/core/cpn/CMakeLists.txt
	src/core/cpn/DatabaseCampaign.cc
	src/core/sal/ConcreteCPU.hpp
	src/core/sal/SALConfig.hpp
	src/core/util/CMakeLists.txt

Change-Id: Id86b93d0e3ea4d9963fcc88605eec0603575ec83
2014-06-03 12:24:49 +02:00
7ab5a491ed dump-hops: needs CONFIG_INJECTIONPOINT_HOPS
Change-Id: Id884e968c903372d4f81748fbc496fea0fb7bc9e
2014-06-03 11:47:21 +02:00
277958b31b cleanups
Change-Id: I8022d937477668253c613e97c3a579ae65084b1e
2014-06-03 11:47:20 +02:00
6b1f1eba9d compiler warning fixes
The fix for tools/convert-trace/Gem5Converter.cc repairs a real issue
which caused a runtime warning to never be displayed.

Change-Id: I5d94acdbffc99d5f2a78f047062c011c6f8ab4e3
2014-04-27 19:03:23 +02:00
73843fa634 import-trace: help sports all available importers
This change extends import-trace's help functionality for importers,
adds the ?-operator to option "-i" and refactors main.cc a little.
The extensions are "doing something useful with the AliasedRegistry"
and are merely listings of all importers' prime aliases.

Change-Id: I7bb184fc45dd9f90664e37455edfccc704d99ef1
2014-04-25 08:34:01 +02:00
af92a751d9 import-trace: alias-based (importer) registry
This change implements a generic registry in order to clean up import-trace's
code - it's possible (and reasonable) to use the registry for pruners as well.
Importer now extends AliasedRegisterable; all importers have been adapted
to suit the interface/abstract methods.
Each AliasedRegisterable should have at least one alias (the class' name
is a sensible choice) but can have several. The first specified alias is
the class' prime alias which can be used e.g. to list all registered objects.

Change-Id: If6daa34edce35a3b0194e4ba67ed3b44b74a49b0
2014-04-25 08:34:01 +02:00
11f77f0228 tools/import-trace: FullTraceImporter added
The FullTraceImporter imports every ip-event into the database.

Change-Id: I1c0ce2a0aae72dcd925930861780f2719d37b985
2014-04-05 16:57:13 +02:00
84a03b55ff import-trace: limit to general-purpose registers
This change limits fault injection to general-purpose registers, instead of
relying on the LLVM/Fail* bridge to only recognize the status register
(EFLAGS on x86) and general-purpose registers.  Since this bridge just
learned to translate x86's control and segment registers, and these
registers need special handling for fault injection (def/use pruning does
not work here), only import register accesses from the RT_GP subset.

Status register and instruction pointer injection remain functional, and
import-trace now should work architecture independently.

Change-Id: Id8ad2f0a9dab1861bf16ea9443c3bdfe7213d3fa
2014-03-26 17:18:18 +01:00
f775c92d72 dump-trace: keep track of read/written bytes
This change adds access-size tracking to dump-trace and output thereof in mode "-s".

Change-Id: I5647d7b16c89499b7813faaf8c3844f275bc552a
2014-03-05 11:55:11 +01:00
36ae6fd6c3 prune-trace: use none/none only without any parameters
Before this change, running prune-trace with, e.g.
"prune-trace -d fsp_mibench -v bitmap% --benchmark-exclude clockcnv"
resulted in an implied "--benchmark none", rendering --benchmark-exclude
ineffective and resulting in nothing being pruned.  Now, the "none" default
only applies when neither --benchmark nor --benchmark-exclude (analogously
for --variant / --variant-exclude) is provided.

Change-Id: Ic7c88919d7cfde1261749a745dc6a679472ff348
2014-02-25 13:32:55 +01:00
1df43e9726 import-trace: major speedup
Using Database::insert_multiple() instead of prepared statements
speeds up trace import by a factor of 3-4.  While being there, we now
properly deal with nonexistent extended trace values (i.e., put NULLs
into the DB).

Side note: The ElfImporter should switch to insert_multiple(), too.

Change-Id: I96785e9775e3ef4f242fd50720d5c34adb4e88a1
2014-02-25 13:32:55 +01:00
69ba9e0f94 dump-trace: properly deal with empty extended trace entries
As dereferencing register contents is not always possible, extended trace
entries may be empty.

Change-Id: I603fcef2eb2b0429a9d6ed0469441bc314e365fd
2014-02-19 19:08:46 +01:00
e4bf980b97 Fail* result browser for pruning experiments.
Based on the database layout given by the pruner.
Run ./run.py -c <path to mysql.cnf>
(Default config ~/.my.cnf)

- Checks if objdump table exists
- Added view for results per instruction
- Added config file support for table details
- Overview data loaded at server startup
- Result type mapping configurable via config file

Based on Flask and MySQLdb

Change-Id: Ib49eac8f5c1e0ab23921aedb5bc53c34d0cde14d
2014-02-17 10:17:25 +01:00
b4f144745a Revert "import-trace: emit warning for malformed traces"
Memory accesses that don't belong to the preceding IP event in the
trace *do* have a use case:  a hardware interrupt causes the CPU to
push its state onto the (kernel) stack.  At the moment we cannot
distinguish this case from a malformed trace (as we don't record the
occurrence of interrupts), hence this warning needs to be disabled for
now.

This reverts commit 84edd02b6f.
2014-02-11 14:57:29 +01:00
26308dc9ea Merge "Removes serial.out from bochs config for massive performance boost on cluster runs." 2014-01-31 13:52:45 +01:00
4ba028e740 Removes serial.out from bochs config for massive performance boost on
cluster runs.

If this output file is enabled, all running processes try to write to the
same file on the shared filesystem. They block each other which leads to
massive I/O wait time and CPU idle time.

This change reduces the runtime e.g. from several hours (12+) to few minutes
(20).

Change-Id: I028628af31c845fc517e5daca5b4f981eade3cf4
2014-01-31 12:51:58 +01:00
13175c259b import-trace: import debug info
If the --debug option is set, the line number table of the elf binary will
be imported into the database. The information will be stored in the
"dbg_mapping" table.

If the --sources option is set, the source files will be imported
into the database. Only the files that were actually used in the
elf binary will be imported.

Change-Id: I0e9de6b456bc42b329c1700c25e5839d9552cdbb
2014-01-28 11:07:34 +01:00
5df364dea2 compute-hops: re-enabled memory usage lookup
Change-Id: I51c7dcac5e6077364da63f4189fea9a90c43e059
2014-01-23 18:53:21 +01:00
0e7ee03937 compute-hops: bugfix rollback-threshold
Rollback threshold was not set by command line argument.

Change-Id: I68ba63cc5cd31e3af8408f83caec8b3d7bb10c78
2014-01-23 18:53:21 +01:00
8b5098abdd tools: added compute-hops and dump-hops tools
As these tools work closely together with fail components, its
easiest, to build them in this context. As these tools don't
really matter for fail use, they might never be pushed to the
master branch.

Change-Id: I8c8bd80376d0475f08a531a995d829e85032371b
2014-01-23 18:53:11 +01:00
a307dc6df7 import-trace: fix for using non-gzipped traces
As non-gzipped trace-files cause the tool to always import zero events, the
input file is now openend as in the dump-trace tool, where opening non-gzipped
files obviously works fine.

Change-Id: If2575dbeb93ed657c7b8ddd9f14f41b5cc7bf7c6
2014-01-22 17:54:09 +01:00
4cb97a7fa5 formatting, typos, comments, details
Change-Id: Iae5f1acb653a694622e9ac2bad93efcfca588f3a
2014-01-22 13:08:13 +01:00
e37f2db4be Merge "prune-trace: use the first write pilot instead of any" 2014-01-22 09:58:44 +01:00
4ccddeb137 prune-trace: use the first write pilot instead of any
In some cases the write-pilot is located at the upper boundary of the
experiment and thus is in a race situation with the experiment's end.
If the experiment's end occurs first, the campaign ends and complains
about missing data, otherwise everything is fine.
This patch circumvents this via using "the first" writing pilot; iff the
only write is located at the experiment's end, the race will still occur,
but cleverly written experiment code can, according to hsc, circumvent it.

Change-Id: I6a27a8c4770c04ea8dcaef8aa7bd85d18f43f0b5
2014-01-22 09:06:27 +01:00
84edd02b6f import-trace: emit warning for malformed traces
The Fail* tools expect trace events to be ordered in a specific way:
memory-access events are supposed to come *after* the instruction
event for the instruction that caused them.  Using a different order
may cause subtle problems with both fault-space pruning and fast
forwarding.  This change introduces a warning message when such a
malformed trace is detected (i.e., when the instruction pointer of a
memory-access event does not match the preceding instruction event).

Change-Id: I8ae7420fd8ff26e2574590748bdcc5a63db76490
2014-01-20 21:34:06 +01:00
8b6d744a3e import-trace: fix for using non-gzipped traces
As non-gzipped trace files cause import-trace to always import zero
events, the input file is now openend as in the dump-trace tool, where
opening non-gzipped files obviously works fine.

In the medium term we should find a centralized solution for this,
instead of re-implementing it all over the place.

Change-Id: I75845c03c0bbdc2b6b578b83d492b7dbbb40f051
2013-12-04 12:00:21 +01:00
c000b50101 Merge branch 'tracing-off-by-one' 2013-10-28 18:37:07 +01:00
148b09be2e tools/import-trace: added ElfImporter
The ElfImporter is not a real trace importer, but we locate it
into the import-trace utility, since here the infrastructure is
already in place to import things related to an elf binary into
the database.

The ElfImporter calls objdump and dissassembles an elf binary
and imports the results into the database.

Change-Id: I6e35673c8dbee3b7e8dfc7549d10e5dca9b55935
2013-10-24 15:30:17 +02:00
22b9646b80 import-trace: dynamic instruction off-by-one
Richard noticed that instr2 values are off by one when done with the
MemoryImporter vs. with his own importer.  The core problem is that
the dynamic instruction counter in the Importer base class
(Importer::copy_to_database, instruction_count_t instr) gets increased
*after* reporting an IP event to the importer implementation; this has
the side-effect that memory access events have a +1 dynamic
instruction count offset with regard to the IP event of the
instruction they belong to.

Bottom line: IP events and all memory events belonging to that
instruction should have the same dynamic instruction number.
Christian argued for the numbers starting with 0, which, as a side
effect, relativizes the repercussions of the change introduced in the
previous commit, as the new "first" event gets the sequence number 0
now.

 -  All experiments and importers only dealing with memory accesses
    (MemoryImporter) are affected by this change:  The dynamic
    instruction count now starts with 0 instead of 1.  Together with
    the previous commit, the only change is one additional dynamic
    instruction at position 0.  Note that existing trace files do not
    have this additional instruction, which shifts all trace positions
    by 1.

 -  All importers that process *only* IP events (InstructionImporter,
    RandomJumpImporter, RegisterImporter) won't see any difference.
    Commit 036e340, though, introduced a +1 offset.

 -  Experiments that use these instruction counts for navigating to
    the target instruction must be checked to properly deal with the
    dynamic instruction #0 (no forwarding necessary).  All dynamic
    instruction offsetting should now work uniformly for both memory
    accesses and all other fault models.  To be sure everything works
    in order, sanity-check the current absolute instruction pointer
    right before fault injection.

Change-Id: I3f509f1b47836fa78fd029a7bb7c36c878912d97
2013-10-17 18:28:40 +02:00
e636924d0f import-trace: reparse parameters after importer instantiation
Without this change, import-trace won't recognize, e.g., the -e and -t
parameters if they come after a parameter that was added by the Importer:

import-trace -i objdump --objdump arm-none-eabi-objdump -e B.elf -t C.tc
[...]
[import-trace 14:37:32] couldn't open trace.pb

Change-Id: I9532b01e432055479c79d801b1ca2736a8fd21cc
2013-10-14 14:43:47 +02:00
f2e76bfd70 bochs-runner: pass on additional arguments to fail-client
Change-Id: Icae29d819e4cbebc26e441a6daf74f9abafdb3ad
2013-09-19 14:56:49 +02:00
3307828690 import-trace: fixes for build on amd64
"std::vector<T>::size_type" is compatible to "unsigned int" on ia32,
but not on amd64.

Change-Id: I7d0f96780f7c17757dcfd015a1b3f9d5a3947f1a
2013-09-18 17:13:08 +02:00
aec5798f32 remove accidental checkin
Change-Id: I3cc42e153070b78bcea7df08ef2eddd1c838776c
2013-09-12 20:31:26 +02:00
014684ae1c L4Sys: check Bochs AS ID for mem accesses, too
Change-Id: Ifa2b38dc0e762ff4f956dc0b98c78b43f0d139cb
2013-09-12 20:29:08 +02:00
00f920f487 merge conflict resolved
... I somehow missed that one, sorry.

Change-Id: I2daf6f9215f34e39090145ff70e70eaf84d0f286
2013-09-12 09:52:34 +02:00