Generate capture bytecode on trigger reception
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Thu, 9 Apr 2020 00:03:06 +0000 (20:03 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 11 Mar 2021 20:31:53 +0000 (15:31 -0500)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ibf86096bd17be078cfc5e8bcd82347797389d448
Depends-on: lttng-ust: I5a800fc92e588c2a6a0e26282b0ad5f31c044479

src/common/trigger.c

index 04b3e7f116bc7ba667c96b8570c1621e2a09930e..71162e79bad63154b070b323ef75560ae89a72aa 100644 (file)
@@ -7,10 +7,12 @@
 
 #include <lttng/trigger/trigger-internal.h>
 #include <lttng/condition/condition-internal.h>
+#include <lttng/condition/event-rule-internal.h>
 #include <lttng/condition/event-rule.h>
 #include <lttng/condition/event-rule-internal.h>
 #include <lttng/condition/buffer-usage.h>
 #include <lttng/event-rule/event-rule-internal.h>
+#include <lttng/event-expr-internal.h>
 #include <lttng/action/action-internal.h>
 #include <common/credentials.h>
 #include <common/payload.h>
@@ -955,12 +957,21 @@ enum lttng_error_code lttng_trigger_generate_bytecode(
                                        condition, &event_rule);
 
                assert(condition_status == LTTNG_CONDITION_STATUS_OK);
+
+               /* Generate the filter bytecode. */
                ret = lttng_event_rule_generate_filter_bytecode(
                                event_rule, creds);
                if (ret != LTTNG_OK) {
                        goto end;
                }
 
+               /* Generate the capture bytecode. */
+               ret = lttng_condition_event_rule_generate_capture_descriptor_bytecode(
+                               condition);
+               if (ret != LTTNG_OK) {
+                       goto end;
+               }
+
                ret = LTTNG_OK;
                break;
        }
This page took 0.034632 seconds and 4 git commands to generate.