Static linking

Custom metrics are not supported in Arm® MAP and Arm® Performance Reports when the Arm® MAP sampler is statically linked.

Implementing the API

Many of the Metric plugin API functions are provided for convenience to make async-signal safety less troublesome.

If your profiler never makes metric getter calls from signal handlers, but instead always calls them from well-defined (safe) points in user-code, then your API implementation can pass the calls to the libc functions (such as allinea_safe_malloc() -> malloc.

Similarly I/O related utility functions, such as allinea_safe_read() and allinea_safe_write(), are provided for I/O metric count correctness. If your profiler does not track I/O, then those functions can similarly pass the calls to the corresponding libc implementation.