Skip to content

Commit

Permalink
sched: Mark sched_clock() as notrace
Browse files Browse the repository at this point in the history
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>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1260407223-10900-1-git-send-email-vapier@gentoo.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Mike Frysinger authored and Ingo Molnar committed Dec 10, 2009
1 parent 3786310 commit 1bbfa6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,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);
Expand Down

0 comments on commit 1bbfa6f

Please sign in to comment.