From: David Goulet Date: Tue, 22 Jan 2013 16:52:57 +0000 (-0500) Subject: Remove unused variables in trace-kernel/ust.c X-Git-Tag: v2.2.0-rc1~96 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=fdd9eb17f6b6928771744bb40bb2283ce3340033;p=lttng-tools.git Remove unused variables in trace-kernel/ust.c In trace-kernel.c, the path is not used anymore on channel creation. Same goes for trace-ust.c for session creation, the domain pointer is not used. Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-sessiond/channel.c b/src/bin/lttng-sessiond/channel.c index e11d6d11f..7ebe4b16e 100644 --- a/src/bin/lttng-sessiond/channel.c +++ b/src/bin/lttng-sessiond/channel.c @@ -164,7 +164,7 @@ int channel_kernel_create(struct ltt_kernel_session *ksession, } /* Channel not found, creating it */ - ret = kernel_create_channel(ksession, attr, ksession->trace_path); + ret = kernel_create_channel(ksession, attr); if (ret < 0) { ret = LTTNG_ERR_KERN_CHAN_FAIL; goto error; diff --git a/src/bin/lttng-sessiond/kernel.c b/src/bin/lttng-sessiond/kernel.c index 32c40531d..d3a645375 100644 --- a/src/bin/lttng-sessiond/kernel.c +++ b/src/bin/lttng-sessiond/kernel.c @@ -118,23 +118,22 @@ error: * kernel session. */ int kernel_create_channel(struct ltt_kernel_session *session, - struct lttng_channel *chan, char *path) + struct lttng_channel *chan) { int ret; struct ltt_kernel_channel *lkc; assert(session); assert(chan); - assert(path); /* Allocate kernel channel */ - lkc = trace_kernel_create_channel(chan, path); + lkc = trace_kernel_create_channel(chan); if (lkc == NULL) { goto error; } - DBG3("Kernel create channel %s in %s with attr: %d, %" PRIu64 ", %" PRIu64 ", %u, %u, %d", - chan->name, path, lkc->channel->attr.overwrite, + DBG3("Kernel create channel %s with attr: %d, %" PRIu64 ", %" PRIu64 ", %u, %u, %d", + chan->name, lkc->channel->attr.overwrite, lkc->channel->attr.subbuf_size, lkc->channel->attr.num_subbuf, lkc->channel->attr.switch_timer_interval, lkc->channel->attr.read_timer_interval, lkc->channel->attr.output); diff --git a/src/bin/lttng-sessiond/kernel.h b/src/bin/lttng-sessiond/kernel.h index 4813c931d..c0fe201d6 100644 --- a/src/bin/lttng-sessiond/kernel.h +++ b/src/bin/lttng-sessiond/kernel.h @@ -34,7 +34,7 @@ int kernel_add_channel_context(struct ltt_kernel_channel *chan, struct lttng_kernel_context *ctx); int kernel_create_session(struct ltt_session *session, int tracer_fd); int kernel_create_channel(struct ltt_kernel_session *session, - struct lttng_channel *chan, char *path); + struct lttng_channel *chan); int kernel_create_event(struct lttng_event *ev, struct ltt_kernel_channel *channel); int kernel_disable_channel(struct ltt_kernel_channel *chan); int kernel_disable_event(struct ltt_kernel_event *event); diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 339b20d3e..a63593d18 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -2104,7 +2104,7 @@ static int create_ust_session(struct ltt_session *session, DBG("Creating UST session"); - lus = trace_ust_create_session(session->path, session->id, domain); + lus = trace_ust_create_session(session->path, session->id); if (lus == NULL) { ret = LTTNG_ERR_UST_SESS_FAIL; goto error; diff --git a/src/bin/lttng-sessiond/trace-kernel.c b/src/bin/lttng-sessiond/trace-kernel.c index 12189b9ea..d3742be16 100644 --- a/src/bin/lttng-sessiond/trace-kernel.c +++ b/src/bin/lttng-sessiond/trace-kernel.c @@ -143,7 +143,7 @@ alloc_error: * Return pointer to structure or NULL. */ struct ltt_kernel_channel *trace_kernel_create_channel( - struct lttng_channel *chan, char *path) + struct lttng_channel *chan) { struct ltt_kernel_channel *lkc; diff --git a/src/bin/lttng-sessiond/trace-kernel.h b/src/bin/lttng-sessiond/trace-kernel.h index 8bd1ffe32..9050c4d04 100644 --- a/src/bin/lttng-sessiond/trace-kernel.h +++ b/src/bin/lttng-sessiond/trace-kernel.h @@ -123,7 +123,8 @@ struct ltt_kernel_channel *trace_kernel_get_channel_by_name( * Create functions malloc() the data structure. */ struct ltt_kernel_session *trace_kernel_create_session(char *path); -struct ltt_kernel_channel *trace_kernel_create_channel(struct lttng_channel *chan, char *path); +struct ltt_kernel_channel *trace_kernel_create_channel( + struct lttng_channel *chan); struct ltt_kernel_event *trace_kernel_create_event(struct lttng_event *ev); struct ltt_kernel_metadata *trace_kernel_create_metadata(void); struct ltt_kernel_stream *trace_kernel_create_stream(const char *name, diff --git a/src/bin/lttng-sessiond/trace-ust.c b/src/bin/lttng-sessiond/trace-ust.c index 1830763b1..81cb4db63 100644 --- a/src/bin/lttng-sessiond/trace-ust.c +++ b/src/bin/lttng-sessiond/trace-ust.c @@ -181,7 +181,7 @@ error: * Return pointer to structure or NULL. */ struct ltt_ust_session *trace_ust_create_session(char *path, - unsigned int session_id, struct lttng_domain *domain) + unsigned int session_id) { struct ltt_ust_session *lus; diff --git a/src/bin/lttng-sessiond/trace-ust.h b/src/bin/lttng-sessiond/trace-ust.h index ab8fbe105..97f3135a2 100644 --- a/src/bin/lttng-sessiond/trace-ust.h +++ b/src/bin/lttng-sessiond/trace-ust.h @@ -134,7 +134,7 @@ struct ltt_ust_channel *trace_ust_find_channel_by_name(struct lttng_ht *ht, * Create functions malloc() the data structure. */ struct ltt_ust_session *trace_ust_create_session(char *path, - unsigned int session_id, struct lttng_domain *domain); + unsigned int session_id); struct ltt_ust_channel *trace_ust_create_channel(struct lttng_channel *attr, char *path); struct ltt_ust_event *trace_ust_create_event(struct lttng_event *ev, diff --git a/tests/tools/test_kernel_data_trace.c b/tests/tools/test_kernel_data_trace.c index ed70f0ffb..70d71cadb 100644 --- a/tests/tools/test_kernel_data_trace.c +++ b/tests/tools/test_kernel_data_trace.c @@ -121,7 +121,7 @@ static void create_kernel_channel(void) memset(&attr, 0, sizeof(attr)); printf("Creating kernel channel: "); - chan = trace_kernel_create_channel(&attr, PATH1); + chan = trace_kernel_create_channel(&attr); assert(chan != NULL); PRINT_OK(); diff --git a/tests/tools/test_ust_data_trace.c b/tests/tools/test_ust_data_trace.c index a9f4bb952..74f282bbb 100644 --- a/tests/tools/test_ust_data_trace.c +++ b/tests/tools/test_ust_data_trace.c @@ -73,7 +73,7 @@ static void create_one_ust_session(void) dom.type = LTTNG_DOMAIN_UST; - usess = trace_ust_create_session(PATH1, 42, &dom); + usess = trace_ust_create_session(PATH1, 42); assert(usess != NULL); PRINT_OK();