X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=include%2Flttng%2Ftrigger%2Ftrigger-internal.h;h=c5ee9c64b4c1db9642251417fa812f3e18a9a68d;hb=e45dd625d3e802d8e6e2ec3de180c73546e8f9fe;hp=21c269befd14b78b26c2aaa3496ed6600d43cf1a;hpb=b61776fb63d4bb14df77c0b5a15de28beed7ddfc;p=lttng-tools.git diff --git a/include/lttng/trigger/trigger-internal.h b/include/lttng/trigger/trigger-internal.h index 21c269bef..c5ee9c64b 100644 --- a/include/lttng/trigger/trigger-internal.h +++ b/include/lttng/trigger/trigger-internal.h @@ -30,11 +30,6 @@ struct lttng_trigger { char *name; /* For now only the uid portion of the credentials is used. */ struct lttng_credentials creds; - struct { - enum lttng_trigger_firing_policy type; - uint64_t threshold; - uint64_t current_count; - } firing_policy; /* * Internal use only. * The unique token passed to the tracer to identify an event-rule @@ -60,10 +55,6 @@ struct lttng_trigger_comm { uint32_t length; /* Includes '\0' terminator. */ uint32_t name_length; - /* Firing policy. */ - /* Maps to enum lttng_trigger_firing_policy. */ - uint8_t firing_policy_type; - uint64_t firing_policy_threshold; /* A null-terminated name, a condition, and an action follow. */ char payload[]; } LTTNG_PACKED; @@ -162,20 +153,6 @@ LTTNG_HIDDEN void lttng_trigger_set_credentials(struct lttng_trigger *trigger, const struct lttng_credentials *creds); - -/* - * Fire the trigger. - * Increments the occurrence count. - */ -LTTNG_HIDDEN -void lttng_trigger_fire(struct lttng_trigger *trigger); - -/* - * Check if the trigger would fire. - */ -LTTNG_HIDDEN -bool lttng_trigger_should_fire(const struct lttng_trigger *trigger); - /* * Return the type of any underlying domain restriction. If no particular * requirement is present, returns LTTNG_DOMAIN_NONE. @@ -196,4 +173,13 @@ enum lttng_error_code lttng_trigger_generate_bytecode( LTTNG_HIDDEN struct lttng_trigger *lttng_trigger_copy(const struct lttng_trigger *trigger); +/* + * A given trigger needs a tracer notifier if + * it has an event-rule condition, + * AND + * it has one or more sessiond-execution action. + */ +LTTNG_HIDDEN +bool lttng_trigger_needs_tracer_notifier(const struct lttng_trigger *trigger); + #endif /* LTTNG_TRIGGER_INTERNAL_H */