Commit Graph

871 Commits

Author SHA1 Message Date
bbe97f2d1b Merge branch 'master' of ssh://vamos.informatik.uni-erlangen.de:29418/fail 2013-09-10 11:54:29 +02:00
0c0f19fbcb L4Sys: also trace memory accesses
Change-Id: I20d8fea1f0f6cfee42804296515e50fdabf12f81
2013-09-10 11:54:05 +02:00
96f2f56d5e Merge branch 'register-mapping-fixes' 2013-09-10 11:46:58 +02:00
11513ef78d util: handle missing register mapping gracefully
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
2013-09-09 16:14:35 +02:00
9cd40842d2 introduce convert-trace tool
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
2013-09-08 22:16:08 +02:00
e4a5a7a592 util: gzstream needs zlib
This change is needed to build on Ubuntu 13.04.

Change-Id: I683ed4427044264f58bc8f7c94cb5fbbff89cd95
2013-09-08 22:15:14 +02:00
f33789b1ac Merge branch 'find-mysql' 2013-09-04 13:09:48 +02:00
6d4dfeb913 shutdown cleanups revisited
This change became necessary as we observed weird fail-client SIGSEGV
crashes with both Bochs and Gem5 backends and different experiments.

Some Fail* components are instantiated statically: the
SimulatorController instance "simulator", containing the
ListenerManager and the CoroutineManager, and the active
ExperimentFlow subclass(es)
(experiments/instantiate-experiment*.ah.in).  The experiment(s) is
registered as an active flow in the CoroutineManager at startup.

