X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Flttng-syscalls.c;h=d26dd83fc15763b5ecbc5970ad5c29c3bc66d186;hb=756a020cce15ab4ae515051c469437713ad6515d;hp=2c3b8af028b609a2839423c4f253168098f1511b;hpb=adfdce76604f5324d88fd888fa5236a3bacf056f;p=lttng-modules.git diff --git a/src/lttng-syscalls.c b/src/lttng-syscalls.c index 2c3b8af0..d26dd83f 100644 --- a/src/lttng-syscalls.c +++ b/src/lttng-syscalls.c @@ -554,8 +554,8 @@ int lttng_create_syscall_event_if_missing(const struct trace_syscall_entry *tabl /* 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. @@ -1397,6 +1397,29 @@ int lttng_syscall_filter_disable_event(struct lttng_kernel_event_common *event) 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) {