Add `interpreter_funcs` to `lttng_bytecode_runtime`
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Mon, 27 Apr 2020 19:11:38 +0000 (15:11 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 26 Nov 2020 18:36:07 +0000 (13:36 -0500)
commitc42416df21bb28b9b19ca509f7242f660c5469b2
tree7384e91afc8168a7185480ec40856e712a0c3eb6
parent4d451c15c1e519f108b1b6d01fbda2c6975a2a3b
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 *capture_data,
                  const char *capture_stack_data,
                  struct output_register *output);

Problems
========
We can't reuse the same function pointer field in `struct
lttng_bytecode_runtime` as the two 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: I9fcd6def9ce7783087b9648ddbf5ec71fb7b997a
include/lttng/ust-events.h
include/lttng/ust-tracepoint-event.h
liblttng-ust/lttng-bytecode.c
This page took 0.027581 seconds and 4 git commands to generate.