* [PATCH] tracing: Prevent wasting time evaluating parameters in trace_preempt_on/off
@ 2012-04-25 5:33 Minho Ban
2012-04-25 11:10 ` Steven Rostedt
0 siblings, 1 reply; 4+ messages in thread
From: Minho Ban @ 2012-04-25 5:33 UTC (permalink / raw)
To: Steven Rostedt
Cc: linux-kernel, Ingo Molnar, Frederic Weisbecker, Peter Zijlstra,
Paul Turner, Thomas Gleixner, Hidetoshi Seto, Paul E. McKenney,
Josh Triplett
This fixes spending time for evaluating parameters in trace_preempt_on/off when
the tracer config is off.
The patch mainly inspired by Steven Rostedt, thanks Steven.
Signed-off-by: Minho Ban <mhban@samsung.com>
---
include/linux/ftrace.h | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 72a6cab..bc7af66 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -485,8 +485,12 @@ static inline void __ftrace_enabled_restore(int enabled)
extern void trace_preempt_on(unsigned long a0, unsigned long a1);
extern void trace_preempt_off(unsigned long a0, unsigned long a1);
#else
- static inline void trace_preempt_on(unsigned long a0, unsigned long a1) { }
- static inline void trace_preempt_off(unsigned long a0, unsigned long a1) { }
+/*
+ * Use defines instead of static inlines because some arches will make code out
+ * of the CALLER_ADDR, when we really want these to be a real nop.
+ */
+# define trace_preempt_on(a0, a1) do { } while (0)
+# define trace_preempt_off(a0, a1) do { } while (0)
#endif
#ifdef CONFIG_FTRACE_MCOUNT_RECORD
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tracing: Prevent wasting time evaluating parameters in trace_preempt_on/off
2012-04-25 5:33 [PATCH] " Minho Ban
@ 2012-04-25 11:10 ` Steven Rostedt
0 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2012-04-25 11:10 UTC (permalink / raw)
To: Minho Ban
Cc: linux-kernel, Ingo Molnar, Frederic Weisbecker, Peter Zijlstra,
Paul Turner, Thomas Gleixner, Hidetoshi Seto, Paul E. McKenney,
Josh Triplett
On Wed, 2012-04-25 at 14:33 +0900, Minho Ban wrote:
> This fixes spending time for evaluating parameters in trace_preempt_on/off when
> the tracer config is off.
>
> The patch mainly inspired by Steven Rostedt, thanks Steven.
>
> Signed-off-by: Minho Ban <mhban@samsung.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
-- Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] tracing: Prevent wasting time evaluating parameters in trace_preempt_on/off
@ 2012-05-07 2:36 Minho Ban
2012-05-10 8:55 ` [tip:perf/core] " tip-bot for Minho Ban
0 siblings, 1 reply; 4+ messages in thread
From: Minho Ban @ 2012-05-07 2:36 UTC (permalink / raw)
To: Steven Rostedt
Cc: linux-kernel, Ingo Molnar, Frederic Weisbecker, Peter Zijlstra,
Paul Turner, Thomas Gleixner, Hidetoshi Seto, Paul E. McKenney,
Josh Triplett
This fixes spending time for evaluating parameters in trace_preempt_on/off when
the tracer config is off.
The patch mainly inspired by Steven Rostedt, thanks Steven.
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Turner <pjt@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Minho Ban <mhban@samsung.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
---
include/linux/ftrace.h | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 72a6cab..bc7af66 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -485,8 +485,12 @@ static inline void __ftrace_enabled_restore(int enabled)
extern void trace_preempt_on(unsigned long a0, unsigned long a1);
extern void trace_preempt_off(unsigned long a0, unsigned long a1);
#else
- static inline void trace_preempt_on(unsigned long a0, unsigned long a1) { }
- static inline void trace_preempt_off(unsigned long a0, unsigned long a1) { }
+/*
+ * Use defines instead of static inlines because some arches will make code out
+ * of the CALLER_ADDR, when we really want these to be a real nop.
+ */
+# define trace_preempt_on(a0, a1) do { } while (0)
+# define trace_preempt_off(a0, a1) do { } while (0)
#endif
#ifdef CONFIG_FTRACE_MCOUNT_RECORD
--
1.7.5.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [tip:perf/core] tracing: Prevent wasting time evaluating parameters in trace_preempt_on/off
2012-05-07 2:36 [PATCH] tracing: Prevent wasting time evaluating parameters in trace_preempt_on/off Minho Ban
@ 2012-05-10 8:55 ` tip-bot for Minho Ban
0 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Minho Ban @ 2012-05-10 8:55 UTC (permalink / raw)
To: linux-tip-commits
Cc: mingo, linux-kernel, hpa, mingo, seto.hidetoshi, a.p.zijlstra,
pjt, paulmck, fweisbec, rostedt, mhban, josh, tglx
Commit-ID: b02ee9a33b65bcc4ad13c12a0b04afdaab3ddd8d
Gitweb: http://git.kernel.org/tip/b02ee9a33b65bcc4ad13c12a0b04afdaab3ddd8d
Author: Minho Ban <mhban@samsung.com>
AuthorDate: Mon, 7 May 2012 11:36:00 +0900
Committer: Steven Rostedt <rostedt@goodmis.org>
CommitDate: Tue, 8 May 2012 09:33:52 -0400
tracing: Prevent wasting time evaluating parameters in trace_preempt_on/off
This fixes spending time for evaluating parameters in trace_preempt_on/off when
the tracer config is off.
The patch mainly inspired by Steven Rostedt, thanks Steven.
Link: http://lkml.kernel.org/r/4FA73510.7070705@samsung.com
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Turner <pjt@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Minho Ban <mhban@samsung.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
include/linux/ftrace.h | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index 0b55903..d32cc5e 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -491,8 +491,12 @@ static inline void __ftrace_enabled_restore(int enabled)
extern void trace_preempt_on(unsigned long a0, unsigned long a1);
extern void trace_preempt_off(unsigned long a0, unsigned long a1);
#else
- static inline void trace_preempt_on(unsigned long a0, unsigned long a1) { }
- static inline void trace_preempt_off(unsigned long a0, unsigned long a1) { }
+/*
+ * Use defines instead of static inlines because some arches will make code out
+ * of the CALLER_ADDR, when we really want these to be a real nop.
+ */
+# define trace_preempt_on(a0, a1) do { } while (0)
+# define trace_preempt_off(a0, a1) do { } while (0)
#endif
#ifdef CONFIG_FTRACE_MCOUNT_RECORD
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-10 8:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-07 2:36 [PATCH] tracing: Prevent wasting time evaluating parameters in trace_preempt_on/off Minho Ban
2012-05-10 8:55 ` [tip:perf/core] " tip-bot for Minho Ban
-- strict thread matches above, loose matches on Subject: below --
2012-04-25 5:33 [PATCH] " Minho Ban
2012-04-25 11:10 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox