Commit Graph

1416 Commits

Author SHA1 Message Date
d581fd27a2 GenericTracing: typo
Change-Id: I02b39a7ad0db49899dd602c1da472b76472da979
2018-07-30 14:20:48 +02:00
d370ded9b9 generic-experiment: generalize serial-output monitoring
The generic-experiment now learned to record and compare output on an
arbitrary serial port.  Using Bochs' port 0xe9 hack (parameter
--e9-file) is kept for compatibility reasons.

Change-Id: I5b1aa02d244e8b474919e1bdf043e523ea0e4f45
2018-07-27 21:12:41 +02:00
226545de58 util: LLVM test code output simplified
llvmDisTest now explicitly catches LLVMtoFailTranslator::notfound.

Change-Id: I45306212d45e00cfabb867159a13ce6d247e8e0f
2018-07-27 08:55:16 +02:00
45c7906d41 import-trace: cleanup
Change-Id: I9f658c1bb9881fd1ef70f1744b6a2e2c36ad7142
2018-07-27 08:55:16 +02:00
eef19b80a0 FAIL* works with LLVM 3.9, 4.0, 5.0 or 6.0
Change-Id: I5480c3451daac7c8ea6160a9afe5ce557b73afb1
2018-07-27 08:55:09 +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
54f3d3f9b6 x86: add amd64 registers
Floating-point related registers are still missing.

