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)
commite69abdfd4d92f4a360bf31bdd9d1951e8cb540a6
treec1654d52103ab99e7d96d304c1d7741b8eb20f3c
parent325e5da6887a15def6121f538c48d9ed5c362bae
Introduce struct lttng_kernel_tracepoint_class, enum probe_desc field

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
include/lttng/events.h
include/lttng/tracepoint-event-impl.h
src/lttng-bytecode-specialize.c
src/lttng-bytecode.c
src/lttng-events.c
src/probes/lttng-kprobes.c
src/probes/lttng-kretprobes.c
src/probes/lttng-uprobes.c
This page took 0.027002 seconds and 4 git commands to generate.