Commit Graph

192 Commits

Author SHA1 Message Date
68229afa84 import-trace: fix same-address symbol import
This bugfix makes sure that from a set of symbols with the same
address, only the first one gets imported.

After an assessment whether analysis scripts can deal with multiple
symbols at the same address, an import of all symbols should be made
possible in the future.  This will also require to relax the
primary-key constraint of the `symbols' table.

Change-Id: I61c4ddb1af1556d44eab54e53eaa3d0fc20de7c1
2018-07-30 16:00:48 +02:00
2c7640fe90 import-trace: record stats on failed register mappings
The import-trace tool now systematically collects statistics on which
LLVM -> FAIL* register ID mappings failed during import, and presents
those after the import finished.

Change-Id: Ied67853d754483277868fe21bf2c6efeaeb60f09
2018-07-30 14:36:33 +02:00
45c7906d41 import-trace: cleanup
Change-Id: I9f658c1bb9881fd1ef70f1744b6a2e2c36ad7142
2018-07-27 08:55:16 +02:00
5d5927a88a DatabaseExperiment: add register FI
Calling the DatabaseCampaign with --inject-registers or
--force-inject-registers now injects into CPU registers.  This is achieved
by reinterpreting data addresses in the DB as addresses within the register
file.  (The mapping between registers and data addresses is implemented in
core/util/llvmdisassembler/LLVMtoFailTranslator.hpp.)  The difference
between --inject-registers and --force-inject-registers is what the
experiment does when a data address is not interpretable as a register: the
former option then injects into memory (DatabaseCampaignMessage,
RegisterInjectionMode AUTO), the latter skips the injection altogether
(FORCE).

Currently only compiles together with the Bochs backend; the
DatabaseExperiment's redecodeCurrentInstruction() function must be
moved into the Bochs EEA to remedy this.

Change-Id: I23f152ac0adf4cb6fbe82377ac871e654263fe57
2018-07-24 09:45:00 +02:00
8adc859223 import-trace: fail gracefully if --elf is missing but needed
Change-Id: Ib154326507e307b65099f1b84c44e796b1aef98a
2018-07-24 09:24:47 +02:00
c11547a952 visualfail: migrate to PHP 7
The "mysql" extension is gone, using "mysqli" now.  Plus tiny
syntax/operator precendence changes.

Change-Id: Icad4329521a2a42d7cd73408588d210431ec04c6
2018-07-24 09:21:04 +02:00
385830969c faultspaceplot: add sanity check
faultspaceplot.sh now fails gracefully if the requested
variant/benchmark combination does not exist in the database.

Change-Id: Ied3b5a0e72cc5ae8e6ce352b65486f15bb13576b
2018-07-24 09:20:37 +02:00
e64fd740fe data-aggregator: EAFC+coverage from sampling
This change adds global fault-coverage and occurrence count
measurement scripts that work with sampling results.

Change-Id: I14d94a2c549cff3256fc7b0800cfd4a702e6ad35
2018-07-24 09:19:50 +02:00
0baca64468 data-aggregator: document "onwrite" fault model requirements
The *-onwrite.sh analysis scripts only work if import-trace was not
run with --no-write-ecs, i.e. they only work if writing memory
accesses were imported into the "trace" table.

Change-Id: Icb2ea4e72d2200c886d4f9074f2da0f9bfd6ac85
2018-07-24 09:16:33 +02:00
3abdc51043 data-aggregator: more script renamings
The terms "occurrences" and "coverage" contradict each other.

Change-Id: I2c3b3a2fa046f9ab77ea4bec9a13eafa2ebfba58
2018-07-24 09:16:33 +02:00
a88b014578 data-aggregator: rename resulttype-* to global-*
This is more in line with the other scripts' names.

Change-Id: I8f645a3b93bce60fe167eeb93bb8c8e285f4038a
2018-07-24 09:16:33 +02:00
f5b34a962c data-aggregator: fix alphabetic resulttype sorting
Depending on SQL-statement nesting, some scripts already correctly sorted
resulttypes alphabetically, but some sorted along the numeric ENUM value
behind the resulttype name.  This change explicitly converts the resulttype
to a string before sorting.

Change-Id: Ia18aa4e75b94a6a9f7bb125953bc85b86b3cbd6e
2018-07-24 09:16:33 +02:00
27b697200b data-aggregator: specifically limit to fspmethod 'basic'
In their current implementation, the data-aggregator scripts do not work
correctly on sampling results.

Change-Id: I1035970b352f513d725bd1a40ac9262368ffbcc0
2018-07-24 09:16:33 +02:00
ff3a5fb498 move to LLVM 3.9
This change removes support for earlier LLVM versions; making them
work as well is simply too tedious.

Change-Id: I372a151279ceb2bfd6de101c9e0c15f0a4b18c03
2018-07-24 09:15:33 +02:00
191219ad06 data-aggregator: variant-durations.sh w/o filter
Change-Id: I7a3164635fc2fbd65d99fc8bba66e956d505a515
2018-05-09 15:25:45 +02:00
42d6ff4a97 data-aggregator: "on write" fault model metrics
Change-Id: I784618fd4b3a0074153ce074957b57e363c54657
2018-05-09 15:25:45 +02:00
bbe60745e1 data-aggregator: script overhaul + modularization
Change-Id: I4353db1475f00956d19d91c8c558c34506ec836b
2018-05-09 15:25:45 +02:00
3ad42e270c fixes for Debian 9
- search for libdwarf.h in new locations (e.g., /usr/include/libdwarf/)
- build Bochs with -std=gnu++98 (gnu++14 is default since GCC 6.1)
- specify "proto2" syntax for protobuf messages
- minor build-system and C++ namespace fixes

Change-Id: I16dbc622c797ef8e936fe3c0fb9b03029d27529d
2017-08-01 14:12:03 +02:00
da3a78ec4d faultspaceplot: fix ymin calculation
The initialization value for ymin, which tracks the lower bound of
plotted rectangles (and is finally used for the preselected zoom
area), was chosen too small for Linux-kernel data structure addresses.

Change-Id: I7cd8dc690843394107e8aae7fffa90f27ca18153
2016-12-03 17:49:07 +01:00
6509d50ec1 compute-hops: detail fixes and optional procps dep
Cleanups, warning fix, optional procps dep, --help correction.

Change-Id: Iba719493e4a8ec37acb7336a39172b3cdefbdc99
2016-07-26 17:41:32 +02:00
d3d2faf680 globally rename Fail* to FAIL*
Change-Id: Ief2cb687cc69dd92c2e04f9314f0f1347e0a84ed
2016-07-26 17:41:32 +02:00
69da134956 Merge branch 'wsos' 2016-03-15 23:16:42 +01:00
7168566ef5 faultspaceplot: -k -- keep CSVs only optionally
Change-Id: I5900c53b81d15d5262420afbf636444af31b00f1
2016-03-11 20:44:31 +01:00
ee8759f6b8 faultspaceplot: don't round down ymin
Before this change, ymin was rounded down to the nearest Y value
divisible by 1000, showing an empty, white area in the lower part of
the plot.  With this change, the initial Y-axis zoom level is
maximized to exactly show all non-white areas.

Change-Id: I1aea52a3afc331e7f11fe76ff2c5de3c71c61c71
2016-03-11 20:41:52 +01:00
e8ca3ba6ea faultspaceplot: don't plot OK_MARKER
In the current configuration, OK_MARKER would be plotted in white
color and be indistinguishable from the background.  Not plotting
these areas at all reduces output-file size.  As a side effect, the
initial Y-axis zoom level (ymin, ymax) can change.

Change-Id: Ic7b1a22a5a6f58e4df0849bca5262c646051ae2c
2016-03-11 20:36:07 +01:00
915a344223 faultspaceplot: better distinguishable colors
Change-Id: I49517fd104394e598937ab1c8970c739e41993b7
2016-03-11 20:36:07 +01:00
ea0a5f90e2 faultspaceplot: add ticks for symbols if available
+ use helper scripts from the same dir, not from $PATH

Change-Id: I7aba773c8dbff5f8643a39fa1ed8d26867f3a86d
2016-03-11 20:36:07 +01:00
3dd7c9cb48 faultspaceplot: plot burst faults correctly
+ remove "old matplotlib" warning

Change-Id: I47dec1cc6bf6dd86216cd6d373174d4c70556f63
2016-03-11 20:36:07 +01:00
2bed7c124a data-aggregator: per-function + durations
Change-Id: I1dc7791fe9af7f848f56093e0554c61973b7a1f3
2016-03-11 20:36:07 +01:00
dd7ad77731 data-aggregator: add -t for table output
By default, the data-aggregator scripts create machine-readable,
tab-separated output.  The optional "-t" switch (passed to the
internally used `mysql' command-line client) creates human-readable
table output instead.

