summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9de6719)
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Ia1c3cf01d82681dfc77c2786ab58259085d349c8
#define UNKNOWN_SYSCALL_NRARGS 6
#undef TP_PROBE_CB
#define UNKNOWN_SYSCALL_NRARGS 6
#undef TP_PROBE_CB
-#define TP_PROBE_CB(_template) &syscall_entry_probe
+#define TP_PROBE_CB(_template) &syscall_entry_event_probe
LTTNG_TRACEPOINT_EVENT(syscall_entry_unknown,
TP_PROTO(int id, unsigned long *args),
LTTNG_TRACEPOINT_EVENT(syscall_entry_unknown,
TP_PROTO(int id, unsigned long *args),
-#define TP_PROBE_CB(_template) &syscall_exit_probe
+#define TP_PROBE_CB(_template) &syscall_exit_event_probe
LTTNG_TRACEPOINT_EVENT(syscall_exit_unknown,
TP_PROTO(int id, long ret, unsigned long *args),
LTTNG_TRACEPOINT_EVENT(syscall_exit_unknown,
TP_PROTO(int id, long ret, unsigned long *args),
void lttng_clock_unref(void);
#if defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS)
void lttng_clock_unref(void);
#if defined(CONFIG_HAVE_SYSCALL_TRACEPOINTS)
-int lttng_syscalls_register(struct lttng_channel *chan, void *filter);
-int lttng_syscalls_unregister(struct lttng_channel *chan);
-int lttng_syscalls_destroy(struct lttng_channel *chan);
-int lttng_syscall_filter_enable(struct lttng_channel *chan,
+int lttng_syscalls_register_event(struct lttng_channel *chan, void *filter);
+int lttng_syscalls_unregister_event(struct lttng_channel *chan);
+int lttng_syscalls_destroy_event(struct lttng_channel *chan);
+int lttng_syscall_filter_enable_event(struct lttng_channel *chan,
struct lttng_event *event);
struct lttng_event *event);
-int lttng_syscall_filter_disable(struct lttng_channel *chan,
+int lttng_syscall_filter_disable_event(struct lttng_channel *chan,
struct lttng_event *event);
long lttng_channel_syscall_mask(struct lttng_channel *channel,
struct lttng_kernel_syscall_mask __user *usyscall_mask);
struct lttng_event *event);
long lttng_channel_syscall_mask(struct lttng_channel *channel,
struct lttng_kernel_syscall_mask __user *usyscall_mask);
-static inline int lttng_syscalls_register(struct lttng_channel *chan, void *filter)
+static inline int lttng_syscalls_register_event(
+ struct lttng_channel *chan, void *filter)
-static inline int lttng_syscalls_unregister(struct lttng_channel *chan)
+static inline int lttng_syscalls_unregister_event(struct lttng_channel *chan)
-static inline int lttng_syscall_filter_enable(struct lttng_channel *chan,
+static inline int lttng_syscall_filter_enable_event(struct lttng_channel *chan,
struct lttng_event *event);
{
return -ENOSYS;
}
struct lttng_event *event);
{
return -ENOSYS;
}
-static inline int lttng_syscall_filter_disable(struct lttng_channel *chan,
+static inline int lttng_syscall_filter_disable_event(struct lttng_channel *chan,
struct lttng_event *event);
{
return -ENOSYS;
struct lttng_event *event);
{
return -ENOSYS;
mutex_lock(&sessions_mutex);
WRITE_ONCE(session->active, 0);
list_for_each_entry(chan, &session->chan, list) {
mutex_lock(&sessions_mutex);
WRITE_ONCE(session->active, 0);
list_for_each_entry(chan, &session->chan, list) {
- ret = lttng_syscalls_unregister(chan);
+ ret = lttng_syscalls_unregister_event(chan);
WARN_ON(ret);
}
list_for_each_entry(event, &session->events, list) {
WARN_ON(ret);
}
list_for_each_entry(event, &session->events, list) {
}
synchronize_trace(); /* Wait for in-flight events to complete */
list_for_each_entry(chan, &session->chan, list) {
}
synchronize_trace(); /* Wait for in-flight events to complete */
list_for_each_entry(chan, &session->chan, list) {
- ret = lttng_syscalls_destroy(chan);
+ ret = lttng_syscalls_destroy_event(chan);
WARN_ON(ret);
}
list_for_each_entry_safe(event_enabler, tmp_event_enabler,
WARN_ON(ret);
}
list_for_each_entry_safe(event_enabler, tmp_event_enabler,
event);
break;
case LTTNG_KERNEL_SYSCALL:
event);
break;
case LTTNG_KERNEL_SYSCALL:
- ret = lttng_syscall_filter_enable(event->chan, event);
+ ret = lttng_syscall_filter_enable_event(event->chan, event);
break;
case LTTNG_KERNEL_KPROBE:
case LTTNG_KERNEL_UPROBE:
break;
case LTTNG_KERNEL_KPROBE:
case LTTNG_KERNEL_UPROBE:
ret = 0;
break;
case LTTNG_KERNEL_SYSCALL:
ret = 0;
break;
case LTTNG_KERNEL_SYSCALL:
- ret = lttng_syscall_filter_disable(event->chan, event);
+ ret = lttng_syscall_filter_disable_event(event->chan, event);
break;
case LTTNG_KERNEL_NOOP:
ret = 0;
break;
case LTTNG_KERNEL_NOOP:
ret = 0;
- ret = lttng_syscalls_register(event_enabler->chan, NULL);
+ ret = lttng_syscalls_register_event(event_enabler->chan, NULL);
#define COMPAT_SYSCALL_EXIT_STR __stringify(COMPAT_SYSCALL_EXIT_TOK)
static
#define COMPAT_SYSCALL_EXIT_STR __stringify(COMPAT_SYSCALL_EXIT_TOK)
static
-void syscall_entry_probe(void *__data, struct pt_regs *regs, long id);
+void syscall_entry_event_probe(void *__data, struct pt_regs *regs, long id);
-void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret);
+void syscall_exit_event_probe(void *__data, struct pt_regs *regs, long ret);
/*
* Forward declarations for old kernels.
/*
* Forward declarations for old kernels.
/* Hijack probe callback for system call enter */
#undef TP_PROBE_CB
/* Hijack probe callback for system call enter */
#undef TP_PROBE_CB
-#define TP_PROBE_CB(_template) &syscall_entry_probe
+#define TP_PROBE_CB(_template) &syscall_entry_event_probe
#define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \
LTTNG_TRACEPOINT_EVENT(syscall_entry_##_name, PARAMS(_proto), PARAMS(_args), \
PARAMS(_fields))
#define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \
LTTNG_TRACEPOINT_EVENT(syscall_entry_##_name, PARAMS(_proto), PARAMS(_args), \
PARAMS(_fields))
#undef _TRACE_SYSCALLS_POINTERS_H
/* Hijack probe callback for compat system call enter */
#undef _TRACE_SYSCALLS_POINTERS_H
/* Hijack probe callback for compat system call enter */
-#define TP_PROBE_CB(_template) &syscall_entry_probe
+#define TP_PROBE_CB(_template) &syscall_entry_event_probe
#define LTTNG_SC_COMPAT
#define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \
LTTNG_TRACEPOINT_EVENT(compat_syscall_entry_##_name, PARAMS(_proto), PARAMS(_args), \
#define LTTNG_SC_COMPAT
#define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \
LTTNG_TRACEPOINT_EVENT(compat_syscall_entry_##_name, PARAMS(_proto), PARAMS(_args), \
#define sc_inout(...) __VA_ARGS__
/* Hijack probe callback for system call exit */
#define sc_inout(...) __VA_ARGS__
/* Hijack probe callback for system call exit */
-#define TP_PROBE_CB(_template) &syscall_exit_probe
+#define TP_PROBE_CB(_template) &syscall_exit_event_probe
#define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \
LTTNG_TRACEPOINT_EVENT(syscall_exit_##_name, PARAMS(_proto), PARAMS(_args), \
PARAMS(_fields))
#define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \
LTTNG_TRACEPOINT_EVENT(syscall_exit_##_name, PARAMS(_proto), PARAMS(_args), \
PARAMS(_fields))
/* Hijack probe callback for compat system call exit */
/* Hijack probe callback for compat system call exit */
-#define TP_PROBE_CB(_template) &syscall_exit_probe
+#define TP_PROBE_CB(_template) &syscall_exit_event_probe
#define LTTNG_SC_COMPAT
#define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \
LTTNG_TRACEPOINT_EVENT(compat_syscall_exit_##_name, PARAMS(_proto), PARAMS(_args), \
#define LTTNG_SC_COMPAT
#define SC_LTTNG_TRACEPOINT_EVENT(_name, _proto, _args, _fields) \
LTTNG_TRACEPOINT_EVENT(compat_syscall_exit_##_name, PARAMS(_proto), PARAMS(_args), \
#undef CREATE_TRACE_POINTS
struct trace_syscall_entry {
#undef CREATE_TRACE_POINTS
struct trace_syscall_entry {
const struct lttng_event_desc *desc;
const struct lttng_event_field *fields;
unsigned int nrargs;
const struct lttng_event_desc *desc;
const struct lttng_event_field *fields;
unsigned int nrargs;
#undef TRACE_SYSCALL_TABLE
#define TRACE_SYSCALL_TABLE(_template, _name, _nr, _nrargs) \
[ _nr ] = { \
#undef TRACE_SYSCALL_TABLE
#define TRACE_SYSCALL_TABLE(_template, _name, _nr, _nrargs) \
[ _nr ] = { \
- .func = __event_probe__syscall_entry_##_template, \
+ .event_func = __event_probe__syscall_entry_##_template, \
.nrargs = (_nrargs), \
.fields = __event_fields___syscall_entry_##_template, \
.desc = &__event_desc___syscall_entry_##_name, \
},
.nrargs = (_nrargs), \
.fields = __event_fields___syscall_entry_##_template, \
.desc = &__event_desc___syscall_entry_##_name, \
},
-/* Syscall enter tracing table */
+/* Event syscall enter tracing table */
static const struct trace_syscall_entry sc_table[] = {
#include <instrumentation/syscalls/headers/syscalls_integers.h>
#include <instrumentation/syscalls/headers/syscalls_pointers.h>
static const struct trace_syscall_entry sc_table[] = {
#include <instrumentation/syscalls/headers/syscalls_integers.h>
#include <instrumentation/syscalls/headers/syscalls_pointers.h>
#undef TRACE_SYSCALL_TABLE
#define TRACE_SYSCALL_TABLE(_template, _name, _nr, _nrargs) \
[ _nr ] = { \
#undef TRACE_SYSCALL_TABLE
#define TRACE_SYSCALL_TABLE(_template, _name, _nr, _nrargs) \
[ _nr ] = { \
- .func = __event_probe__compat_syscall_entry_##_template, \
+ .event_func = __event_probe__compat_syscall_entry_##_template, \
.nrargs = (_nrargs), \
.fields = __event_fields___compat_syscall_entry_##_template, \
.desc = &__event_desc___compat_syscall_entry_##_name, \
},
.nrargs = (_nrargs), \
.fields = __event_fields___compat_syscall_entry_##_template, \
.desc = &__event_desc___compat_syscall_entry_##_name, \
},
-/* Compat syscall enter table */
+/* Event compat syscall enter table */
const struct trace_syscall_entry compat_sc_table[] = {
#include <instrumentation/syscalls/headers/compat_syscalls_integers.h>
#include <instrumentation/syscalls/headers/compat_syscalls_pointers.h>
const struct trace_syscall_entry compat_sc_table[] = {
#include <instrumentation/syscalls/headers/compat_syscalls_integers.h>
#include <instrumentation/syscalls/headers/compat_syscalls_pointers.h>
#undef TRACE_SYSCALL_TABLE
#define TRACE_SYSCALL_TABLE(_template, _name, _nr, _nrargs) \
[ _nr ] = { \
#undef TRACE_SYSCALL_TABLE
#define TRACE_SYSCALL_TABLE(_template, _name, _nr, _nrargs) \
[ _nr ] = { \
- .func = __event_probe__syscall_exit_##_template, \
+ .event_func = __event_probe__syscall_exit_##_template, \
.nrargs = (_nrargs), \
.fields = __event_fields___syscall_exit_##_template, \
.desc = &__event_desc___syscall_exit_##_name, \
},
.nrargs = (_nrargs), \
.fields = __event_fields___syscall_exit_##_template, \
.desc = &__event_desc___syscall_exit_##_name, \
},
-/* Syscall exit table */
+/* Event syscall exit table */
static const struct trace_syscall_entry sc_exit_table[] = {
#include <instrumentation/syscalls/headers/syscalls_integers.h>
#include <instrumentation/syscalls/headers/syscalls_pointers.h>
static const struct trace_syscall_entry sc_exit_table[] = {
#include <instrumentation/syscalls/headers/syscalls_integers.h>
#include <instrumentation/syscalls/headers/syscalls_pointers.h>
#undef TRACE_SYSCALL_TABLE
#define TRACE_SYSCALL_TABLE(_template, _name, _nr, _nrargs) \
[ _nr ] = { \
#undef TRACE_SYSCALL_TABLE
#define TRACE_SYSCALL_TABLE(_template, _name, _nr, _nrargs) \
[ _nr ] = { \
- .func = __event_probe__compat_syscall_exit_##_template, \
+ .event_func = __event_probe__compat_syscall_exit_##_template, \
.nrargs = (_nrargs), \
.fields = __event_fields___compat_syscall_exit_##_template, \
.desc = &__event_desc___compat_syscall_exit_##_name, \
},
.nrargs = (_nrargs), \
.fields = __event_fields___compat_syscall_exit_##_template, \
.desc = &__event_desc___compat_syscall_exit_##_name, \
},
-/* Compat syscall exit table */
+/* Event compat syscall exit table */
const struct trace_syscall_entry compat_sc_exit_table[] = {
#include <instrumentation/syscalls/headers/compat_syscalls_integers.h>
#include <instrumentation/syscalls/headers/compat_syscalls_pointers.h>
const struct trace_syscall_entry compat_sc_exit_table[] = {
#include <instrumentation/syscalls/headers/compat_syscalls_integers.h>
#include <instrumentation/syscalls/headers/compat_syscalls_pointers.h>
DECLARE_BITMAP(sc_compat_exit, NR_compat_syscalls);
};
DECLARE_BITMAP(sc_compat_exit, NR_compat_syscalls);
};
-static void syscall_entry_unknown(struct lttng_event *event,
+static void syscall_entry_event_unknown(struct lttng_event *event,
struct pt_regs *regs, unsigned int id)
{
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
struct pt_regs *regs, unsigned int id)
{
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
__event_probe__syscall_entry_unknown(event, id, args);
}
__event_probe__syscall_entry_unknown(event, id, args);
}
-void syscall_entry_probe(void *__data, struct pt_regs *regs, long id)
+void syscall_entry_event_probe(void *__data, struct pt_regs *regs, long id)
{
struct lttng_channel *chan = __data;
struct lttng_event *event, *unknown_event;
{
struct lttng_channel *chan = __data;
struct lttng_event *event, *unknown_event;
unknown_event = chan->sc_unknown;
}
if (unlikely(id < 0 || id >= table_len)) {
unknown_event = chan->sc_unknown;
}
if (unlikely(id < 0 || id >= table_len)) {
- syscall_entry_unknown(unknown_event, regs, id);
+ syscall_entry_event_unknown(unknown_event, regs, id);
return;
}
if (unlikely(in_compat_syscall()))
return;
}
if (unlikely(in_compat_syscall()))
else
event = chan->sc_table[id];
if (unlikely(!event)) {
else
event = chan->sc_table[id];
if (unlikely(!event)) {
- syscall_entry_unknown(unknown_event, regs, id);
+ syscall_entry_event_unknown(unknown_event, regs, id);
return;
}
entry = &table[id];
return;
}
entry = &table[id];
switch (entry->nrargs) {
case 0:
{
switch (entry->nrargs) {
case 0:
{
- void (*fptr)(void *__data) = entry->func;
+ void (*fptr)(void *__data) = entry->event_func;
fptr(event);
break;
}
case 1:
{
fptr(event);
break;
}
case 1:
{
- void (*fptr)(void *__data, unsigned long arg0) = entry->func;
+ void (*fptr)(void *__data, unsigned long arg0) = entry->event_func;
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
{
void (*fptr)(void *__data,
unsigned long arg0,
{
void (*fptr)(void *__data,
unsigned long arg0,
- unsigned long arg1) = entry->func;
+ unsigned long arg1) = entry->event_func;
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
void (*fptr)(void *__data,
unsigned long arg0,
unsigned long arg1,
void (*fptr)(void *__data,
unsigned long arg0,
unsigned long arg1,
- unsigned long arg2) = entry->func;
+ unsigned long arg2) = entry->event_func;
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long arg0,
unsigned long arg1,
unsigned long arg2,
unsigned long arg0,
unsigned long arg1,
unsigned long arg2,
- unsigned long arg3) = entry->func;
+ unsigned long arg3) = entry->event_func;
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long arg1,
unsigned long arg2,
unsigned long arg3,
unsigned long arg1,
unsigned long arg2,
unsigned long arg3,
- unsigned long arg4) = entry->func;
+ unsigned long arg4) = entry->event_func;
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long arg2,
unsigned long arg3,
unsigned long arg4,
unsigned long arg2,
unsigned long arg3,
unsigned long arg4,
- unsigned long arg5) = entry->func;
+ unsigned long arg5) = entry->event_func;
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
-static void syscall_exit_unknown(struct lttng_event *event,
+static void syscall_exit_event_unknown(struct lttng_event *event,
struct pt_regs *regs, int id, long ret)
{
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
struct pt_regs *regs, int id, long ret)
{
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
__event_probe__syscall_exit_unknown(event, id, ret, args);
}
__event_probe__syscall_exit_unknown(event, id, ret, args);
}
-void syscall_exit_probe(void *__data, struct pt_regs *regs, long ret)
+void syscall_exit_event_probe(void *__data, struct pt_regs *regs, long ret)
{
struct lttng_channel *chan = __data;
struct lttng_event *event, *unknown_event;
{
struct lttng_channel *chan = __data;
struct lttng_event *event, *unknown_event;
unknown_event = chan->sc_exit_unknown;
}
if (unlikely(id < 0 || id >= table_len)) {
unknown_event = chan->sc_exit_unknown;
}
if (unlikely(id < 0 || id >= table_len)) {
- syscall_exit_unknown(unknown_event, regs, id, ret);
+ syscall_exit_event_unknown(unknown_event, regs, id, ret);
return;
}
if (unlikely(in_compat_syscall()))
return;
}
if (unlikely(in_compat_syscall()))
else
event = chan->sc_exit_table[id];
if (unlikely(!event)) {
else
event = chan->sc_exit_table[id];
if (unlikely(!event)) {
- syscall_exit_unknown(unknown_event, regs, id, ret);
+ syscall_exit_event_unknown(unknown_event, regs, id, ret);
return;
}
entry = &table[id];
return;
}
entry = &table[id];
switch (entry->nrargs) {
case 0:
{
switch (entry->nrargs) {
case 0:
{
- void (*fptr)(void *__data, long ret) = entry->func;
+ void (*fptr)(void *__data, long ret) = entry->event_func;
{
void (*fptr)(void *__data,
long ret,
{
void (*fptr)(void *__data,
long ret,
- unsigned long arg0) = entry->func;
+ unsigned long arg0) = entry->event_func;
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
void (*fptr)(void *__data,
long ret,
unsigned long arg0,
void (*fptr)(void *__data,
long ret,
unsigned long arg0,
- unsigned long arg1) = entry->func;
+ unsigned long arg1) = entry->event_func;
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
long ret,
unsigned long arg0,
unsigned long arg1,
long ret,
unsigned long arg0,
unsigned long arg1,
- unsigned long arg2) = entry->func;
+ unsigned long arg2) = entry->event_func;
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long arg0,
unsigned long arg1,
unsigned long arg2,
unsigned long arg0,
unsigned long arg1,
unsigned long arg2,
- unsigned long arg3) = entry->func;
+ unsigned long arg3) = entry->event_func;
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long arg1,
unsigned long arg2,
unsigned long arg3,
unsigned long arg1,
unsigned long arg2,
unsigned long arg3,
- unsigned long arg4) = entry->func;
+ unsigned long arg4) = entry->event_func;
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long arg2,
unsigned long arg3,
unsigned long arg4,
unsigned long arg2,
unsigned long arg3,
unsigned long arg4,
- unsigned long arg5) = entry->func;
+ unsigned long arg5) = entry->event_func;
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
unsigned long args[LTTNG_SYSCALL_NR_ARGS];
lttng_syscall_get_arguments(current, regs, args);
* Should be called with sessions lock held.
*/
static
* Should be called with sessions lock held.
*/
static
-int fill_table(const struct trace_syscall_entry *table, size_t table_len,
+int fill_event_table(const struct trace_syscall_entry *table, size_t table_len,
struct lttng_event **chan_table, struct lttng_channel *chan,
void *filter, enum sc_type type)
{
struct lttng_event **chan_table, struct lttng_channel *chan,
void *filter, enum sc_type type)
{
/*
* Should be called with sessions lock held.
*/
/*
* Should be called with sessions lock held.
*/
-int lttng_syscalls_register(struct lttng_channel *chan, void *filter)
+int lttng_syscalls_register_event(struct lttng_channel *chan, void *filter)
{
struct lttng_kernel_event ev;
int ret;
{
struct lttng_kernel_event ev;
int ret;
- ret = fill_table(sc_table, ARRAY_SIZE(sc_table),
+ ret = fill_event_table(sc_table, ARRAY_SIZE(sc_table),
chan->sc_table, chan, filter, SC_TYPE_ENTRY);
if (ret)
return ret;
chan->sc_table, chan, filter, SC_TYPE_ENTRY);
if (ret)
return ret;
- ret = fill_table(sc_exit_table, ARRAY_SIZE(sc_exit_table),
+ ret = fill_event_table(sc_exit_table, ARRAY_SIZE(sc_exit_table),
chan->sc_exit_table, chan, filter, SC_TYPE_EXIT);
if (ret)
return ret;
#ifdef CONFIG_COMPAT
chan->sc_exit_table, chan, filter, SC_TYPE_EXIT);
if (ret)
return ret;
#ifdef CONFIG_COMPAT
- ret = fill_table(compat_sc_table, ARRAY_SIZE(compat_sc_table),
+ ret = fill_event_table(compat_sc_table, ARRAY_SIZE(compat_sc_table),
chan->compat_sc_table, chan, filter,
SC_TYPE_COMPAT_ENTRY);
if (ret)
return ret;
chan->compat_sc_table, chan, filter,
SC_TYPE_COMPAT_ENTRY);
if (ret)
return ret;
- ret = fill_table(compat_sc_exit_table, ARRAY_SIZE(compat_sc_exit_table),
+ ret = fill_event_table(compat_sc_exit_table, ARRAY_SIZE(compat_sc_exit_table),
chan->compat_sc_exit_table, chan, filter,
SC_TYPE_COMPAT_EXIT);
if (ret)
chan->compat_sc_exit_table, chan, filter,
SC_TYPE_COMPAT_EXIT);
if (ret)
if (!chan->sys_enter_registered) {
ret = lttng_wrapper_tracepoint_probe_register("sys_enter",
if (!chan->sys_enter_registered) {
ret = lttng_wrapper_tracepoint_probe_register("sys_enter",
- (void *) syscall_entry_probe, chan);
+ (void *) syscall_entry_event_probe, chan);
if (ret)
return ret;
chan->sys_enter_registered = 1;
if (ret)
return ret;
chan->sys_enter_registered = 1;
*/
if (!chan->sys_exit_registered) {
ret = lttng_wrapper_tracepoint_probe_register("sys_exit",
*/
if (!chan->sys_exit_registered) {
ret = lttng_wrapper_tracepoint_probe_register("sys_exit",
- (void *) syscall_exit_probe, chan);
+ (void *) syscall_exit_event_probe, chan);
if (ret) {
WARN_ON_ONCE(lttng_wrapper_tracepoint_probe_unregister("sys_enter",
if (ret) {
WARN_ON_ONCE(lttng_wrapper_tracepoint_probe_unregister("sys_enter",
- (void *) syscall_entry_probe, chan));
+ (void *) syscall_entry_event_probe, chan));
return ret;
}
chan->sys_exit_registered = 1;
return ret;
}
chan->sys_exit_registered = 1;
/*
* Only called at session destruction.
*/
/*
* Only called at session destruction.
*/
-int lttng_syscalls_unregister(struct lttng_channel *chan)
+int lttng_syscalls_unregister_event(struct lttng_channel *chan)
return 0;
if (chan->sys_enter_registered) {
ret = lttng_wrapper_tracepoint_probe_unregister("sys_enter",
return 0;
if (chan->sys_enter_registered) {
ret = lttng_wrapper_tracepoint_probe_unregister("sys_enter",
- (void *) syscall_entry_probe, chan);
+ (void *) syscall_entry_event_probe, chan);
if (ret)
return ret;
chan->sys_enter_registered = 0;
}
if (chan->sys_exit_registered) {
ret = lttng_wrapper_tracepoint_probe_unregister("sys_exit",
if (ret)
return ret;
chan->sys_enter_registered = 0;
}
if (chan->sys_exit_registered) {
ret = lttng_wrapper_tracepoint_probe_unregister("sys_exit",
- (void *) syscall_exit_probe, chan);
+ (void *) syscall_exit_event_probe, chan);
if (ret)
return ret;
chan->sys_exit_registered = 0;
if (ret)
return ret;
chan->sys_exit_registered = 0;
-int lttng_syscalls_destroy(struct lttng_channel *chan)
+int lttng_syscalls_destroy_event(struct lttng_channel *chan)
{
kfree(chan->sc_table);
kfree(chan->sc_exit_table);
{
kfree(chan->sc_table);
kfree(chan->sc_exit_table);
return event->desc->name + prefix_len;
}
return event->desc->name + prefix_len;
}
-int lttng_syscall_filter_enable(struct lttng_channel *chan,
+int lttng_syscall_filter_enable_event(struct lttng_channel *chan,
struct lttng_event *event)
{
struct lttng_syscall_filter *filter = chan->sc_filter;
struct lttng_event *event)
{
struct lttng_syscall_filter *filter = chan->sc_filter;
-int lttng_syscall_filter_disable(struct lttng_channel *chan,
+int lttng_syscall_filter_disable_event(struct lttng_channel *chan,
struct lttng_event *event)
{
struct lttng_syscall_filter *filter = chan->sc_filter;
struct lttng_event *event)
{
struct lttng_syscall_filter *filter = chan->sc_filter;