Make captured field values available to event rule cond. evaluation
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 1 May 2020 20:33:26 +0000 (16:33 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 16 Mar 2021 20:40:01 +0000 (16:40 -0400)
commit7c920b632d63ffd82074430d77862176e0fc477c
tree8920b9e4671bf393708dda90a930d180823e591f
parent82b3cbf431e12b5c5f65eaa474d0328fb86ece87
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
include/lttng/condition/evaluation-internal.h
include/lttng/condition/event-rule-internal.h
include/lttng/condition/event-rule.h
include/lttng/event-field-value.h
src/bin/lttng-sessiond/notification-thread-events.c
src/common/conditions/event-rule.c
src/common/evaluation.c
src/common/event-field-value.c
src/common/notification.c
This page took 0.025734 seconds and 4 git commands to generate.