Check if an lttng trace point is enabled with filter from C++ application

142 views Asked by At

Using lttng (https://man7.org/linux/man-pages/man3/lttng-ust.3.html) from a C++ application, is it possible to check if a trace point is enabled with filter option? Trace points can be enabled with filtering on the traced parameters, and i would like to read this filter from my C++ application somehow.

http://manpages.ubuntu.com/manpages/bionic/man1/lttng-enable-event.1.html, --filter option.

Say a trace point traces an integer id and a string message. I want to check if the trace point is enabled with filter option, and if so what that filter is set to.

In our system, the trace quickly fills trace buffers unless it's filtered. The reason to read the filter from the application would be that the traced data is also quite costly to produce. It would be beneficial performance-wise to only produce the data that will pass the trace filter.

0

There are 0 answers