Commit Graph

54 Commits

Author SHA1 Message Date
d6a83a0520 Allow duplicate values in mark channels 2024-06-20 11:41:38 +02:00
c803a7566f Prevent zero values in the mark API
These values cannot be differentiated from a null value, due to a
Paraver limitation.
2024-06-20 11:41:09 +02:00
9da7234684 Pause one thread in mark API emu test.
The Paraver timeline should hide the value of the thread while it is
paused. This will require adding a tracking module with a mux.
2024-06-19 13:13:18 +02:00
6954f05dee Update mark test to for single and stack types 2024-06-19 12:26:35 +02:00
b4d445b378 Write mark PCF types for thread PVT 2024-06-19 12:26:35 +02:00
ea79c90c89 Connect mark channels to PRV
There must be one channel per thread and type.
2024-06-19 12:26:35 +02:00
505245d54c Implement emulator logic to parse mark metadata
The marks are parsed from the metadata definition, then merged from all
threads and a new channel for each mark type is created. The channel
type is specified using a flag when calling ovni_mark_type(), so the
channels is set to single or stack. For now, only ovni_mark_push() and
ovni_mark_pop() are implemented.
2024-06-19 12:26:35 +02:00
93ab5a5833 Add ovni_mark_* API to store custom states
In order to allow easy debugging of some programs and runtimes, it is
often neccessary to add extra information in the timeline views. The
modification of the emulator to accomodate those temporal events is time
consuming and requires knowlegde of the emulator internals.

To improve the situation, a new set of functions are added to libovni
which allow users to define their own views. Up to 100 types of events
can be declared, where each type can have an unlimited number ov values
with an optional label attached.
2024-06-19 12:26:35 +02:00
d1e8a62396 Add API to manage metadata in streams
The ovni_attr_* set of functions allows users to write and read metadata
stores in the thread stream. The metadata information is available to
the emulator at the beginning of the emulation.
2024-06-13 11:09:40 +02:00
2c58a6058b Document version changes in emulator models
A consistency check ensures that all versions reported by the emulator
appear in the documentation as the latest version. This prevents
forgetting updating the version in the documentation.
2024-03-14 13:56:37 +01:00
df0e7b2bd4 Test generated events match documentation
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.
2024-01-30 12:02:02 +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
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
c424a3177d Test temporal directories are removed at the end 2023-11-16 12:39:15 +01:00
423e3b15d2 Test multiple calls to ovni_thread_require() 2023-11-16 12:39:14 +01:00
93fdfd51de Add flush-tmpdir test 2023-11-16 12:39:14 +01:00
6b0b5bfbbd Add require test for missing models 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
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
428e0b44b8 Add emu test for ovni_thread_require 2023-11-16 12:21:50 +01:00
0df018cf5f Fix segfault reading empty streams
The check_clock_gate() was trying to access to the first event in all
streams. However, streams that are empty don't have any event, so they
cause a NULL dereference. Skipping not active streams avoids the
problem.
2023-10-23 10:07:44 +02:00
0db35980a0 Add a test for multiple values of OVNI_TRACEDIR 2023-10-23 07:49:28 +00:00
f8c6b7c7c0 Improve the version error message
Use the terminology want/got to determine which version the user is
requested and the version the library provides.
2023-07-25 19:55:51 +02:00
929af74d3f Add sort-flush test 2023-06-28 12:28:40 +02:00
ff340df5b5 Disable flush-overhead test 2023-04-19 10:57:10 +00:00
676e30b4ca Order looms and processes by rank if given 2023-04-14 08:35:21 +00:00
f848ddb37f Increase the flush overhead limit to 2 ms
The current CI disk is slower doing the flushes.
2023-04-05 15:35:37 +02:00
848a1de963 Constraint _GNU_SOURCE in compat.c only 2023-03-24 12:08:45 +00:00
ddbb7dd9f4 Add include-what-you-use
Adds forwards declarations in headers and includes all headers in
sources, even if they are found by transitive includes.
2023-03-24 12:08:45 +00:00
f22d9084ba Ensure all looms have at least one CPU 2023-03-24 12:08:45 +00:00
c0afc79d4e Use OK() and ERR() in unit tests
Also remove prefixes and trailing new lines in err() and die()
2023-03-24 12:08:45 +00:00
82f1cc287d Update copyright years to 2021-2023 2023-03-24 12:08:45 +00:00
69506e5079 Update burst test regex 2023-03-24 12:08:45 +00:00
899b82c36f Update flush-overhead too 2023-03-24 12:08:45 +00:00
7b80aa6aaf Instrument running thread in sort and flush tests 2023-03-24 12:08:45 +00:00
e3339fef3b Increase sort window 2023-03-24 12:08:45 +00:00
451d4be386 Port ovnisort 2023-03-24 12:08:45 +00:00
e344044b43 Use OB. for flush overhead test 2023-03-24 12:08:45 +00:00
2ce91de173 Move mp-rank test to nOS-V group 2023-03-24 12:08:45 +00:00
c13e004c6f Disable sort and trace-dependent tests 2023-03-24 12:08:45 +00:00
dbea90f525 Fail if the streams clock is too far apart
The current gate is set to 1 hour and it only checks the first event in
the stream. Added a test too.
2023-03-24 12:08:45 +00:00
e674c92f13 Enable emu and rt tests for nanos6 and ovni 2023-03-24 12:08:45 +00:00
e6cbe67254 Redesign full ring test 2022-12-19 15:46:37 +01:00
730082024f Initialize last_phy in test mp-simple 2022-12-19 15:30:27 +01:00
b6ce54b7ee Add version check and soname for libovni
Adds ovni_version_check() to test the version at runtime, set the
SONAME to the major version and install a symlinks to the complete
version:

  libovni.so -> libovni.so.1
  libovni.so.1 -> libovni.so.1.0.0
  libovni.so.1.0.0
2022-12-13 13:11:44 +01:00
971e8c1891 Prevent early end maker OU] in sort test 2022-10-07 13:17:26 +02:00
bacf33450d Add burst stats test 2022-10-07 13:08:51 +02:00
239deed26d Add test to fill the ring buffer 2022-10-07 12:43:15 +02:00
6dda4e90dd Add tests for event sorting 2022-10-07 12:17:14 +02:00