Change-Id: If0e0fa2b25cf2fda6e23aeddb3a72744e6c079a6
2018-07-24 09:24:45 +02:00
dd1b18e580 remove unused elfinfo/*
elfinfo was what ElfReader started from, but is not needed in itself
anymore.  The code has been mostly rewritten, so an explicit mention
of the original authors is not necessary anymore.

Change-Id: Iea48c80f9174504bbb56cc02ee2de5eda4a81489
2018-07-24 09:22:29 +02:00
9bd58cb294 ElfReader: read 64-bit ELF binaries
ElfReader now detects whether a 32- or 64-bit ELF is opened, and uses
the corresponding elf.h data structures.  Internally maps 32-bit ELF
structures onto 64-bit structures to use common processing code.

Change-Id: Ib42a4b21701aeadac7568e369a80c08f2807694e
2018-07-24 09:21:12 +02:00
3d292cb217 generic-tracing: add error handling
Instead of using assert() (which only does something in a Debug
build), explicitly fail when a user-specified symbol is not found.

Change-Id: I33ac59ca4483ee65ba70c264b5153a7766a919d2
2018-07-24 09:21:09 +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
e63f7376f8 JobClient: connect to IPv4 endpoints only
As long as the JobServer only listens on IPv4 endpoints, it makes no
sense to attempt a connect to an IPv6 endpoint on the client side.

(However, it's 2018 and we should also be capable of using IPv6 on
both the client and server side ...)

Change-Id: I9c3916466c350ce74a31cef3b6ae0e7ac56367c7
2018-07-24 09:16:33 +02:00
c5e0825c6f Database: reduce varchar cols to fit MyISAM indexes
MyISAM indexes are limited to 1000 bytes per index.  Recently, Linux
distros (e.g. Debian 9) started to default MariaDB installations to
utf8mb4, which can use up to 4 bytes per character.  Hence, two
varchar columns indexed in a single key have a total maximum length of
250.  Instead, we use some lower, round numbers.

Change-Id: I4b53bc217912bc7070102a0af4938763e61b041d
2018-07-24 09:16:33 +02:00
c88c034ca7 cmake: default build type 'Release'
+Make available build types explicit (pull-down in CMake GUI)

Change-Id: Ib2cdd31ad038cef1bb27fcd14f089a35a9751e76
2018-07-24 09:16:33 +02:00
be0b7b630c doc update
Change-Id: Ie8f9011b7718c971de74ab40689c9de7fbeb3b18
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
baaa6c3ce8 JobClient/Server fixes
- Retain original CLIENT_RETRY_COUNT semantics after Boost::Asio
  switch
- JobClient is C++11 now, too
- Message reception copy/paste error fixes

Change-Id: I19c474b2a79cd2ac8657e8d58d6170202d096fb0
2018-05-09 17:43:28 +02:00
9272c5cbed Move JobClient to Boost::asio as well
I did this mainly so server and client use a common networking API
IMO, using Boost::asio results in nicer name-lookup code.
Since no longer needed, I removed the SocketComm stuff.
The client is still synchronous; I see no benefit in having it
asynchronous.

I'm not super happy with the random backoff by the clients, if they
can't connect to the server. It makes the code really messy, 3 retries
is totally arbitrary, as is the backup windows. I believe launching
the server and clients in the correct order should be handled by a
launch script
Change-Id: Ifea64919fc228aa530c90449686f51bf63eb70e7
2018-05-09 17:41:52 +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
9ae8123433 JobServer: fix C++14 dependency
The recent Boost.Asio overhaul requires C++14 features, not only C++11.

Change-Id: I6decf0e6532956f7061d8a9021ec2c8406679266
2018-05-03 16:28:26 +02:00
5a5a99145c bochs: fix ac++-caused preprocessor namespace clash
When building with an experiment activated, the generated
instantiate-<experimentname>.ah gets included in each and every FAIL*
translation unit including Bochs's ones.  In the case of the
generic-experiment (and probably many others), this indirectly included
Google protobuf headers, which failed to compile for Bochs's gui/wx.cc and
gui/x.cc: The included X headers pollute the preprocessor namespace by
an internal protobuf "Status" class.

Change-Id: I613f5c792a9519cf2573eddc7fef6266c7168494
2018-05-03 16:26:13 +02:00
6f41ad73d3 util: MemoryMap test failure more verbose
Change-Id: Ie42e1983d8cc5658b7e88d59cdbe689e6aefe9f2
2018-05-03 15:24:52 +02:00
4a068792e8 fixes for Ubuntu 17.10
- Bochs: wx_gtk3 needs g(d|t)k2

Change-Id: I0a014e3ce7f1d40d215d5309e842db618a2971ed
2018-03-01 15:57:24 +01:00
6c120004eb Use boost-asio to improve FAIL* server performance
This patch overhauls the FAIL* server code to leverage Boost asio to be able to
handle a large number of clients (>4000). In this implementation the server is
now single threaded. I've not encountered any problems with this for up to
about 10k clients. Boost ASIO can also be used multithreaded, but I assume the
FAIL* internal data structures (Synchronized*) will become a bottleneck first.

The code now additionally depends on Boost Coro and Boost Context, as well as
a C++ 14 compiler, although the only C++14 feature required is a lambda capture
with initializer, such as [ x = std::move(x) ]. gcc-4.9.2 does this.

The code could (and probably should) be cleaned up more. Comments are wordy,
code is unnecessary now (multiple server threads), code is not self-contained
(headers spread dependencies), many ifdef's (server performance measuring
should be runtime rather than a compile time option), and much more. But for
this patch I was going for a minimal changeset the get the functionality in,
to have an easier review. Alas, FAIL* has no Unit-test suite to run the changes
against.

To handle such a large number of clients more changes were necessary, for
example server status output is now performed every 1s, instead for every
request.

The class Minion was removed completely; the only thing it was doing was
encapsulate an int.

The server has now a runtime-configurable port, or it can select a free port on
its own if none is specified. This requires the CampaignManager to add a port
argument and instantiate the JobServer dynamically.

Change-Id: Iad9238972161f95f5802bd2251116f8aeee14884
2017-09-15 06:26:14 +02:00
48ceeb6a14 Clang 4.0.0 fix for Bochs
Clang 4.0.0, which ac++ links against since today, throws an error in
the Bochs code.

config.cc:3480:55: error: ordered comparison between pointer and zero ('char *' and 'int')
    if (SIM->get_param_string("model", base)->getptr()>0) {
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~

Change-Id: I8404a54acd468bf71cbf29867657f9458f3a4c3f
2017-08-01 17:48:39 +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
d0d62de3f4 sal: remove perf dependency to watchpoints/breakpoints
This change removes the hard compile-time dependency from the
performance-improving dedicated listener-list implementation
(core/sal/perf/) to basic watchpoints / breakpoints being enabled in
the cmake config.  This allows to keep the CONFIG_FAST_* switches
enabled in practically every experiment.

The primary reason for this change was the recent insight that enabled
breakpoints with disabled CONFIG_FAST_BREAKPOINTS can massively slow
down an experiment even if the latter does not use a single breakpoint
itself.

Change-Id: I5e3f5c1632ed1ee98a3ec887f18b174fa0e15773
2016-12-03 17:49:07 +01: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
87f7cae1da Merge "ecos_kernel_test: check if addr_errors_corrected is mapped before access" 2016-10-06 13:19:06 +02:00
e25c42f2b2 bochs: fix segmentation fault (after BX_PANIC) in HDD controller
Change-Id: I584e883b89ae36f4cee83684f9461e7baafa1495
2016-09-09 11:32:14 +02:00
3c6502a111 ecos_kernel_test: check if addr_errors_corrected is mapped before access
Change-Id: I08e751feeffc41a51312b8a9ad4b28a57a45a487
2016-09-09 11:26:07 +02:00
9886a0345e bochs: fix segmentation fault in DMA controller
Change-Id: I10c3e7e89d41abdcaea374ea01a2d1613d013e4c
2016-09-08 10:35:33 +02:00
85844b86cc ecos_kernel_test: compare serial output for coptermock benchmark
Change-Id: Ic4f13035d55c811bda7fa020114141b816a11ed8
2016-08-29 10:50:35 +01:00
89866de85f bochs: backport PCI IDE controller DMA start fix
Upstream SVN r12754: "Fixed PCI IDE controller DMA start (found with a
recent Linux version: "mode sense" command executed in DMA mode).
Updated output of "mode sense" page 0x2a (still reporting CD-ROM
drive)."

(data_ready part not backported due to missing dependency)

Change-Id: I392ba2b20a4138682fc34d6d2a78da0c6706e280
2016-08-06 19:44:49 +02:00
fbd788f05e bochs: backport overlapping memcpy fix
Upstream SVN r12563: "Bugfix: use memmove() if source and destination
range can overlap (found with valgrind)."

(Manually backported, the code structure has significantly changed
before this fix.)

Change-Id: Id176fb5b0aca806908cfb06f06bb5a7221ccc9c4
2016-08-06 17:50:27 +02:00
a2798cc2bf bochs: backport PCI IDE buffer-overflow fix
Upstream SVN r10244: "Fixed possible buffer overflow causing segfault
or memory corruption. The buffers are not large enough for the maximum
sector count in LBA48 mode. Now resetting buffer pointers after
processing a PRD (and move remaining data if necessary). This should
fix the SF bug items #3190970 and #3077616."

This happened to us when booting Debian 8 with a Linux 3.16 kernel
from "flat" or "volatile" disk images, in the end corrupting the VGA
card's ("theVga") internal state and segfaulting.

Change-Id: I6a80432093a547dc2eb5270845369d0918e1e49b
2016-08-06 17:49:39 +02:00
436930de71 rampage: fix integer overflow
Change-Id: I18ee65335efd0207c27da9524d74be5d5a575329
2016-08-01 16:39:42 +02:00
2aeded20be rampage: link correctly with Bochs
Change-Id: I7a0231c6b6e8983f86b94c2bfde78d2524dbfc8d
2016-08-01 16:36:17 +02:00
8a63533137 Merge branch 'hannesweisbach-fixes' 2016-07-26 18:13:53 +02:00
3fc3c6a689 bochs: backport fix for out-of-bounds memory access
Upstream SVN r11912: "Fixed some gcc 4.8.1 warnings"

Change-Id: I599eb4d6bb8d5a7a2585bcca7d9a738ac2930aac
2016-07-26 18:11:55 +02:00