From: David Goulet Date: Fri, 15 Jul 2011 20:27:42 +0000 (-0400) Subject: Remove useless kernel session counter X-Git-Tag: v2.0-pre1~37 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=99309957a01e3a42abb5081daeeac50729c0eec5;p=lttng-tools.git Remove useless kernel session counter Signed-off-by: David Goulet --- diff --git a/ltt-sessiond/kernel-ctl.c b/ltt-sessiond/kernel-ctl.c index 64a550841..0b0fca836 100644 --- a/ltt-sessiond/kernel-ctl.c +++ b/ltt-sessiond/kernel-ctl.c @@ -124,7 +124,6 @@ int kernel_create_session(struct ltt_session *session, int tracer_fd) lks->kconsumer_fds_sent = 0; session->kernel_session = lks; - session->kern_session_count++; DBG("Kernel session created (fd: %d)", lks->fd); diff --git a/ltt-sessiond/main.c b/ltt-sessiond/main.c index 0effeb1f5..10e13e387 100644 --- a/ltt-sessiond/main.c +++ b/ltt-sessiond/main.c @@ -108,8 +108,6 @@ static void teardown_kernel_session(struct ltt_session *session) trace_destroy_kernel_session(session->kernel_session); /* Extra precaution */ session->kernel_session = NULL; - /* Decrement session count */ - session->kern_session_count--; } } diff --git a/ltt-sessiond/session.c b/ltt-sessiond/session.c index f35530336..92111ffed 100644 --- a/ltt-sessiond/session.c +++ b/ltt-sessiond/session.c @@ -202,7 +202,6 @@ int create_session(char *name, char *path) /* Init kernel session */ new_session->kernel_session = NULL; - new_session->kern_session_count = 0; /* Init list */ CDS_INIT_LIST_HEAD(&new_session->ust_traces); diff --git a/ltt-sessiond/session.h b/ltt-sessiond/session.h index 5845878cb..4227f9244 100644 --- a/ltt-sessiond/session.h +++ b/ltt-sessiond/session.h @@ -39,7 +39,6 @@ struct ltt_session { struct cds_list_head ust_traces; struct ltt_kernel_session *kernel_session; unsigned int ust_trace_count; - unsigned int kern_session_count; pid_t ust_consumer; }; diff --git a/ltt-sessiond/ust-ctl.c b/ltt-sessiond/ust-ctl.c index 6f3a02a40..781a6cca9 100644 --- a/ltt-sessiond/ust-ctl.c +++ b/ltt-sessiond/ust-ctl.c @@ -58,7 +58,7 @@ static struct ltt_ust_trace *find_session_ust_trace_by_pid( */ int get_trace_count_per_session(struct ltt_session *session) { - return session->ust_trace_count + session->kern_session_count; + return session->ust_trace_count; } /*