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;
/* Unknown syscall */
continue;
}
- if (lttng_desc_match_enabler(desc,
- lttng_event_recorder_enabler_as_enabler(syscall_event_enabler)) <= 0)
+ if (!lttng_desc_match_enabler(desc,
+ lttng_event_recorder_enabler_as_enabler(syscall_event_enabler)))
continue;
/*
* Check if already created.
*/
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)
return 0;
}
+void lttng_syscall_table_set_wildcard_all(struct lttng_event_enabler_common *event_enabler)
+{
+ struct lttng_kernel_syscall_table *syscall_table = get_syscall_table_from_enabler(event_enabler);
+ enum lttng_kernel_abi_syscall_entryexit entryexit;
+ int enabled = event_enabler->enabled;
+
+ if (event_enabler->event_param.instrumentation != LTTNG_KERNEL_ABI_SYSCALL)
+ return;
+ if (event_enabler->event_param.u.syscall.abi != LTTNG_KERNEL_ABI_SYSCALL_ABI_ALL)
+ return;
+ if (event_enabler->event_param.u.syscall.match != LTTNG_KERNEL_ABI_SYSCALL_MATCH_NAME)
+ return;
+ if (strcmp(event_enabler->event_param.name, "*"))
+ return;
+
+ entryexit = event_enabler->event_param.u.syscall.entryexit;
+ if (entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRY || entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT)
+ WRITE_ONCE(syscall_table->syscall_all_entry, enabled);
+
+ if (entryexit == LTTNG_KERNEL_ABI_SYSCALL_EXIT || entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT)
+ WRITE_ONCE(syscall_table->syscall_all_exit, enabled);
+}
+
static
const struct trace_syscall_entry *syscall_list_get_entry(loff_t *pos)
{