summaryrefslogtreecommitdiff
path: root/include/linux/ftrace.h
diff options
context:
space:
mode:
authorJoel Fernandes <joelaf@google.com>2017-10-10 15:51:37 -0700
committerAmit Pundir <amit.pundir@linaro.org>2017-12-18 21:11:22 +0530
commitb657a6f6f865e24e8d96f853bc9b62c98e7a1409 (patch)
treee720eaf04c8f74475750134ca4b4191e518e3019 /include/linux/ftrace.h
parent3e27f9ca436e06cec3c906544d357a0a33a56164 (diff)
UPSTREAM: tracing: Add support for preempt and irq enable/disable events
commit d59158162e032917a428704160a2063a02405ec6 upstream. Preempt and irq trace events can be used for tracing the start and end of an atomic section which can be used by a trace viewer like systrace to graphically view the start and end of an atomic section and correlate them with latencies and scheduling issues. This also serves as a prelude to using synthetic events or probes to rewrite the preempt and irqsoff tracers, along with numerous benefits of using trace events features for these events. Link: http://lkml.kernel.org/r/20171006005432.14244-3-joelaf@google.com Link: http://lkml.kernel.org/r/20171010225137.17370-1-joelaf@google.com Cc: Peter Zilstra <peterz@infradead.org> Cc: kernel-team@android.com Signed-off-by: Joel Fernandes <joelaf@google.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Diffstat (limited to 'include/linux/ftrace.h')
-rw-r--r--include/linux/ftrace.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
index e54d257983f2..07edd89dca53 100644
--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -743,7 +743,8 @@ static inline unsigned long get_lock_parent_ip(void)
static inline void time_hardirqs_off(unsigned long a0, unsigned long a1) { }
#endif
-#ifdef CONFIG_PREEMPT_TRACER
+#if defined(CONFIG_PREEMPT_TRACER) || \
+ (defined(CONFIG_DEBUG_PREEMPT) && defined(CONFIG_PREEMPTIRQ_EVENTS))
extern void trace_preempt_on(unsigned long a0, unsigned long a1);
extern void trace_preempt_off(unsigned long a0, unsigned long a1);
#else