[lttng-dev] LTTng event identification

Valentin Grigorev valentin.grigorev at jetbrains.com
Thu Aug 13 09:52:16 EDT 2020


Hello!

I'm using LTTng live session and Babeltrace 2 C API to analyze events in
online mode.

I would like to route event processing statically (using IDs, without
parsing strings). And currently, I don't understand if it is possible with
LTTng.

Babeltrace 2 C API provides bt_event_class_get_id function, but the only
guarantee about IDs received from this function is "All the event classes
of a given stream class have unique numeric IDs
<https://babeltrace.org/docs/v2.0/libbabeltrace2/group__api-tir-ev-cls.html#api-tir-ev-cls-prop-id>".
And even more, it is mentioned further that stream class can automatically
assign event class IDs in some cases (q.v.
https://babeltrace.org/docs/v2.0/libbabeltrace2/group__api-tir-ev-cls.html).
If I understand correctly, it means, that these IDs are assigned by
Babeltrace library, not by LTTng itself or tracepoint provider, and as
result, the same tracepoints can produce events with different event class
IDs even within the same tracing session. Am I right?

At the same time, in ETW (Event Tracing for Windows) event type is fully
identified by 3 parameters: provider GUID, event id, event version. I would
like to have something like this. At least I need to know that ID for the
same tracepoint is constant, unique within a tracepoint provider, and not
depends on a session configuration, other providers, etc.

Summarizing, I'm interested in the following questions:
  * Do event class IDs depend on a session configuration (which events were
enabled)?
  * If so, maybe there are some other IDs satisfying the above requirements
in LTTng/Babeltrace?
  * Do any IDs for tracepoint providers exist in LTTng? Or parsing event
name is the only way to identify it?

Best regards,
Valentin Grigorev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20200813/9553f097/attachment.htm>


More information about the lttng-dev mailing list