X-Git-Url: http://git.lttng.org/?p=lttng-modules.git;a=blobdiff_plain;f=src%2Flttng-bytecode.c;h=5702929bd4a44fe9c95dd49ef2f324452c47e0ec;hp=5b6cb1171b43b9cea3266114c36853c80ae18131;hb=99d223adfae9b68800e91bda470c92acb14efae6;hpb=608ab495d4e0beff75f47df2b3a19d7bced0c571 diff --git a/src/lttng-bytecode.c b/src/lttng-bytecode.c index 5b6cb117..5702929b 100644 --- a/src/lttng-bytecode.c +++ b/src/lttng-bytecode.c @@ -457,6 +457,9 @@ int link_bytecode(const struct lttng_event_desc *event_desc, case LTTNG_BYTECODE_NODE_TYPE_FILTER: runtime->p.interpreter_funcs.filter = lttng_bytecode_filter_interpret; break; + case LTTNG_BYTECODE_NODE_TYPE_CAPTURE: + runtime->p.interpreter_funcs.capture = lttng_bytecode_capture_interpret_false; + break; default: WARN_ON(1); } @@ -472,6 +475,9 @@ link_error: case LTTNG_BYTECODE_NODE_TYPE_FILTER: runtime->p.interpreter_funcs.filter = lttng_bytecode_filter_interpret_false; break; + case LTTNG_BYTECODE_NODE_TYPE_CAPTURE: + runtime->p.interpreter_funcs.capture = lttng_bytecode_capture_interpret_false; + break; default: WARN_ON(1); } @@ -492,10 +498,20 @@ void lttng_bytecode_filter_sync_state(struct lttng_bytecode_runtime *runtime) runtime->interpreter_funcs.filter = lttng_bytecode_filter_interpret; } +void lttng_bytecode_capture_sync_state(struct lttng_bytecode_runtime *runtime) +{ + struct lttng_bytecode_node *bc = runtime->bc; + + if (!bc->enabler->enabled || runtime->link_failed) + runtime->interpreter_funcs.capture = lttng_bytecode_capture_interpret_false; + else + runtime->interpreter_funcs.capture = lttng_bytecode_capture_interpret; +} + /* - * Given the lists of bytecode programs of an instance (trigger or event) and - * of a matching enabler, try to link all the enabler's bytecode programs with - * the instance. + * Given the lists of bytecode programs of an instance (event or event + * notifier) and of a matching enabler, try to link all the enabler's bytecode + * programs with the instance. * * This function is called after we confirmed that name enabler and the * instance are matching names (or glob pattern matching).