Commit Graph

90 Commits

Author SHA1 Message Date
b5c261d762 visualfail: comments, whitespace fixes
Change-Id: I8821b43d7402e19c59810692ed7877bca4cec6f5
2015-01-08 15:06:58 +01:00
7c51ca0a63 visualfail: fix color coding
Change-Id: If76d8e9f7a22523868ea6977db5c0f58a0576224
2015-01-06 17:11:29 +01:00
2d2e477ddc visualfail: fix output formatting
This change fixes occasional redundant newlines in interspersed
ASM/highlevel code.

Change-Id: Ibe3a93d67bc017ce44c832c4948f3817d8f7e695
2015-01-06 17:11:29 +01:00
9df01a4a48 visualfail: off-by-one in getHighlevelCode()
This one omitted mappings to the first static instruction belonging to a
high-level source-code line.

Change-Id: I14427021e61f27a8b029fb56fad2ba813652422a
2015-01-06 17:11:29 +01:00
1faa885cb4 visualfail: speedup of two MySQL queries
Change-Id: Ibc4339cfe31a7d9f2a632a7e08278f8aca554a73
2015-01-06 17:11:29 +01:00
63670e7bce visualfail: off-by-one in resultsDB()
This one was responsible for a lot of notices in the terminal.

Change-Id: I097705af15d771d0dcb5a217445fec3db89fd132
2015-01-06 16:38:47 +01:00
42773e2be5 visualfail: speedup by using the ".=" operator
Using "$x .= $y" instead of "$x = $x . $y" is actually an extreme
speedup for long $x.  I had no idea PHP's "compiler" was that bad and
doesn't optimize this.

Change-Id: I39aec5f14f45b75a2467d8074b5ea2ffe5d4b856
2015-01-06 16:37:21 +01:00
fc8ad04db2 visualfail: increase default runtime limit to 10m
Change-Id: I9bdebb2ad0e4fd6cf0d5e72e2e0520ad3cf6b258
2015-01-06 16:37:15 +01:00
4575da411a visualfail: quote string array indexes
Change-Id: I943c931f256986b4c14e00ee278976d369c71765
2015-01-06 16:37:07 +01:00
9a34d7a78a visualfail: comment out checks for unneeded tables
The dbg_methods, dbg_variables and dbg_stacktrace tables are not
needed by the current VisualFAIL implementation.

Change-Id: I5f685c7d8100fe57fb2a23e1f8161770e64c9464
2015-01-06 16:37:01 +01:00
0ed1a4e306 visualfail: don't close MySQL connection too early
Luckily this didn't work as advertised, as the global connection
variable wasn't imported into the functions' scopes.

Change-Id: I080a32c6418deb3da3578987ec8a181b047608ad
2015-01-06 16:36:56 +01:00
1d81e2b519 visualfail: adminer should not be in the Fail* tree
Change-Id: Ib7f07306e297f8891666b54916e8076c0c9261ee
2015-01-06 16:36:50 +01:00
5bef0d4182 visualfail: whitespace cleanups
Change-Id: Ia773bf516ce1bab4adcd80e31678bda278cd8c11
2015-01-06 16:36:46 +01:00
ca99aee02b visualfail: removed trailing whitespace
Change-Id: I47725e1e4ca858109ffb0c3f7c599b67a48c0761
2015-01-06 16:36:38 +01:00
1d66db3625 visualfail: UNIX line endings
Change-Id: I5d26ec25d070e98b977ff3130c597a388a4c2c96
2015-01-06 16:36:20 +01:00
ea4c350bcc VisualFAIL beta ;)
Change-Id: Ia40fe09cdf520926d00b9c39c983c925099501bc
2014-04-07 12:22:33 +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
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
ec969603d5 Merge commit 'dcd2c021a5ac91d38187d397914e5f51e2fc8819'
Conflicts:
	tools/import-trace/RegisterImporter.cc

Change-Id: I4f49c976bd60badba73c15746aa03c420cb9f77b
2013-09-11 14:38:55 +02:00
04e96b977c tools/import-trace: add --do-not-split option to RegisterImporter
The RegisterImporter splits each register into 1 byte chunks. The
--do-not-split flag prohibits this splitting. Be aware, that def/use
pruning won't work correctly in mixed-width cases (EAX/AX/AH/AL).

Change-Id: Ifa1930bdd9f317a6fd3ae50c4ff3cffc97504640
2013-09-11 10:30:01 +02:00
d26fc28fa4 cpn/database: include data_width in the fsppilot during prune step
During the prune step the data_width of the injected location was not
propagated before. It is now stored in fsppilot (database layout change!) and
sent in the fsppilot protobuf message.

Change-Id: I0562f6fc8957adea0f8a9fb63469ca5e3f4b7b2d
2013-09-11 10:27:04 +02:00
f106702d44 prune-trace: remove pilot_id from fspgroup PK
There's one fspgroup entry for every trace entry, the pilot_id is
therefore *not* part of the (unique) primary key.  If this had been
right in the first place, it would have revealed an equivalence-based
fault-space pruning bug early ... :-/

Change-Id: I449d4985645c6631c0a8db0c64510364677b1354
2013-09-10 17:43:32 +02:00
d961ac0a72 import-trace: add --no-write-ecs switch
If you only need raw failure counts, no-effect write equivalence classes
are redundant and only slow down access to the trace and fspgroup tables.
This switch prevents any accesstype='W' entries from finding their way into
the trace table.

Change-Id: Ifb415994063a2107769bc80ebd2fd780de5a4dda
2013-09-10 17:43:12 +02:00
d39a9278ff import-trace: split into public and protected iface
Change-Id: I4b7d15f9181b1485d0546a77bd8d4f400b2fa880
2013-09-10 17:37:26 +02:00
64b3af299e import-trace: sliding-window AdvancedMemoryImporter
Initially this was implemented by directly passing through trace
events to the MemoryImporter, keeping a record of conditional jumps
and opcodes, and UPDATEing all inserted rows in a second pass when the
MemoryImporter is finished.

Unfortunately, UPDATE is very slow, and keeping all information in
memory till the end doesn't scale indefinitely.  Therefore the
implementation now delays passing memory access events upwards to the
MemoryImporter only until enough branch history is aggregated, and
taps into Importer's database operations with a set of new virtual
functions that are called downwards.

Change-Id: I159b2533932087087fb3049f4ff07a5f17a25a00
2013-09-10 17:37:26 +02:00
ba7c663551 import-trace: introduce AdvancedMemoryImporter
A MemoryImporter that additionally imports Relyzer-style conditional
branch history, instruction opcodes, and a virtual
duration=time2-time1+1 column (MariaDB 5.2+ only) for fault-space
pruning purposes.

Change-Id: I6764a26fa8aae21655be44134b88fdee85e67ff6
2013-09-10 17:37:26 +02:00
12b539ff75 misc cleanups
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
2013-09-10 17:37:25 +02:00