[PATCH 4/6] lib/pmu: use build system defined RTE_LIB_PMU macro
Tomasz Duszynski
tduszynski at marvell.com
Mon Jun 16 12:53:24 CEST 2025
>16/06/2025 08:53, Tomasz Duszynski:
>> RTE_LIB_PMU is defined by build system automatically if DPDK is build
>> for Linux. Otherwise it's missing.
>>
>> That said all cases where conditional compilation is required
>> can be handled without introducing other macros.
>
>You don't need to know if it is compiled for an unsupported arch?
>
No, if arch isn't supported reading whatever counter returns 0. On the other hand
if architecture does not require extra setup (eg., x86-64) all works
automatically because Linux has consistent API for each supported arch.
>What will happen when calling the unit test on RISC-V?
Test will be skipped because event is set to 'NULL' by default. Supported
architectures override it with valid name.
More information about the dev
mailing list