Make captured field values available to event rule cond. evaluation
liblttng-ctl:
Add the public lttng_evaluation_get_captured_values() function.
This function returns an array event field value which contains
the captured field values as requested by the evaluation's
condition's capture descriptors.
This array event field value contains as many elements as returned
by lttng_condition_event_rule_get_capture_descriptor_count() for the
evaluation's condition. However,
lttng_event_field_value_array_get_element_at_index() could return
`LTTNG_EVENT_FIELD_VALUE_STATUS_UNAVAILABLE` for some or all indexes
if there was no such field to capture at tracing time.
Common:
Internally, an event rule evaluation now contains a captured field
value payload (CFVP) as well as the array event field value to be
returned by lttng_evaluation_get_captured_values().
The CFVP is MessagePack-encoded.
When you create an event rule evaluation with
lttng_evaluation_event_rule_create(), you must pass the CFVP as well
as the `decode_capture_payload` option parameter. If
`decode_capture_payload` is `true`,
lttng_evaluation_event_rule_create() creates the array event field
value from the CFVP thanks to msgpack-c.
lttng_evaluation_event_rule_create() also accepts the event rule
condition now because it relies on the capture descriptors to create
the event field values if `decode_capture_payload` is `true`.
When an event rule evaluation is serialized:
Only its CFVP is serialized (as is).
When an event rule evaluation is deserialized:
lttng_evaluation_event_rule_create() is called with the
`decode_capture_payload` parameter set to `true`.
Session daemon:
action_executor_notify_handler() calls
lttng_evaluation_event_rule_create() with the
`decode_capture_payload` parameter set to `false` to send the
evaluation to the clients with the CFVP.
This CFVP directly comes from the tracer.
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ib2ae39dae005ad555eb8309e0bfd53f746d5e8dd
Depends-on: lttng-ust: I8423c510bf6af2f9bf85256e8d6f931d36f7054b
This page took 0.028917 seconds and 4 git commands to generate.