X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-syscalls.c;h=2ddc9d1227c862305036344a607946aabdbc2de4;hb=33a39a3cd074931ab3a2eaff6eb8807091cf8172;hp=ee09a0419498a07f0dc06a0bb0f56afcc8a3771a;hpb=3c9970797850893aaf1b9019d21868d73580e17d;p=lttng-modules.git diff --git a/lttng-syscalls.c b/lttng-syscalls.c index ee09a041..2ddc9d12 100644 --- a/lttng-syscalls.c +++ b/lttng-syscalls.c @@ -666,7 +666,10 @@ void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret) } } -/* noinline to diminish caller stack size */ +/* + * noinline to diminish caller stack size. + * Should be called with sessions lock held. + */ static int fill_table(const struct trace_syscall_entry *table, size_t table_len, struct lttng_event **chan_table, struct lttng_channel *chan, @@ -715,8 +718,8 @@ int fill_table(const struct trace_syscall_entry *table, size_t table_len, strncat(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN - strlen(ev.name) - 1); ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0'; - ev.instrumentation = LTTNG_KERNEL_NOOP; - chan_table[i] = lttng_event_create(chan, &ev, filter, + ev.instrumentation = LTTNG_KERNEL_SYSCALL; + chan_table[i] = _lttng_event_create(chan, &ev, filter, desc, ev.instrumentation); WARN_ON_ONCE(!chan_table[i]); if (IS_ERR(chan_table[i])) { @@ -732,6 +735,9 @@ int fill_table(const struct trace_syscall_entry *table, size_t table_len, return 0; } +/* + * Should be called with sessions lock held. + */ int lttng_syscalls_register(struct lttng_channel *chan, void *filter) { struct lttng_kernel_event ev; @@ -779,8 +785,8 @@ int lttng_syscalls_register(struct lttng_channel *chan, void *filter) memset(&ev, 0, sizeof(ev)); strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN); ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0'; - ev.instrumentation = LTTNG_KERNEL_NOOP; - chan->sc_unknown = lttng_event_create(chan, &ev, filter, + ev.instrumentation = LTTNG_KERNEL_SYSCALL; + chan->sc_unknown = _lttng_event_create(chan, &ev, filter, desc, ev.instrumentation); WARN_ON_ONCE(!chan->sc_unknown); @@ -796,8 +802,8 @@ int lttng_syscalls_register(struct lttng_channel *chan, void *filter) memset(&ev, 0, sizeof(ev)); strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN); ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0'; - ev.instrumentation = LTTNG_KERNEL_NOOP; - chan->sc_compat_unknown = lttng_event_create(chan, &ev, filter, + ev.instrumentation = LTTNG_KERNEL_SYSCALL; + chan->sc_compat_unknown = _lttng_event_create(chan, &ev, filter, desc, ev.instrumentation); WARN_ON_ONCE(!chan->sc_unknown); @@ -813,8 +819,8 @@ int lttng_syscalls_register(struct lttng_channel *chan, void *filter) memset(&ev, 0, sizeof(ev)); strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN); ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0'; - ev.instrumentation = LTTNG_KERNEL_NOOP; - chan->compat_sc_exit_unknown = lttng_event_create(chan, &ev, + ev.instrumentation = LTTNG_KERNEL_SYSCALL; + chan->compat_sc_exit_unknown = _lttng_event_create(chan, &ev, filter, desc, ev.instrumentation); WARN_ON_ONCE(!chan->compat_sc_exit_unknown); @@ -830,8 +836,8 @@ int lttng_syscalls_register(struct lttng_channel *chan, void *filter) memset(&ev, 0, sizeof(ev)); strncpy(ev.name, desc->name, LTTNG_KERNEL_SYM_NAME_LEN); ev.name[LTTNG_KERNEL_SYM_NAME_LEN - 1] = '\0'; - ev.instrumentation = LTTNG_KERNEL_NOOP; - chan->sc_exit_unknown = lttng_event_create(chan, &ev, filter, + ev.instrumentation = LTTNG_KERNEL_SYSCALL; + chan->sc_exit_unknown = _lttng_event_create(chan, &ev, filter, desc, ev.instrumentation); WARN_ON_ONCE(!chan->sc_exit_unknown); if (IS_ERR(chan->sc_exit_unknown)) {