Remove unused kernel session variable in event.c
authorDavid Goulet <dgoulet@efficios.com>
Tue, 22 Jan 2013 16:50:52 +0000 (11:50 -0500)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 22 Jan 2013 17:42:33 +0000 (12:42 -0500)
Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/cmd.c
src/bin/lttng-sessiond/event.c
src/bin/lttng-sessiond/event.h

index 3a70d48692917108d8ed1447b6a7a2a409542d3d..5ec65b78637beaf0904a1c32ef1d25377dbcdc11 100644 (file)
@@ -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;
index 573e5a15657594c7e0d3a51f11087a1445787803..5acb4790b3ca8dcf3fab4cfa02fbda91066be7be 100644 (file)
@@ -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;
index d1c094b25c385753ef1c144b4cbec00c07592b19..a8b75192fd2dd719e230f46adb73a5feb4e9313f 100644 (file)
 
 #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,
This page took 0.031476 seconds and 4 git commands to generate.