From: David Goulet Date: Tue, 22 Jan 2013 16:50:52 +0000 (-0500) Subject: Remove unused kernel session variable in event.c X-Git-Tag: v2.2.0-rc1~97 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d3a56674bd25163dcd13140ceb5781da8b30dcd3;p=lttng-tools.git Remove unused kernel session variable in event.c Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index 3a70d4869..5ec65b786 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -924,7 +924,7 @@ int cmd_disable_event(struct ltt_session *session, int domain, goto error; } - ret = event_kernel_disable_tracepoint(ksess, kchan, event_name); + ret = event_kernel_disable_tracepoint(kchan, event_name); if (ret != LTTNG_OK) { goto error; } @@ -993,7 +993,7 @@ int cmd_disable_event_all(struct ltt_session *session, int domain, goto error; } - ret = event_kernel_disable_all(ksess, kchan); + ret = event_kernel_disable_all(kchan); if (ret != LTTNG_OK) { goto error; } @@ -1160,8 +1160,7 @@ int cmd_enable_event(struct ltt_session *session, int domain, goto error; } - ret = event_kernel_enable_tracepoint(session->kernel_session, kchan, - event); + ret = event_kernel_enable_tracepoint(kchan, event); if (ret != LTTNG_OK) { if (channel_created) { /* Let's not leak a useless channel. */ @@ -1274,21 +1273,18 @@ int cmd_enable_event_all(struct ltt_session *session, int domain, switch (event_type) { case LTTNG_EVENT_SYSCALL: - ret = event_kernel_enable_all_syscalls(session->kernel_session, - kchan, kernel_tracer_fd); + ret = event_kernel_enable_all_syscalls(kchan, kernel_tracer_fd); break; case LTTNG_EVENT_TRACEPOINT: /* * This call enables all LTTNG_KERNEL_TRACEPOINTS and * events already registered to the channel. */ - ret = event_kernel_enable_all_tracepoints(session->kernel_session, - kchan, kernel_tracer_fd); + ret = event_kernel_enable_all_tracepoints(kchan, kernel_tracer_fd); break; case LTTNG_EVENT_ALL: /* Enable syscalls and tracepoints */ - ret = event_kernel_enable_all(session->kernel_session, - kchan, kernel_tracer_fd); + ret = event_kernel_enable_all(kchan, kernel_tracer_fd); break; default: ret = LTTNG_ERR_KERN_ENABLE_FAIL; diff --git a/src/bin/lttng-sessiond/event.c b/src/bin/lttng-sessiond/event.c index 573e5a156..5acb4790b 100644 --- a/src/bin/lttng-sessiond/event.c +++ b/src/bin/lttng-sessiond/event.c @@ -73,8 +73,8 @@ static void init_syscalls_kernel_event(struct lttng_event *event) /* * Disable kernel tracepoint event for a channel from the kernel session. */ -int event_kernel_disable_tracepoint(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan, char *event_name) +int event_kernel_disable_tracepoint(struct ltt_kernel_channel *kchan, + char *event_name) { int ret; struct ltt_kernel_event *kevent; @@ -105,8 +105,7 @@ error: /* * Disable kernel tracepoint events for a channel from the kernel session. */ -int event_kernel_disable_all_tracepoints(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan) +int event_kernel_disable_all_tracepoints(struct ltt_kernel_channel *kchan) { int ret; struct ltt_kernel_event *kevent; @@ -128,8 +127,7 @@ int event_kernel_disable_all_tracepoints(struct ltt_kernel_session *ksession, /* * Disable kernel syscall events for a channel from the kernel session. */ -int event_kernel_disable_all_syscalls(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan) +int event_kernel_disable_all_syscalls(struct ltt_kernel_channel *kchan) { ERR("Cannot disable syscall tracing for existing session. Please destroy session instead."); return LTTNG_OK; /* Return OK so disable all succeeds */ @@ -138,26 +136,24 @@ int event_kernel_disable_all_syscalls(struct ltt_kernel_session *ksession, /* * Disable all kernel event for a channel from the kernel session. */ -int event_kernel_disable_all(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan) +int event_kernel_disable_all(struct ltt_kernel_channel *kchan) { int ret; - assert(ksession); assert(kchan); - ret = event_kernel_disable_all_tracepoints(ksession, kchan); + ret = event_kernel_disable_all_tracepoints(kchan); if (ret != LTTNG_OK) return ret; - ret = event_kernel_disable_all_syscalls(ksession, kchan); + ret = event_kernel_disable_all_syscalls(kchan); return ret; } /* * Enable kernel tracepoint event for a channel from the kernel session. */ -int event_kernel_enable_tracepoint(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan, struct lttng_event *event) +int event_kernel_enable_tracepoint(struct ltt_kernel_channel *kchan, + struct lttng_event *event) { int ret; struct ltt_kernel_event *kevent; @@ -202,8 +198,8 @@ end: /* * Enable all kernel tracepoint events of a channel of the kernel session. */ -int event_kernel_enable_all_tracepoints(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan, int kernel_tracer_fd) +int event_kernel_enable_all_tracepoints(struct ltt_kernel_channel *kchan, + int kernel_tracer_fd) { int size, i, ret; struct ltt_kernel_event *kevent; @@ -250,8 +246,8 @@ end: /* * Enable all kernel tracepoint events of a channel of the kernel session. */ -int event_kernel_enable_all_syscalls(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan, int kernel_tracer_fd) +int event_kernel_enable_all_syscalls(struct ltt_kernel_channel *kchan, + int kernel_tracer_fd) { int ret; struct lttng_event event; @@ -280,16 +276,14 @@ end: /* * Enable all kernel events of a channel of the kernel session. */ -int event_kernel_enable_all(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan, int kernel_tracer_fd) +int event_kernel_enable_all(struct ltt_kernel_channel *kchan, + int kernel_tracer_fd) { int tp_ret; - assert(ksession); assert(kchan); - tp_ret = event_kernel_enable_all_tracepoints(ksession, kchan, - kernel_tracer_fd); + tp_ret = event_kernel_enable_all_tracepoints(kchan, kernel_tracer_fd); if (tp_ret != LTTNG_OK) { goto end; } @@ -303,7 +297,7 @@ int event_kernel_enable_all(struct ltt_kernel_session *ksession, * tracepoints did not fail. Future work will allow us to send back * multiple errors to the client in one API call. */ - (void) event_kernel_enable_all_syscalls(ksession, kchan, kernel_tracer_fd); + (void) event_kernel_enable_all_syscalls(kchan, kernel_tracer_fd); end: return tp_ret; diff --git a/src/bin/lttng-sessiond/event.h b/src/bin/lttng-sessiond/event.h index d1c094b25..a8b75192f 100644 --- a/src/bin/lttng-sessiond/event.h +++ b/src/bin/lttng-sessiond/event.h @@ -20,23 +20,20 @@ #include "trace-kernel.h" -int event_kernel_disable_tracepoint(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan, char *event_name); -int event_kernel_disable_all_syscalls(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan); -int event_kernel_disable_all_tracepoints(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan); -int event_kernel_disable_all(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan); +int event_kernel_disable_tracepoint(struct ltt_kernel_channel *kchan, + char *event_name); +int event_kernel_disable_all_syscalls(struct ltt_kernel_channel *kchan); +int event_kernel_disable_all_tracepoints(struct ltt_kernel_channel *kchan); +int event_kernel_disable_all(struct ltt_kernel_channel *kchan); -int event_kernel_enable_tracepoint(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan, struct lttng_event *event); -int event_kernel_enable_all_tracepoints(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan, int kernel_tracer_fd); -int event_kernel_enable_all_syscalls(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan, int kernel_tracer_fd); -int event_kernel_enable_all(struct ltt_kernel_session *ksession, - struct ltt_kernel_channel *kchan, int kernel_tracer_fd); +int event_kernel_enable_tracepoint(struct ltt_kernel_channel *kchan, + struct lttng_event *event); +int event_kernel_enable_all_tracepoints(struct ltt_kernel_channel *kchan, + int kernel_tracer_fd); +int event_kernel_enable_all_syscalls(struct ltt_kernel_channel *kchan, + int kernel_tracer_fd); +int event_kernel_enable_all(struct ltt_kernel_channel *kchan, + int kernel_tracer_fd); int event_ust_enable_tracepoint(struct ltt_ust_session *usess, int domain, struct ltt_ust_channel *uchan, struct lttng_event *event,