Introduce struct lttng_kernel_tracepoint_class, enum probe_desc field
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 6 May 2021 15:48:42 +0000 (11:48 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 6 May 2021 17:51:31 +0000 (13:51 -0400)
Introduce struct lttng_kernel_tracepoint_class to clearly split the
event instance from the class, thus allowing the event instance to refer
to the class through a single symbol. This removes the need to rely on
ARRAY_SIZE() to calculate the size of the event field array (part of the
class) from within the event instance. This refactoring opens the door
to have event class and instance not only in different providers, but
also in providers emitted within different compile units and shared
objects in the future.

While refactoring kprobes, uprobes and kretprobes code, there is a lot
of dynamically allocated memory which can be turned into static data
structures for tp_class, fields and types. This simplification ends up
fixing a few memory leaks as well.

Introduce a probe_desc field in the enumeration descriptor to keep the
same pattern for both tp_class and enumerations.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I221ad33383de48144d0d14b2b461ecb38dfb54ab


No differences found
This page took 0.032292 seconds and 4 git commands to generate.