X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Ftrace-ust.c;h=906f916a91b51ceb1b075ff172ef14281583a577;hp=9ec6e43b0baa8bae6c8d4602cd94743148787977;hb=2106efa08d11229241a114d1d71635a02006690e;hpb=4a180d9f41bd4d369745c6e6f5066a6c281cca1c diff --git a/src/bin/lttng-sessiond/trace-ust.c b/src/bin/lttng-sessiond/trace-ust.c index 9ec6e43b0..906f916a9 100644 --- a/src/bin/lttng-sessiond/trace-ust.c +++ b/src/bin/lttng-sessiond/trace-ust.c @@ -71,12 +71,14 @@ int trace_ust_ht_match_event(struct cds_lfht_node *node, const void *_key) { struct ltt_ust_event *event; const struct ltt_ust_ht_key *key; + int ev_loglevel_value; assert(node); assert(_key); event = caa_container_of(node, struct ltt_ust_event, node.node); key = _key; + ev_loglevel_value = event->attr.loglevel; /* Match the 4 elements of the key: name, filter, loglevel, exclusions. */ @@ -86,9 +88,9 @@ int trace_ust_ht_match_event(struct cds_lfht_node *node, const void *_key) } /* Event loglevel. */ - if (event->attr.loglevel != key->loglevel) { + if (ev_loglevel_value != key->loglevel_type) { if (event->attr.loglevel_type == LTTNG_UST_LOGLEVEL_ALL - && key->loglevel == 0 && event->attr.loglevel == -1) { + && key->loglevel_type == 0 && ev_loglevel_value == -1) { /* * Match is accepted. This is because on event creation, the * loglevel is set to -1 if the event loglevel type is ALL so 0 and @@ -171,8 +173,8 @@ error: * MUST be acquired before calling this. */ struct ltt_ust_event *trace_ust_find_event(struct lttng_ht *ht, - char *name, struct lttng_filter_bytecode *filter, int loglevel, - struct lttng_event_exclusion *exclusion) + char *name, struct lttng_filter_bytecode *filter, + int loglevel_value, struct lttng_event_exclusion *exclusion) { struct lttng_ht_node_str *node; struct lttng_ht_iter iter; @@ -183,7 +185,7 @@ struct ltt_ust_event *trace_ust_find_event(struct lttng_ht *ht, key.name = name; key.filter = filter; - key.loglevel = loglevel; + key.loglevel_type = loglevel_value; key.exclusion = exclusion; cds_lfht_lookup(ht->ht, ht->hash_fct((void *) name, lttng_ht_seed),