From ec72e576dfcb1cb0ce0141801f3ee829f6e35137 Mon Sep 17 00:00:00 2001 From: Bjoern Brandenburg Date: Sun, 9 Aug 2015 13:18:48 +0200 Subject: Add tracepoint support This patch integrates LITMUS^RT's sched_trace_XXX() macros with Linux's notion of tracepoints. This is useful to visualize schedules in kernel shark and similar tools. Historically, LITMUS^RT's sched_trace predates Linux's tracepoint infrastructure. --- litmus/Kconfig | 18 ++++++++++++++++++ litmus/sched_task_trace.c | 4 ++++ 2 files changed, 22 insertions(+) (limited to 'litmus') diff --git a/litmus/Kconfig b/litmus/Kconfig index 19211ac1320a..5408ef6b159b 100644 --- a/litmus/Kconfig +++ b/litmus/Kconfig @@ -58,6 +58,24 @@ config SCHED_TASK_TRACE_SHIFT 10 => 1k events 8 => 512 events +config SCHED_LITMUS_TRACEPOINT + bool "Enable Event/Tracepoint Tracing for real-time task tracing" + depends on TRACEPOINTS + default n + help + Enable kernel-style events (tracepoint) for Litmus. Litmus events + trace the same functions as the above sched_trace_XXX(), but can + be enabled independently. + Litmus tracepoints can be recorded and analyzed together (single + time reference) with all other kernel tracing events (e.g., + sched:sched_switch, etc.). + + This also enables a quick way to visualize schedule traces using + trace-cmd utility and kernelshark visualizer. + + Say Yes for debugging and visualization purposes. + Say No for overhead tracing. + config SCHED_OVERHEAD_TRACE bool "Record timestamps for overhead measurements" depends on FEATHER_TRACE diff --git a/litmus/sched_task_trace.c b/litmus/sched_task_trace.c index 4f95551df1b4..fb4eddf1d7bc 100644 --- a/litmus/sched_task_trace.c +++ b/litmus/sched_task_trace.c @@ -15,6 +15,10 @@ #include #include +#ifdef CONFIG_SCHED_LITMUS_TRACEPOINT +#define CREATE_TRACE_POINTS +#include +#endif #define NO_EVENTS (1 << CONFIG_SCHED_TASK_TRACE_SHIFT) -- cgit v1.2.2