From: Ron Rechenmacher <ron@fnal.gov>
To: <linux-kernel@vger.kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Subject: [PATCH] tracing: Export key trace event symbols
Date: Mon, 20 Apr 2015 16:38:11 -0500 [thread overview]
Message-ID: <553571C3.1060505@fnal.gov> (raw)
If symbols are not exported, modules can no longer register additional
(module specified) tracepoints like they use to be able to (i.e linux-3.15.x).
Somewhere on or about commit de7b2973903c6cc50b31ee5682a69b2219b9919d
(Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Date: Tue Apr 8 17:26:21 2014 -0400
tracepoint: Use struct pointer instead of name hash for reg/unreg tracepoints)
modules which attempted to register additional tracing functions would
get "Unknown symbol" errors. For example: "... Unknown symbol
__tracepoint_sched_switch (err 0)"
Symbols can be exported using the kernel's EXPORT_TRACEPOINT_SYMBOL_GPL macro
to allow modules to once again register their own tracing functions (for at
least some key points in the kernel as provided by this patch).
Signed-off-by: Ron Rechenmacher <ron@fnal.gov>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=96051
---
kernel/irq/handle.c | 6 ++++++
kernel/softirq.c | 6 ++++++
kernel/trace/trace_sched_switch.c | 5 +++++
kernel/trace/trace_syscalls.c | 6 ++++++
4 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 470d08c..a98d763 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -20,6 +20,12 @@
#include "internals.h"
+/*
+ * Allow modules to register additional trace routines
+ */
+EXPORT_TRACEPOINT_SYMBOL_GPL(irq_handler_entry);
+EXPORT_TRACEPOINT_SYMBOL_GPL(irq_handler_exit);
+
/**
* handle_bad_irq - handle spurious and unhandled irqs
* @irq: the interrupt number
diff --git a/kernel/softirq.c b/kernel/softirq.c
index fca82c3..af6fa2e 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -52,6 +52,12 @@ irq_cpustat_t irq_stat[NR_CPUS] ____cacheline_aligned;
EXPORT_SYMBOL(irq_stat);
#endif
+/*
+ * Allow modules to register additional trace routines
+ */
+EXPORT_TRACEPOINT_SYMBOL_GPL(softirq_entry);
+EXPORT_TRACEPOINT_SYMBOL_GPL(softirq_exit);
+
static struct softirq_action softirq_vec[NR_SOFTIRQS] __cacheline_aligned_in_smp;
DEFINE_PER_CPU(struct task_struct *, ksoftirqd);
diff --git a/kernel/trace/trace_sched_switch.c b/kernel/trace/trace_sched_switch.c
index 7e62c0a..2ea1a6a 100644
--- a/kernel/trace/trace_sched_switch.c
+++ b/kernel/trace/trace_sched_switch.c
@@ -14,6 +14,11 @@
#include "trace.h"
+/*
+ * Allow modules to register additional trace routines
+ */
+EXPORT_TRACEPOINT_SYMBOL_GPL(sched_switch);
+
static struct trace_array *ctx_trace;
static int __read_mostly tracer_enabled;
static int sched_ref;
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index ee7b5a0..6c3bbd0 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -9,6 +9,12 @@
#include "trace_output.h"
#include "trace.h"
+/*
+ * Allow modules to register additional trace routines
+ */
+EXPORT_TRACEPOINT_SYMBOL_GPL(sys_enter);
+EXPORT_TRACEPOINT_SYMBOL_GPL(sys_exit);
+
static DEFINE_MUTEX(syscall_trace_lock);
static int sys_refcount_enter;
static int sys_refcount_exit;
next reply other threads:[~2015-04-20 21:43 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 21:38 Ron Rechenmacher [this message]
2015-04-21 6:10 ` [PATCH] tracing: Export key trace event symbols Christoph Hellwig
2015-04-21 12:04 ` Ron Rechenmacher
2015-04-21 12:19 ` Ron Rechenmacher
2015-04-21 13:38 ` Steven Rostedt
2015-04-21 12:22 ` Christoph Hellwig
2015-04-21 13:13 ` Ron Rechenmacher
2015-04-21 13:23 ` Christoph Hellwig
2015-04-21 13:26 ` Ron Rechenmacher
2015-04-21 13:53 ` Steven Rostedt
2015-04-21 15:00 ` Ron Rechenmacher
2015-04-21 15:49 ` Steven Rostedt
2015-04-21 22:23 ` Ron Rechenmacher
2015-04-21 22:44 ` Steven Rostedt
2015-04-22 2:24 ` Ron Rechenmacher
2015-04-22 12:53 ` Steven Rostedt
2015-04-22 12:55 ` Steven Rostedt
2015-04-22 14:47 ` Arnaldo Carvalho de Melo
2015-04-22 15:36 ` David Ahern
2015-04-22 15:44 ` Steven Rostedt
2015-04-22 16:35 ` Ron Rechenmacher
2015-04-22 17:00 ` Steven Rostedt
2015-04-23 15:28 ` Pawel Moll
2015-04-23 15:33 ` Pawel Moll
2015-04-21 13:31 ` Steven Rostedt
2015-04-24 21:24 ` Steven Rostedt
2015-04-24 21:39 ` Mathieu Desnoyers
2015-04-27 19:12 ` Ron Rechenmacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=553571C3.1060505@fnal.gov \
--to=ron@fnal.gov \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).