mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched: mark sched_clock() as notrace
@ 2009-12-10  1:07 Mike Frysinger
  2009-12-10  7:50 ` [tip:perf/urgent] sched: Mark " tip-bot for Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2009-12-10  1:07 UTC (permalink / raw)
  To: Ingo Molnar, Peter Zijlstra; +Cc: linux-kernel

The core ftrace code (trace_clock_local) calls sched_clock() directly, so
we don't want to recurisvely trigger the ftrace code.  Rather than update
every sched_clock() definition, tag the prototype for everyone as notrace.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 include/linux/sched.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/linux/sched.h b/include/linux/sched.h
index 89115ec..3f4fa73 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1840,7 +1840,8 @@ static inline int set_cpus_allowed(struct task_struct *p, cpumask_t new_mask)
 extern int sched_clock_stable;
 #endif
 
-extern unsigned long long sched_clock(void);
+/* ftrace calls sched_clock() directly */
+extern unsigned long long notrace sched_clock(void);
 
 extern void sched_clock_init(void);
 extern u64 sched_clock_cpu(int cpu);
-- 
1.6.5.5


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

end of thread, other threads:[~2009-12-10  7:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-10  1:07 [PATCH] sched: mark sched_clock() as notrace Mike Frysinger
2009-12-10  7:50 ` [tip:perf/urgent] sched: Mark " tip-bot for Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome