int lttng_desc_match_enabler(const struct lttng_kernel_event_desc *desc,
struct lttng_event_enabler_common *enabler);
+bool lttng_event_enabler_match_event(struct lttng_event_enabler_common *event_enabler,
+ struct lttng_kernel_event_common *event);
+bool lttng_event_enabler_desc_match_event(struct lttng_event_enabler_common *event_enabler,
+ const struct lttng_kernel_event_desc *desc,
+ struct lttng_kernel_event_common *event);
void lttng_enabler_link_bytecode(const struct lttng_kernel_event_desc *event_desc,
struct lttng_kernel_ctx *ctx,
}
}
-static
bool lttng_event_enabler_match_event(struct lttng_event_enabler_common *event_enabler,
struct lttng_kernel_event_common *event)
{
}
}
-static
bool lttng_event_enabler_desc_match_event(struct lttng_event_enabler_common *event_enabler,
const struct lttng_kernel_event_desc *desc,
struct lttng_kernel_event_common *event)
enum sc_type type)
{
struct lttng_event_ht *events_ht = lttng_get_event_ht_from_enabler(&syscall_event_enabler->parent);
- struct lttng_kernel_syscall_table *syscall_table = get_syscall_table_from_enabler(&syscall_event_enabler->parent);
struct lttng_kernel_channel_buffer *chan = syscall_event_enabler->chan;
unsigned int i;
*/
head = utils_borrow_hash_table_bucket(events_ht->table, LTTNG_EVENT_HT_SIZE, desc->event_name);
lttng_hlist_for_each_entry(event_priv, head, hlist_node) {
- if (event_priv->desc == desc
- && get_syscall_table_from_event(event_priv->pub) == syscall_table)
+ if (lttng_event_enabler_desc_match_event(&syscall_event_enabler->parent, desc, event_priv->pub))
found = true;
}
if (found)
*/
head = utils_borrow_hash_table_bucket(events_ht->table, LTTNG_EVENT_HT_SIZE, desc->event_name);
lttng_hlist_for_each_entry(event_priv, head, hlist_node) {
- if (event_priv->desc == desc &&
- event_priv->user_token == base_enabler->user_token)
+ if (lttng_event_enabler_desc_match_event(base_enabler, desc, event_priv->pub))
found = true;
}
if (found)
*/
head = utils_borrow_hash_table_bucket(events_ht->table, LTTNG_EVENT_HT_SIZE, desc->event_name);
lttng_hlist_for_each_entry(event_priv, head, hlist_node) {
- if (event_priv->desc == desc
- && event_priv->user_token == syscall_event_notifier_enabler->parent.user_token)
+ if (lttng_event_enabler_desc_match_event(&syscall_event_notifier_enabler->parent, desc, event_priv->pub))
found = 1;
}
if (found)