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:46:16 +0000 (13:46 -0400)
commit6c8c025bf7552b6073c5c1884e1493badd842f42
treec1654d52103ab99e7d96d304c1d7741b8eb20f3c
parent485ea7e1c91f7d968239d7dc6123835f2cb2850d
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.026235 seconds and 4 git commands to generate.