Commit Graph

3 Commits

Author SHA1 Message Date
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
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
hsc
65eb44a746 workaround for experiment.hpp including generated header
If an experiment's class definition (experiment.hpp) contains a member of
a generated type (which is the common case for protobuf messages), it needs
to include a generated header.  In order to instantiate the experiment in
a SimulatorController::initExperiments() hook aspect, the aspect needs to
include the experiment's class definition -- and indirectly the generated
protobuf header.  As the build system does not know about this dependency,
building SimulatorController.cc fails regularly, because the header is not
generated timely.

This commit works around this (currently only for the RAMpage experiment)
by delegating experiment instantiation to a separate compilation unit,
removing the need to include any headers in the instantiation aspect.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1691 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
2012-09-25 15:52:45 +00:00