Instead of issuing a query for every variant, we assemble a set of
variant ids and query `WHERE variant_id in (1,...)'. This has not only
the effect of higher optimization potential for the database, but also
the query is issued before any result can come back. This will avoid an
overfull receive queue within the job server.
Change-Id: I5b1c60f92b97741ce26d9e50760b601929cef44f
This is a copy of the generic-tracing plugin for CoRedOS with the following
additions:
- random generator plugin is added if a "random_source" symbol is found
- checkpoint plugin is added if a "fail_trace" symbol is found. If stack
limits are defined by "_sstack" and "_estack" symbols this memory region
is checksummed on each checkpoint.
Change-Id: I00403ed917ad941d87ac2aeabd00c441135d9af4
The checkpoint plugin watches for writes on the given symbol and logs
the written value and the simulation time to a given output file.
Additionally, a SHA1 hash is computed over all memory locations between
given start and stop symbols.
On x86, virtual memory is disabled while computing the checkpoint hash.
This means the checkpoint plugin in checksumming over physical, not
virtual, address ranges! This can result to unexpected behaviour if
virtual memory is not used for identity paging.
To save checkpoint information to a file, use the Checkpoint constructor
with a given checkpoint symbol and add the plugin to the experiment (flow).
To check checkpoints against an existing file, use the constructor without
memory symbol and do not add the plugin to the experiment. Instead, define
a memory listener "manually" and call the check() function. This approach
was taken as the simplest form of cooperation between experiment and
plugins.
For SHA1 calculation, C code from RFC 3174 is used to prevent depending
on another external library. However, this may not be the fastest or
best code for the task.
TEMPORARY HACK/WORKAROUND:
Since dOSEK uses the highest bit (31) of some pointers for parity and
the checksum plugin reads these (stack) pointers to determine checksum
regions, the plugin currently DISCARDS BIT 31 of pointers used as
dynamic region limits.
This will be replaced in the future by a callback mechanism, which lets
the experiment specify the regions to checksum (called at each checkpoint).
Change-Id: I176eccc34b582bbf13e52b6943191dd20258acc5
assert(...) can be optimized away, therefore side-effect code should not
be placed inside an assertion.
Change-Id: I28aee42e53cb105333094d0042a3f6e2cc5b5a30
Since we know for which variant we want to have the completed pilots, we
do not have to catch all pilot_ids but only those who of pilots that are
finished and have the correct variant_id. This speeds the startup of the
campaign server enormously when having many completed campaigns in the
database.
Change-Id: I8be584a2dd6d8d7315f30dcb5bff89647353001e
This change renames the logger object used in weather-monitor from
"log" to "LOG" in order to circumvent potential naming conflicts
with e.g. the log() function from e.g. math.h/cmath.
Change-Id: I73758374f76ea5c29cb636ae3e0685a4a4cceacb
This commit modifies the weather-monitor experiment so that it
uses util/ElfReader instead of "nm -C" in a wrapper-script to
determine the various symbol addresses. experimentInfo.hpp now
only contains (rudimentary) configuration data for the experiment.
Furthermore this commit modularizes the experiment's code so that
there no longer is a humongous run() method.
Change-Id: I42461e1dabb5050af372810bb9fb61a6fccd0d99
This change removes an unnecessary "#ifndef __puma" from the LLVM
disassembler test code and fixes compilation with the latest AspectC++
binaries.
Change-Id: Ibe835a4a6df69255555c668985f15b9cf8fb82b4
Up to now, the IOPortListener only caught invocations of INB/OUTB with
the port number in DX and 8-bit input/output (from/to AL), but none of
the various other methods to access the I/O port range (e.g., by 8-bit
immediate port numbers). This change is supposed to catch all other
cases, too.
Change-Id: I1180cd9c1d59df600067739817adab684b18a608
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
The SumTree implements an efficient tree data structure for
"roulette-wheel" sampling, or "sampling with fault expansion", i.e.,
sampling of trace entries / pilots without replacement and with a
picking probability proportional to the entries' sizes.
For every sample, the naive approach picks a random number between 0
and the sum of all entry sizes minus one. It then iterates over all
entries and sums their sizes until the sum exceeds the random number.
The current entry gets picked. The main disadvantage is the linear
complexity, which gets unpleasant for millions of entries.
The core idea behind the SumTree implementation is to maintain the
size sum of groups of entries, kept in "buckets". Thereby, a bucket
can be quickly jumped over. To keep bucket sizes (and thereby linear
search times) bounded, more bucket hierarchy levels are introduced
when a defined bucket size limit is reached.
Note that the current implementation is built for a pure growth phase
(when the tree gets filled with pilots from the database), followed by
a sampling phase when the tree gets emptied. It does not handle a
mixed add/remove case very smartly, although it should remain
functional.
Change-Id: If05e9700bc84761b5bc31006402641e7112b3a72
The compiler should be able to completely optimize away side-effect
free usage of this logger. Can be used as a drop-in replacement for
Loggers to silence logging output for known-good code without having
to remove the corresponding "LOG << ..." code.
Change-Id: Ifb276223f61686773dd6108aafd567e99c88b223
This enables commonly used event sources and other backend features to
avoid newcomers not getting their first experiments to work. The
performance impact is not really a problem, but for optimal throughput
unused features can still be disabled.
Change-Id: Id507474eab4647137ce82cb8674fe23f7102975a
gethostbyname() doesn't set errno but h_errno. Thus, we need to call
herror() instead of perror() to print an appropriate error message.
(Thanks, Björn.)
Change-Id: I8fd4bdd4af41774dd290151c5ad37090d006f423
The disassembled memory region's end (variable "End") is exclusive
now. Up to now, the two branches defining this variable disagreed on
inclusiveness, leading to an infinite loop in one case.
Change-Id: I055fc240f6ec2f4a1d1937e48617c86612cff5c5
Since commit c142818, DatabaseCampaignMessage.proto is generated into
the binary directory, which must be announced to the protobuf
compiler.
Change-Id: I0c3c4c6525df687012330573979dc897dfa8d701
Enabling both CONFIG_FAST_BREAKPOINTS / CONFIG_FAST_WATCHPOINTS and
CONFIG_EVENT_BREAKPOINTS / CONFIG_EVENT_BREAKPOINTS_RANGE /
CONFIG_EVENT_MEMREAD / CONFIG_EVENT_MEMWRITE led to an (unnecessary)
include cycle.
Change-Id: I8144e3e72da69b98e21a844a4bfded1b77bdce07
This change allows to use the generic-tracing experiment with a
manually specified start/stop address. This is necessary to use it
with more complex systems that aren't booted from a single ELF file,
such as Fiasco.OC.
Change-Id: Iafc59f56a25a1949174724fa9ae32a1eafc5922a
This fixes a gcc 4.7 warning: comparison between signed and unsigned
integer expressions [-Wsign-compare].
Change-Id: If440567c2767494f456e8e68df29e2f8d1582955
BochsController::getTimerTicksPerSecond() only works reliably when the
simulation is already running (e.g., after a restore()). This broke
timeout conditions for the very first experiment in a FailBochs instance.
Change-Id: Ice5f0aa0c6759f2d9341ad4f21d5c346307b4c12
This change makes the DatabaseCampaign load all pilot_ids from the result
table in memory instead of LEFT JOINing them for each variant. This vastly
improves campaign speed (possibly making commit 5567c59 superfluous) at the
cost of slightly increased startup time for half-completed (large)
campaigns.
By exploiting the generally continuous nature of pilot IDs and using a
boost::icl::interval_map, the additional memory requirements are
insignificant.
Change-Id: I1e744fb9ca33efea77a2a785cea3c94106f360df
When no variants matching the command line parameters were found, the
campaign printed an uninitialized sent_pilots count.
Change-Id: Ib1d70ae86f02059daeb9a62567d6c83802e4986e