Implement capturing payload on event notifiers
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Mon, 6 Apr 2020 18:59:08 +0000 (14:59 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 26 Nov 2020 18:40:02 +0000 (13:40 -0500)
This commit allows the user to request a subset of payload fields of the
tracepoint to be captured when a event notifier is fired and sent back
the session daemon as part of the notification.

Captures are really similar to filter in the way they work. Like with
filters, the sessiond attaches to a event notifier one bytecode program
per field it wants to capture using the following function:

  int ustctl_set_capture(int sock, struct lttng_ust_capture_bytecode *bytecode,
         struct lttng_ust_object_data *obj_data);

The capture bytecode program is then validated and specialized for its
target tracepoint just like filter bytecode programs.

The major difference between filters and captures is with what they
return. Filters can only return _RECORD or _DISCARD for match and
no-match respectively. Captures also need to return captured values. For
this reason, we added an output parameter to the capture interpreter
function that value can be extracted.

Here is the signature of the capture interpreter function:
  uint64_t lttng_bytecode_capture_interpret(void *capture_data,
         const char *capture_stack_data,
         void *output)

When comes the time to send the notification, every capture bytecode
program is executed in turns and its output value is recorded to the
capture buffer to be sent back to the sessiond.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ia3023a4f5c0aec014b37b72f92d1a924c7eff6a2


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