linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tracing: Export key trace event symbols
@ 2015-04-20 21:38 Ron Rechenmacher
  2015-04-21  6:10 ` Christoph Hellwig
  2015-04-24 21:24 ` Steven Rostedt
  0 siblings, 2 replies; 28+ messages in thread
From: Ron Rechenmacher @ 2015-04-20 21:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Steven Rostedt

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;

^ permalink raw reply related	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2015-04-27 19:17 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-20 21:38 [PATCH] tracing: Export key trace event symbols Ron Rechenmacher
2015-04-21  6:10 ` 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

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).