Change-Id: Ie448c21a4e82dea83f3e43e6642e67eb85f8b8e9
2016-03-11 19:07:40 +01:00
584ef57aab data-aggregator: allow resulttype aggregation for all benchmarks
This change additionally allows to create a resulttype/occurrences summary
over all benchmarks in the database, instead of specifying a single one.

Change-Id: I4fc7fd735300168f1e4f9e24a51aba469a7269a8
2016-03-11 19:07:40 +01:00
5851f5d848 data-aggregator: add aggregate per translation unit
Change-Id: Ibd141eccb2549dfad64e8daf35a16e3461a07f9f
2016-03-11 19:07:40 +01:00
927d6a5103 import-trace: import symbol size if available
Instead of using the address difference between two neighboring symbols as
an indication for the symbol's size, import the size as reported by
`nm -S'.

Additionally, this change fixes an off-by-one, which had the effect that
the last symbol in the list was not imported at all.

Change-Id: I3c8e139b788018702526bb968e36d248dc3fe8fc
2016-03-11 19:07:39 +01:00
f171fe9286 data-aggregator
This change introduces a loose collection of scripts for
analysis/aggregation of FAIL*'s collected data.
It's going to be developed into a proper tool in the future.

Change-Id: I63f14d87dd86b62817ec3d8089079d70f58c89c9
2016-03-11 19:01:17 +01:00
806c71580f import-trace: add import of ELF symbols
This change adds the capability to import an ELF's symbols
into the database. The functionality is implemented via a
shell script and will be merged into "import-trace", when
it's being cleaned up sometime in the near future, but for
now this suffices.

Change-Id: I933783659674fcf31f5181fc13661fe10f5b9fe8
2016-03-11 19:01:17 +01:00
52baab2d76 faultspaceplot as analysis tool
This change adds the faultspace-plotting scripts into FAIL*'s
tools/analysis/ folder and makes it CMake-configurable.

Change-Id: I9364a448a33853520629291721a6ed6d4e82eb32
2016-03-10 15:14:59 +01:00
2c176715ed import-trace: code comments + --help clarifications
Change-Id: I796969f2dc8c7e440c9f9bd5434cbe09834057db
2016-01-29 18:06:41 +01:00
05f557ec80 bochs-experiment-runner: make IPS configurable
The instructions per second config option influences the point in time
of IRQ events and the simulator time values.

Change-Id: Ied08ea577408d21839d100734f3cce552ee547f2
2015-09-18 12:51:56 +02:00
b6db95ffaa import-trace: objdump importer cut off long lines
Sometimes the lines in an objdump can get very long. Therefore, we limit
the size of the field, which is put into the database, to the maximal
size of the opcode, instruction, and comment column.

Change-Id: I8d7db33e8319f71e9dae14f683bba0ce1654b1f8
2015-09-18 12:51:55 +02:00
48423054b0 prune-trace: check 2nd cmd.parse() return value
As the first cmd.parse() call was already checked before, parsing a
second time should never fail.  Nevertheless, we can look at the
return value without much effort.  Found by Coverity Scan, CID 25494.

Change-Id: Id012cf7183fe7b2022d33e6cbcb19ba49b544c99
2015-02-07 18:20:39 +01:00
b01a5e80fd import-trace: initialize all members
This was never a real problem, but keeps us on the safe side.  Found
by Coverity Scan, CID 25731/25808/25817.

Change-Id: Ie4bd9fb52ff6140ce7ae024738b43c82f6f5045c
2015-02-07 17:29:53 +01:00
41a191eeaa import-trace: fix SQL value list termination
This fixes the (never intendedly occurring) case that no comma is
found in the SQL value list, and aligns the termination code with the
comment next to it.  Found by Coverity Scan, CID 25653.

Change-Id: I98062748458a50603cd63a9017acd94eef0753f9
2015-02-07 17:29:52 +01:00
8e5cd0d632 import-trace: check 2nd cmd.parse() return value
As the first cmd.parse() call was already checked before, parsing a
second time should never fail.  Nevertheless, we can look at the
return value without much effort.  Found by Coverity Scan, CID 25509.

Change-Id: I58466f5d123da2b541a6a88b72bafa1f754a581e
2015-02-07 17:29:50 +01:00
6995dffca8 prune-trace: --no-weighting for SamplingPruner
Analogous to the FESamplingPruner, 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.

The --no-weighting switch was introduced with an earlier commit, but
did not have an effect until now.

Change-Id: If2ebf775bea7f2e3f8c293abbae08f1eb00cacf1
2015-02-02 13:50:59 +01:00
4cbcf30b7c prune-trace: incremental mode for SamplingPruner
The --incremental switch allows to add more samples if the resulting
confidence intervals are not satisfactory yet.

Change-Id: I65dc99522f45f8a4eaf4ce68e832f7636585381d
2015-01-21 00:22:36 +01:00
79211fd31d prune-trace: add SamplingPruner
The SamplingPruner implements "normal" sampling with equivalence-class
reuse.  Unlike the FESamplingPruner, the SamplingPruner implements
uniform fault-space sampling that counts multiple hits of an
equivalence class.

This change modifies the database schema, more specifically it adds
the "weight" column to the fspgroup table.  Update existing databases
with this query:

  ALTER TABLE fspgroup ADD COLUMN weight INT UNSIGNED;

Change-Id: I668fc9b25fc4d79a60aa1ef8d69cdf5fa076cc6d
2015-01-21 00:22:36 +01:00
99a923b11e Merge remote-tracking branch 'origin/master' into sampling-wip
Change-Id: Iae5c02be5801d75e8adc55222ccb35c559f7ebf4
2015-01-21 00:22:28 +01:00
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