X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fevent-rule%2Fuprobe.c;h=67f99c482ec681c4e95d39625e5ca582df41391f;hb=2b00d46244cab86f1186a7b00cdc660f24a26f72;hp=b02332b61c11202780f64511cb690446791d37d4;hpb=58daac01d91347336f24e1fc1cacd4e7a3101e93;p=lttng-tools.git diff --git a/src/common/event-rule/uprobe.c b/src/common/event-rule/uprobe.c index b02332b61..67f99c482 100644 --- a/src/common/event-rule/uprobe.c +++ b/src/common/event-rule/uprobe.c @@ -12,6 +12,8 @@ #include #include #include +#include +#include #include #include #include @@ -153,21 +155,39 @@ static const char *lttng_event_rule_uprobe_get_filter( return NULL; } -static const struct lttng_filter_bytecode * +static const struct lttng_bytecode * lttng_event_rule_uprobe_get_filter_bytecode(const struct lttng_event_rule *rule) { /* Unsupported. */ return NULL; } -static struct lttng_event_exclusion * -lttng_event_rule_uprobe_generate_exclusions(const struct lttng_event_rule *rule) +static enum lttng_event_rule_generate_exclusions_status +lttng_event_rule_uprobe_generate_exclusions(const struct lttng_event_rule *rule, + struct lttng_event_exclusion **exclusions) { /* Unsupported. */ - return NULL; + *exclusions = NULL; + return LTTNG_EVENT_RULE_GENERATE_EXCLUSIONS_STATUS_NONE; +} + +static unsigned long +lttng_event_rule_uprobe_hash( + const struct lttng_event_rule *rule) +{ + unsigned long hash; + struct lttng_event_rule_uprobe *urule = + container_of(rule, typeof(*urule), parent); + + hash = hash_key_ulong((void *) LTTNG_EVENT_RULE_TYPE_UPROBE, + lttng_ht_seed); + hash ^= hash_key_str(urule->name, lttng_ht_seed); + hash ^= lttng_userspace_probe_location_hash(urule->location); + + return hash; } -struct lttng_event_rule *lttng_event_rule_uprobe_create() +struct lttng_event_rule *lttng_event_rule_uprobe_create(void) { struct lttng_event_rule *rule = NULL; struct lttng_event_rule_uprobe *urule; @@ -190,6 +210,7 @@ struct lttng_event_rule *lttng_event_rule_uprobe_create() lttng_event_rule_uprobe_get_filter_bytecode; urule->parent.generate_exclusions = lttng_event_rule_uprobe_generate_exclusions; + urule->parent.hash = lttng_event_rule_uprobe_hash; end: return rule; }