From: Jérémie Galarneau Date: Thu, 12 May 2022 18:34:30 +0000 (-0400) Subject: sessiond: add tracer-agnostic trace hierarchy classes X-Git-Url: https://git.lttng.org/?a=commitdiff_plain;ds=sidebyside;h=0220be14254fac4f7af642fd6630282b29776a70;hp=0220be14254fac4f7af642fd6630282b29776a70;p=lttng-tools.git sessiond: add tracer-agnostic trace hierarchy classes The session daemon receives the fields present in events from the instrumented applications in the form of an array of lttng_ust_ctl_field structures and uses them directly in a number of code paths. This makes it impossible to extend the structures which makes a number of features harder to implement than they should be. The session daemon also implements various CTF concepts (clock, trace, event, stream classes) as part of various structures defined under `ust_registry*`. This makes it hard to isolate which attributes are "internal" and which are visible to the external world through the traces. Tracer-agnostic trace hierachy classes are introduced under the lttng::sessiond::trace namespace. Those classes don't cover the full functionality of CTF: they expose what the tracers can currently express. The top-level elements of the trace hierarchy -- trace, event, stream, clock classes -- are visited using the trace_class_visitor interface. Seperate field and type visitor interfaces are used to make it easier to visit this subset of the trace hierarchy. This will be useful to implement the listing of event fields through liblttng-ctl, for example. In the short term, these classes will be used to implement the serialization of the layout descriptions of CTF 1.8 and 2. Change-Id: I6d99f0ec93082259bf64434c440a720ed9a49bf8 Signed-off-by: Jérémie Galarneau ---