As we have a variable number of hardware counters that can be enabled at
runtime, each with a different name, we need to create a dynamic set of
configuration files for Paraver. We also need to specify some options
needed to properly see the timeline for HWC. For now we leave the
generation of CFG to the minimum features required to cover HWC.
When loading CPUs for the loom, we cannot use loom_get_cpu() to access
the CPUs of the loom by their logical index, as it is not yet populated.
The check comes from load_cpus() which tries to prevent duplicated
entries in CPU logical indices, but this check is already performed when
building the cpus_array, so it is not needed.
Tested-by: Arnau Cinca <arnau.cinca@bsc.es>
As we now have OpenMP and nOS-V models for breakdown, we may have the
situation in which nOS-V traces don't have enough events to enable the
breakdown model, but we do on OpenMP. Rather than stopping, disable the
nOS-V model with a warning and continue.
The events are emitted when we enter the scheduler with the non-blocking
flag, which is usually the case when using the nosv_yield and
nosv_schedpoint API functions.
See: https://gitlab.bsc.es/nos-v/nos-v/-/merge_requests/155
A pointer may not fit in a off_t type, so we first cast it to intptr_t
which must be able to hold it, then compute the diff which should fit in
a off_t and perform the cast.
Reported-by: Miquel Vidal Piñol <miquel.vidal@bsc.es>
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.
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