The test ensures that the generated documentation of emulation events is
kept up to date. To locate the events.md file, the source root path is
now exported to tests in OVNI_SOURCE_DIR.
The "Built on ..." message with the date of the build is removed as
otherwise it will always make the comparison fail.
Implements a small language parser to define the emulator events. The
event specification is parsed at emulation (when the emulator runs).
The ovnidump output now prints the events with the arguments formatted
as given in the event description.
It also introduces some consistency checks over the event MCVs, which
must begin with the model identifier and cannot be duplicated.
Until now, the value returned by ovni_thread_isready() was still
non-zero when the thread stream was destroyed in ovni_thread_free()
This was making it impossible to detect when a stream was destroyed.
This change makes it return 0 after ovni_thread_free() by using a new
finished flag. The flag keeps track on then the stream is destroyed,
preventing double initialization of a free stream.
Causes the packages to always appear as found or not found in the
summary of cmake. Otherwise they were only checked if the compiler
supports the -fompss2 flag.
This is required on FS like NFS as the cache coherence model states that
only after the file is closed the changes are actually propagated to the
server. It is not recomended to use NFS as OVNI_TMPDIR anyway.
Fixes: https://pm.bsc.es/gitlab/rarias/ovni/-/issues/168
As cmake doesn't provide a way to use the RPATH or the RUNPATH, we
explicitly set the --enable-new-dtags linker flag. If the flag is not
supported by the compiler, the build is aborted.
When running ovniver without LD_LIBRARY_PATH set, the loader couldn't
find any ovni installation and therefore was failing to start the
program. With this change we set the RUNPATH (not RPATH) of ovniver to
the installation libdir, so when no other libovni library is loaded via
LD_LIBRARY_PATH the one provided by the same source as ovniver is used.
The value of LD_LIBRARY_PATH is also printed so we can determine where
it may be loading libovni. Using LD_DEBUG=libs will give more
information of the search process.
Fixes: https://pm.bsc.es/gitlab/rarias/ovni/-/issues/163
The experimental flag -a is used to ease the transition to the usage of
ovni_thread_require(), as it may be posible to have traces in which not
all libraries have requested their model. The flag causes all emulation
models to be enabled. This flag is considered experimental and it may be
removed or renamed in future versions.
The thread metadata file is mandatory for trace version 2, so the
emulator should fail if the file is not there or has the wrong version.
Old traces with version 1 are not supported.
There were leftover temporal directories when using the OVNI_TMPDIR
variable, as we only remove the proccess ones. This change only attempts
to remove them if they are empty, and doesn't care about race
conditions. The removal process is just "best effort".
The metadata was being written to the final directory, which may be too
slow to accept writes during runtime. The thread metadata needs to be
written anyway at ovni_thread_free() to set the finished flag, so we can
simply skip it.
The emulator will now check that all threads are properly finalyzed by
calling ovni_thread_free(), as required by the specification. For now
only a warning is issued, which is enough to determine the cause of
potential emulator panics.
The ovni model is now always enabled.
Allows programs to update to a new libovni library without breaking the
instrumentation. Only until the first call to ovni_thread_require() the
models are enabled on demand.
Traces with metadata version 1 don't use per-thread information, so we
cannot read the 'require' key. All models will be enabled for old traces
(which will cause performance problems).