+++ /dev/null
-#undef TRACE_SYSTEM
-#define TRACE_SYSTEM lttng
-
-#if !defined(_TRACE_LTTNG_H) || defined(TRACE_HEADER_MULTI_READ)
-#define _TRACE_LTTNG_H
-
-#include <linux/tracepoint.h>
-
-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"
#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,
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 */
{
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;
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
+++ /dev/null
-/*
- * probes/lttng-probe-core.c
- *
- * LTTng core probes.
- *
- * Copyright (C) 2010-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- *
- * 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 <linux/module.h>
-
-/*
- * 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 <mathieu.desnoyers@efficios.com>");
-MODULE_DESCRIPTION("LTTng core probes");