16dbc8bf5d
Store rank information in the libovni thread
...
Prevents threads from finishing while another thread is being
initializing the rank information, causing a race to read the rank and
nranks.
2024-09-13 08:52:10 +02:00
f6fc166a38
Use atomics to protect libovni process state
...
Multiple threads may attempt to initialize or finalize the process, so
we keep the state stored in an atomic integer to protect against bad
usage.
2024-09-13 08:35:33 +02:00
d83e8f2d68
Always require the current ovni model
2024-09-12 16:24:01 +02:00
f6d85e9af5
Make ovni.require a mandatory attribute
...
We no longer accept streams that don't have the ovni.require attribute.
2024-09-12 15:56:24 +02:00
1f30e8ef8b
Parse metadata from proc and loom directly
...
All the metadata keys are known to proc and loom only, making it
self-contained. The metadata.c module is no longer needed.
2024-09-12 15:54:29 +02:00
4e3406d5f8
Move thread streams in ovni_thread_free()
...
The process metadata in metadata.json is no longer needed.
2024-09-10 12:42:25 +02:00
2bf739efed
Reject incomplete thread streams
2024-09-10 11:57:45 +02:00
6a595fff0b
Ensure the thread is ready before adding cpus
2024-09-10 11:45:24 +02:00
3f6ec86890
Store .obs and .json paths in stream struct
2024-09-10 11:20:39 +02:00
8e9cc34e5e
Store loom CPUs in thread metadata
2024-09-10 11:00:07 +02:00
1b95fa813b
Store process information in thread metadata
2024-09-10 10:30:03 +02:00
aafaf6e954
Load thread tid from metadata
2024-09-10 09:59:22 +02:00
4ec966cb67
Store loom name in metadata instead of path
2024-09-10 09:59:22 +02:00
3751f3ac64
Store ovni.part in stream metadata
...
Allows multiple types of streams for different system parts: thread,
process, cpu, node...
2024-09-10 09:59:22 +02:00
f31e73003f
Store stream metadata in stream.json
...
Place all stream files in its own stream directory.
2024-09-10 09:59:22 +02:00
add2c5638a
Add more path utility functions
2024-09-10 09:59:22 +02:00
eceec52194
Store TID and PID in thread metadata
2024-09-10 09:59:22 +02:00
36cf3121d1
Fix implicit signed conversions
CI / build:rt (push) Failing after 12s
CI / build:asan (push) Failing after 12s
CI / build:nompi (push) Successful in 59s
CI / build:debug (push) Successful in 1m50s
CI / build:local (push) Successful in 2m2s
CI / build:compilers (push) Successful in 2m27s
2024-09-09 13:44:05 +02:00
c8b95313ff
Fix unaligned access to 64 bits payload
2024-09-09 13:44:05 +02:00
e5448af6d8
Rebuild ring buffer pointers after injecting events
...
The ring buffer pointers are no longer valid as we may have displaced
events around. The pointers of the affected region are reconstructed by
reading the events again, following their size.
2024-09-09 13:43:59 +02:00
49149e452c
Check ring buffer order after injecting events
...
Ensure that we are not reading garbage.
2024-09-09 09:10:04 +02:00
7496a6a866
Fix easy cases of unneeded casts
2024-09-09 08:28:08 +02:00
c8750b9dfd
Enable -Wconversion and -Wsign-conversion
...
Prevents implicit conversions to go undetected, as they will have to be
explicit now.
2024-09-09 08:28:02 +02:00
d98ca97624
Fix unaligned load of 4 bytes for typeid
...
Use memcpy() to move the typeid to an aligned address.
2024-07-29 13:17:37 +02:00
2457e50712
Use always base 10 integer formats with scanf()
...
The %i printf variant tries to autodetect the base, so 010 becomes 8.
2024-07-24 16:36:54 +02:00
439b716a71
Use int64_t printf formats for mark channels
2024-07-24 16:09:47 +02:00
093c91521a
Fix error format strings in mark API
2024-07-24 16:09:44 +02:00
3d8c84e17c
Fix heap when size_t is not unsigned long long
...
When the width of size_t doesn't match the width of the unsigned long
long type, the number of leading zeros doesn't match, making the
heap_get_move() function return incorrect values. This is the case on
ARMv7 with 32 bits, where size_t is 32 bits but unsigned long long is 64
bits.
We check the size of size_t to select which builtin we need. The sizeof
operator cannot be used at preprocessing, so we rely on the
optimizations to only leave the proper assembly instruction.
Fixes: https://pm.bsc.es/gitlab/rarias/ovni/-/issues/193
2024-07-24 15:12:09 +02:00
129020e1c5
Fix format errors in printf-like functions
2024-07-24 15:12:09 +02:00
d03fe10be8
Protect printf-like calls against format errors
2024-07-24 15:12:09 +02:00
3fdbb95080
Fix remaining problems for 32 bits architectures
2024-07-24 15:12:09 +02:00
Miquel Vidal i Pinyol
3103018404
Use format macro constants for fprintf and fscanf family functions
2024-07-24 15:12:09 +02:00
Miquel Vidal i Pinyol
478ed1f5d0
Use proper format specifiers
...
Allows compiling for architectures with different data type sizes
2024-07-24 15:12:09 +02:00
5448b5c0ec
Check duplicated mark channel types are the same
...
Ensure that two threads cannot define the same mark type with different
channel types.
2024-07-23 10:35:08 +02:00
be45235d15
Improve documentation of the mark API
2024-07-23 10:35:08 +02:00
87e4b829c5
Switch the mark tracking for threads to active
...
In the thread view, the values will still be visible when the thread
goes to Warming or Cooling states, instead of being removed like when
the thread enters the Paused state. The CPU view will continue to track
the running thread (only in the Running state).
2024-07-23 10:35:02 +02:00
fbb78ae22d
Avoid initialization of mark channels without types
...
There is no need to create any channel or connect any channel to the PRV
output.
2024-07-22 16:42:23 +02:00
49cecb798a
Don't allow zero in PRV for mark channels
...
As the zero value is not allowed to reach the mark channels, there is no
need to allow it in the PRV end.
2024-06-21 09:39:32 +02:00
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
a58b3d194c
Add CPU output for mark channels
...
By default they are configured to track the running thread.
2024-06-19 13:48:18 +02:00
d9180d950b
Make mark thread channels show only when running
...
Implements support for tracking the running thread using the track API.
2024-06-19 13:15:16 +02:00
db57136f1b
Allow the value zero in marks
...
When using the mark API to track a counter, it is posible that the value
zero is being emitted as it will be properly displayed using the
gradient view in Paraver.
2024-06-19 12:26:35 +02:00
2c111fd98c
Add ovni_mark_set() to the API
...
Allows emitting a single event to change the value of the mark channel.
The mark type must be defined as single without the MARK_FLAG_STACK
flag.
2024-06-19 12:26:35 +02:00
90f8ae4188
Allow marks without labels defined
...
The labels are optional, so they shouldn't be required when processing
the mark 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
1b2f72cc3a
Store mark labels into a hash table
...
Multiple threads can define the same values as long as the labels match.
They will be combined into a single hash table by value.
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