Commit Graph

1018 Commits

Author SHA1 Message Date
61d57901b1 Enable undefined behavior sanitizer in CI 2024-07-29 13:09:41 +02:00
9c82038561 Add release link to tag 1.10.0 2024-07-26 16:20:34 +02:00
15dfa48d2d Release version 1.10.0 2024-07-26 13:25:43 +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
92c36502bc Reduce heat and fibonnacci test sizes 2024-07-24 16:09:47 +02:00
439b716a71 Use int64_t printf formats for mark channels 2024-07-24 16:09:47 +02:00
97282ff051 Increase test timeout to 60 seconds 2024-07-24 16:09:47 +02:00
093c91521a Fix error format strings in mark API 2024-07-24 16:09:44 +02:00
74aa7b4ea6 Update changelog 2024-07-24 15:12:09 +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
91e8367d35 Set timeout to 30 seconds for tests 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
42feb53c86 Cross compile for ARMv7, Aarch64 and RISC-V 64
Adds CI cross-compilation tests for those architectures. Requires the
host to be able to run thos binaries via binfmt.

See: https://docs.kernel.org/admin-guide/binfmt-misc.html
2024-07-24 15:12:09 +02:00
391d695144 Add mark API to the changelog 2024-07-23 10:35:08 +02:00
038b9d8564 Document usage rules for the mark API 2024-07-23 10:35:08 +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
1ab605b70d Fix calloc() argument order
Catched by a new gcc 14.1.1 warning.
2024-07-22 16:45:29 +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
a21dc76d81 Use 100 as example mark type
As the types for mark timelines start at 100, it is likely that it
matches in the first try.
2024-06-21 09:45:54 +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
e31f0f1ded Add fibonacci and heat RT tests for mark API 2024-06-20 17:39:42 +02:00
43792fb349 Clarify push and pop value in mark API 2024-06-20 11:48:31 +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
670edb6ddc Add documentation for the mark API
Includes the runtime usage as well as how to adjust the Paraver
configuration.
2024-06-20 11:08:29 +02:00
f5d1e0a3cb Add example mark configurations 2024-06-20 11:07:49 +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
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
610b1223d9 Update version docs for ovni model 1.1.0 2024-06-19 12:26:58 +02:00
6954f05dee Update mark test to for single and stack types 2024-06-19 12:26:35 +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
247ea7e7c3 Add nosv.can_breakdown attribute check
The nosv.can_breakdown attribute states if enough events for the
breakdown model of nOS-V are enabled at runtime. It is used to ensure
that breakdown traces have the progress events enabled along with others
required for proper visualization of traces.

The emulator will panic when the level is not enough, instead of relying
on users to always remember to enable the correct level.
2024-06-18 12:06:42 +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
2ac67cff18 Update CHANGELOG for nOS-V breakdown 2024-06-12 16:52:30 +02:00
eed2273ddf Add nOS-V docs for idle and breakdown views 2024-06-12 16:52:30 +02:00
31d6eb076c Add unknown subsystem state for nOS-V breakdown
It will appear when the emulator knows that a thread is running in the
CPU, but no subsystem has been entered yet. This is common a
instrumentation level lower than 3 in nOS-V.
2024-06-12 16:52:30 +02:00