I've recently profiled the latency of LTTng tracepoints on arm platforms,
using the follow sample program:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
static inline uint64_t get_time_nsec(void)
if (caa_unlikely(clock_gettime(CLOCK_MONOTONIC, &ts))) {
return ((uint64_t) ts.tv_sec * 1000000000ULL) + ts.tv_nsec;
int main(int argc, char *argv[])
sscanf (argv[1],"%d",&tp_num);
for (i = 0; i < tp_num; i++) {
lttng_ust_tracepoint(hello_world, my_first_tracepoint,
total_time += (nowz - now);
printf("---------------------------Average TP time is %"PRIu64"---------------------------\n", total_time / tp_num);
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I observed a big average latency variance on different platforms when tracing a high number (many thousands to millions) of tracepoints:
- [platform 1] with CPU info running a linux kernel based on Buildroot (4.19.273 aarch64 GNU/Linux):