As plugins (which are ExperimentFlows themselves) are often created on
an experiment's stack, ExperimentFlows deregister themselves on
destruction (e.g., when leaving the plugin variable's scope).  The
core problem is, that the creation and destruction order of statically
instantiated objects depends on the link order; if the experiment is
destroyed after the CoroutineManager, its automatic self-deregistering
feature talks to the smoking ruins of the latter.

This change removes all static instantiations of ExperimentFlow and
replaces them with constructions on the heap.  Additionally it makes
sure that the CoroutineManager recognizes that a shutdown is in
progress, and refrains from touching potentially already destroyed
data structures when a (mistakenly globally instantiated)
ExperimentFlow deregisters in this case.

Change-Id: I8a7d42fb141222cd2cce6040ab1a01f9de61be24
2013-09-04 10:13:48 +02:00
203ec6c5cc remove #ifndef __puma from code using LLVM
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
2013-09-04 10:13:48 +02:00
97c0b6b4ae Merge branch 'gem5-register-fix' 2013-09-02 15:10:52 +02:00
89aff7df65 util: Bochs/Fail register mapping fix
CL and DL are 8 bits wide, not 255.

Change-Id: Ic454215344d08ba2f8374db251792f82d106305b
2013-09-02 12:07:27 +02:00
3cf89631a7 Merge "cmake: allow build outside project root" 2013-09-02 11:55:34 +02:00
2108c8932f util: disassembler register/address mapping fix
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
2013-09-02 09:50:55 +02:00
1ca9cb4a52 L4Sys: adapt to DatabaseCampaign
Change-Id: Ia4912e7a74afccb51f6d704830a2d9c5b5c0159a
2013-08-30 16:06:15 +02:00
045c08faf6 l4sys script: remove dbg option
Change-Id: Ica13735ba04b7ae79fde6fb1462ca8200694b278
2013-08-30 16:05:21 +02:00
0e595b38a3 gem5: adapt to Register iface change
This change adapts the gem5 backend to the Register class interface change
in commit 52723a8.  The necessary modifications suggested adding the "misc"
registers from gem5, too.

Change-Id: I32561c3fc905b9cd396e32ce80c791c01d5682fb
2013-08-29 19:35:33 +02:00
1ad99c9630 cmake: find MySQL client lib
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
2013-08-29 19:21:31 +02:00
2a06b97480 Adjust instruction tracing
write a trace file that can be input to the *-trace FAIL tools

Change-Id: Iaa13fab5bcba86f3d940831d9ea583a458998191
2013-08-28 10:16:13 +02:00
6ddc7d911b the do-them-all campaign
Change-Id: I9c1617c4a057db63e2f2c6470b55d9629bd01ca2
2013-08-28 10:15:39 +02:00
674af5fd00 Separate boundaries for output tracing and injection
* L4SYS_FUNC_{ENTRY,EXIT} now determines the range upon
  which an experiment is run. These instructions produce the
  output that is relevant for the experiment.

* L4SYS_FILTER_{ENTRY,EXIT} determine a subset of the
  above instructions. FI experiments are performed on this
  subset (between first occurrence of FILTER_ENTRY and first
  occurrence of FILTER_EXIT inclusively).

Change-Id: I37d2189d8256b6b707a0a33984f2b2656071d983
2013-08-27 20:34:57 +02:00
4115de91aa sal: compilation fix
4e3c9e3 broke builds on some machines.

Change-Id: Iced4f5e6dad773f270208638071a5d0899653acf
2013-08-27 16:43:05 +02:00
4e3c9e3758 sal: CPU now knows extended trace registers
The extended trace register list is needed in multiple locations; the CPU
class is the logical module to contain this information.

Increased number of x86 registers to be traced; we can remove those
that prove unusable for fault-space pruning later on.

Change-Id: Ic46ecdbc55167a6d92872c190317fc0d1a3ad92d
2013-08-27 13:38:40 +02:00
52723a874e sal: allow register sets to overlap
This allows a register to be a member of multiple UniformRegisterSets.
Needed to architecture-specifically store, e.g., a list of registers to
record in traces.

Change-Id: Ia5d20768540efe252a84df967d43e569f107da3a
2013-08-27 13:38:40 +02:00
ff1ceeddac util: silence const warnings with optionparser
We don't use the warned-about part of optionparser's interface
anyways.

Change-Id: I42c4714e4dce4112ea5b6cfb5159ed8b62d4c418
2013-08-27 13:38:40 +02:00
79ff417e9b doc+cmake: LLVM 3.3 is preferred
Change-Id: Ie480efbe5ffd2f0a59da7f185bba80a5355251f9
2013-08-27 13:38:40 +02:00
10420938d2 Rework instruction filtering
Add a new instruction filter that allows filtering a list of
ranges read from a file. This allows us to specify multiple
ranges, e.g., to leave out instructions or to focus on multiple
functions

Change-Id: Iba13cda00d0a73edaef270b3cd9100afe3e4668b
2013-08-27 11:26:27 +02:00
1fefef06b0 warning fix
InstructionFilter needs virtual destructor (Effective C++, Item 14)

Change-Id: I52422c3e8ec1c40c93cb83a0591910837efb00b5
2013-08-27 10:06:33 +02:00
da7f9caf64 L4-sys refactoring
move preparation steps into separate functions

Change-Id: I4930ec38f003302596f215a08cd8bf455f525571
2013-08-27 10:02:38 +02:00
64840c02e4 import-trace: compile with both LLVM 3.1+3.3
Commit 52322ac broke compilation with LLVM 3.1.

Change-Id: Ia0e1d91258e6be799cfbd3b6e9693894a6bc5650
2013-08-23 11:26:40 +02:00
9ac7c8b83c cmake: allow build outside project root
Change the aspect weaver project path to all source paths (src, simulators,
debuggers, tools) and the <build>/src path.
Without this change "external" builds do work but do not weave in any
experiments. This change also allows multiple build directories within the
project root, as the weaver will no longer use aspects from all builds.
When further source directories are added to the project root, these
definitions will need to be updated.

Change-Id: If3d3d9fe61427fcba8b815171c8acdcdeb06cb69
2013-08-23 10:02:56 +02:00
470d455e34 db: handle multi-row INSERTs
Several database implementations, including, e.g., MySQL and PostgreSQL,
allow multiple rows to be INSERTed at once.  At least for MySQL this
improves INSERT speed significantly.

Change-Id: Ic223f7915053f30b0cb00c567310f3e780c9fa59
2013-08-22 15:11:30 +02:00
cbbd0ec764 db: added insert_id()
Database::insert_id() retrieves the auto-generated ID from the last INSERT
or UPDATE on a table containing an AUTO_INCREMENT column.

Change-Id: I6ec94d1820bb7e77bd37df33145caa93016fd328
2013-08-22 15:11:30 +02:00
5a5ef61fa5 Merge "gem5/cmake: gem5 build integration into Fail*" 2013-08-21 15:18:40 +02:00
a3cbb7c690 gem5/cmake: gem5 build integration into Fail*
The SConscript in src/core/sal/gem5 is now generated via CMake
(SConscript.in).  No more hardcoded relative paths -> Fail* build
folder can now be anywhere.  Experiment and Plugin libraries are now
set automagically (using ${EXPERIMENTS_ACTIVATED} /
${PLUGINS_ACTIVATED})

Generated SConscript now resides in binary dir.

Change-Id: I1bf2e17c83c95ffdcf6801c02481064fcb63bfb0
2013-08-21 15:17:14 +02:00
25ea559e59 Merge changes I7f48460e,I1f7fbdaf
* changes:
  gem5 startup script: revisited fs.py to get rid of ARM linux images
  doc/how-to-build: dependency libmysqlclient-dev
2013-08-21 13:35:43 +02:00
5e238cc3f9 gem5 startup script: revisited fs.py to get rid of ARM linux images
In former versions, the aforementioned image was 'required' to run
gem5 although it wasn't actually used at all. With the new python
script fail_fs.py, it suffices to start gem5 on a target foo.elf by
simply typing $ ../scripts/run-gem5.sh path/to/target/foo.elf

Change-Id: I7f48460e50d48d55fe22f2381e2ae8aec8510233
2013-08-21 12:05:16 +02:00
e006c4da0a Merge "sal/arm: compiler warning fixed (see -Wdelete-non-virtual-dtor)" 2013-08-21 11:49:29 +02:00
c0121b1a9b doc/how-to-build: dependency libmysqlclient-dev
libmysqlclient-dev (or libmariadbclient-dev) is needed to build Fail*.
A running MySQL/MariaDB server to talk to is needed for the
fault-space pruning tools and the DatabaseCampaign, too, but that's a
runtime dependency.

Change-Id: I1f7fbdaf20b49370039e8d27a07a8785e0f052b5
2013-08-21 11:16:47 +02:00
ed772429f9 L4Sys: fix use of L4SYS_NUMINSTR
* L4SYS_NUMINSTR counts the instructions that were selected for
  injection and is used by the campaign server to generate experiments
* L4SYS_TOTINSTR counts the total number of instructions executed.
  It is used by the experiment to determine the timeout value.

Change-Id: Ibf37aea2a1f5ad5afad2b1232ce22fe070b08490
2013-08-09 14:59:45 +02:00
2c35ac6235 RangeFilter: make boundaries inclusive
Change-Id: Iecf7de565053bcd99a19a02722adcef458f5550b
2013-08-09 14:57:20 +02:00
5364cfefaa typo...
Change-Id: Ic23a74c429b5b441a85d9e3933f2f9829bc679f9
2013-08-08 17:01:05 +02:00
f8e31445ce L4Sys: add a script to automate experiment setup
Change-Id: I1f5770bbbc75a6498182e8b357756c48cc81dfa2
2013-08-08 16:57:11 +02:00
36afe76d33 Add protected white space
Change-Id: I49d393fc53ca22822c7f0d7f044d4383f7207e90
2013-08-08 13:48:34 +02:00
b8d41f73fc Adjust L4Sys Manual
- some more details on the requires experiment steps
- wording and layout fixes

Change-Id: I62b7b1cd5e2d5e746a8e8184349e465afcd2e7ff
2013-08-08 13:45:46 +02:00
8724ff7cb4 Extend L4-Sys manual
* mention how to obtain an L4Re setup
* describe finding the address space identifier in more detail

Change-Id: If56bfa255d498106920f39a7380b97306a8731c8
2013-08-07 16:04:17 +02:00
1c55923e55 sal/arm: compiler warning fixed (see -Wdelete-non-virtual-dtor)
This commit introduces a virtual dtor in the ArmCPUState class to
prevent the compiler from producing the following warning:
 "deleting object of polymorphic class type 'fail::Gem5ArmCPU' which
  has non-virtual destructor might cause undefined behaviour"

Change-Id: I5029662064e72ae87a9f0e36aeaa309e4cb2291b
2013-07-31 18:07:55 +02:00
618fdb8e77 gem5 buildsys: compiler flag fixed due to newer gcc version
(Debian 7.1 comes with gcc 4.7.2) However, we are faking a gcc v4.4.5
but the gem5 build system only adds the '-Wno-unused-but-set-variable'
flag in case of a gcc >= v4.6. Now, this flag will always be appended.
(Older gcc versions should ignore the flag or emit a warning but will
continue to run.)

Change-Id: I7021e08019951375c7e8b56d0f875191f904971d
2013-07-31 17:08:14 +02:00
aab117e5a8 Merge branch 'master' of ssh://vamos.informatik.uni-erlangen.de:29418/fail 2013-07-22 14:05:19 +02:00
eccbc61b1d ecos kernel test: memory access listeners' ranges (high/low) may be equal
Change-Id: I02f53d9d698a56c606ef354a37d7a3c467ec8127
2013-07-22 14:03:20 +02:00
32e041543c import-trace: remove --importer-args parameter
The parameter has no effect and has been superseded by
Importer::cb_commandline_init().

Change-Id: I8c2f26c878a1ff409a6b5e3ee35d93dea775b583
2013-07-16 12:20:51 +02:00