From 662ed1665428b38ee00d4be5751581108bf35390 Mon Sep 17 00:00:00 2001 From: Julien Desfossez Date: Wed, 8 May 2013 10:09:19 -0400 Subject: [PATCH] Remove useless lttng_metadata probe We don't use this event anymore since we write the metadata directly into the ring buffer, no need for an external event. This probe was the only one in the lttng-probe-lttng module, so we can get rid of this module as well. Signed-off-by: Julien Desfossez Signed-off-by: Mathieu Desnoyers --- instrumentation/events/lttng-module/lttng.h | 34 ------------------- lttng-abi.c | 31 ------------------ lttng-probes.c | 5 --- probes/Makefile | 1 - probes/lttng-probe-lttng.c | 36 --------------------- 5 files changed, 107 deletions(-) delete mode 100644 instrumentation/events/lttng-module/lttng.h delete mode 100644 probes/lttng-probe-lttng.c diff --git a/instrumentation/events/lttng-module/lttng.h b/instrumentation/events/lttng-module/lttng.h deleted file mode 100644 index 6f3d6d14..00000000 --- a/instrumentation/events/lttng-module/lttng.h +++ /dev/null @@ -1,34 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM lttng - -#if !defined(_TRACE_LTTNG_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_LTTNG_H - -#include - -TRACE_EVENT(lttng_metadata, - - TP_PROTO(const char *str), - - TP_ARGS(str), - - /* - * Not exactly a string: more a sequence of bytes (dynamic - * array) without the length. This is a dummy anyway: we only - * use this declaration to generate an event metadata entry. - */ - TP_STRUCT__entry( - __string( str, str ) - ), - - TP_fast_assign( - tp_strcpy(str, str) - ), - - TP_printk("") -) - -#endif /* _TRACE_LTTNG_H */ - -/* This part must be outside protection */ -#include "../../../probes/define_trace.h" diff --git a/lttng-abi.c b/lttng-abi.c index 25a350ae..2709a855 100644 --- a/lttng-abi.c +++ b/lttng-abi.c @@ -296,36 +296,6 @@ static const struct file_operations lttng_fops = { #endif }; -/* - * We tolerate no failure in this function (if one happens, we print a dmesg - * error, but cannot return any error, because the channel information is - * invariant. - */ -static -void lttng_metadata_create_events(struct file *channel_file) -{ - struct lttng_channel *channel = channel_file->private_data; - static struct lttng_kernel_event metadata_params = { - .instrumentation = LTTNG_KERNEL_TRACEPOINT, - .name = "lttng_metadata", - }; - struct lttng_event *event; - - /* - * We tolerate no failure path after event creation. It will stay - * invariant for the rest of the session. - */ - event = lttng_event_create(channel, &metadata_params, NULL, NULL); - if (!event) { - goto create_error; - } - return; - -create_error: - WARN_ON(1); - return; /* not allowed to return error */ -} - static int lttng_abi_create_channel(struct file *session_file, struct lttng_kernel_channel *chan_param, @@ -402,7 +372,6 @@ int lttng_abi_create_channel(struct file *session_file, fd_install(chan_fd, chan_file); if (channel_type == METADATA_CHANNEL) { session->metadata = chan; - lttng_metadata_create_events(chan_file); } /* The channel created holds a reference on the session */ diff --git a/lttng-probes.c b/lttng-probes.c index c6dfbc95..d6a6cf2e 100644 --- a/lttng-probes.c +++ b/lttng-probes.c @@ -143,11 +143,6 @@ int tp_list_show(struct seq_file *m, void *p) { const struct lttng_event_desc *probe_desc = p; - /* - * Don't export lttng internal event: lttng_metadata. - */ - if (!strcmp(probe_desc->name, "lttng_metadata")) - return 0; seq_printf(m, "event { name = %s; };\n", probe_desc->name); return 0; diff --git a/probes/Makefile b/probes/Makefile index 08adad5b..225803c3 100644 --- a/probes/Makefile +++ b/probes/Makefile @@ -8,7 +8,6 @@ ifneq ($(CONFIG_TRACEPOINTS),) ccflags-y += -I$(PWD)/probes obj-m += lttng-types.o -obj-m += lttng-probe-lttng.o obj-m += lttng-probe-sched.o obj-m += lttng-probe-irq.o obj-m += lttng-probe-timer.o diff --git a/probes/lttng-probe-lttng.c b/probes/lttng-probe-lttng.c deleted file mode 100644 index 365e1fc9..00000000 --- a/probes/lttng-probe-lttng.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * probes/lttng-probe-core.c - * - * LTTng core probes. - * - * Copyright (C) 2010-2012 Mathieu Desnoyers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; only - * version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include - -/* - * Create LTTng tracepoint probes. - */ -#define LTTNG_PACKAGE_BUILD -#define CREATE_TRACE_POINTS -#define TRACE_INCLUDE_PATH ../instrumentation/events/lttng-module - -#include "../instrumentation/events/lttng-module/lttng.h" - -MODULE_LICENSE("GPL and additional rights"); -MODULE_AUTHOR("Mathieu Desnoyers "); -MODULE_DESCRIPTION("LTTng core probes"); -- 2.34.1