Add `interpreter_funcs` to `lttng_bytecode_runtime`
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 13 May 2020 14:32:26 +0000 (10:32 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 25 Nov 2020 18:15:26 +0000 (13:15 -0500)
commit3d650c7b255a7aa43cae96904f0c229a129d39be
treee3cdf1d75b3c6ff09794a84adf839f0fc78cb8d3
parent0b365677b4b159fa9aa2b98eb19f10f4a762fbe8
Add `interpreter_funcs` to `lttng_bytecode_runtime`

Background
==========
The current filter interpreter function signature looks like this:

uint64_t lttng_bytecode_filter_interpret(void *filter_data,
              const char *filter_stack_data);

The upcoming capture interpreter function will need an output parameter
to extract the top of stack register. It will look like this:

uint64_t lttng_bytecode_capture_interpret(void *filter_data,
              const char *filter_stack_data, struct output_register *output);

Problems
========
We can't reuse the same function pointer field in `struct
lttng_bytecode_runtime` as both interpreter functions will have
different signatures.

We can't change the signature of this existing filter function because
it's used in the tracepoint probes.

Solution
========
Add a union of callbacks to hold both interpreter functions. This also
doesn't change the layout of the `struct lttng_bytecode_runtime`
objects.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ic4423100e1f97654fe43c0927d3b81de2d1d724f
include/lttng/events.h
include/lttng/tracepoint-event-impl.h
src/lttng-bytecode.c
This page took 0.025802 seconds and 4 git commands to generate.