Commit Graph

956 Commits

Author SHA1 Message Date
bae38d1d26 Describe event declaration language 2023-12-21 14:55:05 +01:00
a2b2d11b0d Release version 1.5.1 2023-12-20 15:33:41 +01:00
1930cc4fd6 Adjust the regex of spawn-task-external-bad test
Now the program fails in runtime directly as the stream is not
initialized when Nanos6 attempts to write events.
2023-12-20 12:08:47 +01:00
7212273141 Update nOS-V and Nanos6 for CI tests
The new versions include the call to ovni_thread_free() when a thread
finishes.
2023-12-20 12:07:42 +01:00
6bfacf0e1e Check the thread is ready before adding events
Prevents segmentation faults when accessing the NULL stream buffer
without a clear message of what is happening.
2023-12-19 17:30:31 +01:00
0439399f05 Fix ovni_thread_isready() after ovni_thread_free()
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.
2023-12-19 17:30:20 +01:00
75833f5e21 Release version 1.5.0 2023-12-15 11:34:20 +01:00
1918ab6669 Always attempt to find Nanos6 and NODES
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.
2023-12-15 11:06:41 +01:00
2b2a0eea8e Require nOS-V 2.0.0 for RT tests
We no longer need to detect support for instrumentation levels, as it is
included in 2.0.0.
2023-12-15 11:06:41 +01:00
ae7ef21014 Fix attach nOS-V RT test
The nosv_attach() function no longer needs a the type argument.
2023-12-15 11:06:41 +01:00
0a534f6c46 Simplify nanos6.toml config
Only the parts relevant to ovni are required.
2023-12-15 11:06:41 +01:00
1959ad047f Update runtimes to master with an overlay
Use an overlay to change CI packages recursively to also update
depedencies.
2023-12-15 11:06:41 +01:00
f56bc51dd5 flake.lock: Update
Flake lock file updates:

• Updated input 'bscpkgs':
    'git+https://git.sr.ht/~rodarima/bscpkgs?ref=refs/heads/master&rev=2a953d811c1e10d8d32b17a39e6eaf1b58afcd46' (2023-11-29)
  → 'git+https://git.sr.ht/~rodarima/bscpkgs?ref=refs/heads/master&rev=c4d5135fde108401417fdcdf5e1c8d11aeca4f32' (2023-12-07)
2023-12-15 11:05:59 +01:00
0496aeffc6 Close stream FD on ovni_thread_free()
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
2023-12-14 16:08:25 +01:00
bf2b4af15a Ensure we use RUNPATH for ovniver
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.
2023-12-12 17:06:24 +01:00
6d584c646c Install ovniver with the runpath set
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
2023-12-12 17:06:24 +01:00
0f7ccc89de Add -a flag in ovniemu to enable all models
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.
2023-12-11 14:29:40 +01:00
998200d507 Always check thread metadata
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.
2023-11-22 10:38:46 +01:00
c424a3177d Test temporal directories are removed at the end 2023-11-16 12:39:15 +01:00
3267ea873f Clean tmp directories when finishing
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".
2023-11-16 12:39:15 +01:00
e002db72fd Correct documentation on thread metadata 2023-11-16 12:39:14 +01:00
2b18171e94 Update changelog 2023-11-16 12:39:14 +01:00
effdf36f7e Print the list of models in the emulator 2023-11-16 12:39:14 +01:00
927837df25 Don't write thread metadata on flush
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.
2023-11-16 12:39:14 +01:00
c7e8b256d2 Fix gcc uninitialization warning confusion 2023-11-16 12:39:14 +01:00
423e3b15d2 Test multiple calls to ovni_thread_require() 2023-11-16 12:39:14 +01:00
855dd76678 Report libovni version from trace 2023-11-16 12:39:14 +01:00
93fdfd51de Add flush-tmpdir test 2023-11-16 12:39:14 +01:00
70e886fcfe Remove old model_version key from proc metadata 2023-11-16 12:39:14 +01:00
f02994c149 Document thread metadata in trace spec 2023-11-16 12:39:14 +01:00
f34479712a Add model version in documentation 2023-11-16 12:39:14 +01:00
d836b7e46d Include changelog in documentation 2023-11-16 12:39:14 +01:00
6b0b5bfbbd Add require test for missing models 2023-11-16 12:39:14 +01:00
58fe0d1b4b Improve error message for disabled model 2023-11-16 12:39:14 +01:00
72b7eb8332 Mark the finalization of streams
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.
2023-11-16 12:39:14 +01:00
25cf46036d Add no-require emulation test 2023-11-16 12:39:14 +01:00
fa436604b7 Improve compatibility warning messages 2023-11-16 12:39:14 +01:00
6f7ce4063f Enable all models if the require key is missing
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.
2023-11-16 12:39:14 +01:00
59385fad03 Add compatibility mode for missing require key
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).
2023-11-16 12:39:14 +01:00
30d5e4b0ca Show state for all models 2023-11-16 12:39:14 +01:00
d45041e00c Disable delayed connect 2023-11-16 12:39:14 +01:00
354f2f50eb Register emulation models only if required
Until now, emulation models were always being registered via probe(),
which causes the emulator to initialize all the channels. To reduce the
overhead, the channels were not connected or registered in the bay
until the first event of that model was received. This delayed connect
was causing issues in muxes where the newly connected model required
refreshing the touched channels. Which in turn was causing unexpected
PRV events.

By determining which models we need to enable, we can remove the delayed
connect mechanism and just enable those models at initialization time,
and connect the channels.
2023-11-16 12:39:05 +01:00
3d10bef305 Load thread metadata from the JSON file 2023-11-16 12:21:50 +01:00
428e0b44b8 Add emu test for ovni_thread_require 2023-11-16 12:21:50 +01:00
ab42ac4557 Add thread metadata 2023-11-16 12:21:50 +01:00
5d9aef4ed8 Remove rthread and rproc definitions from ovni.h 2023-11-16 12:21:50 +01:00
7a33deffb7 Release version 1.4.1 2023-11-16 12:07:31 +01:00
c13d57f0f6 Fix for nOS-V with ovni.level=2
When running without all the subsystem events enabled in nOS-V, it is
possible to emit two consecutive VTx events, which would push twice the
same value ST_TASK_BODY into the subsystem channel. This change relaxes
the subsystem channel to accept duplicate stacked values. A regression
test is also added.

Reported-By: Raúl Peñacoba Veigas <raul.penacoba@bsc.es>
2023-11-14 17:26:43 +01:00
2d5046654d Release version 1.4.0 2023-11-08 17:02:42 +01:00
e6537b78b0 Add .readthedocs.yaml file 2023-11-08 16:29:00 +01:00