aboutsummaryrefslogtreecommitdiffstats
path: root/litmus
diff options
context:
space:
mode:
authorBjoern Brandenburg <bbb@mpi-sws.org>2015-08-09 07:18:48 -0400
committerBjoern Brandenburg <bbb@mpi-sws.org>2015-08-09 06:21:18 -0400
commitec72e576dfcb1cb0ce0141801f3ee829f6e35137 (patch)
tree74cec0bfcea8dafbd2c4e4fe318045f27ca3e14e /litmus
parent1921674066c4ccb534e357c69629e365be626e0e (diff)
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.
Diffstat (limited to 'litmus')
-rw-r--r--litmus/Kconfig18
-rw-r--r--litmus/sched_task_trace.c4
2 files changed, 22 insertions, 0 deletions
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
58 10 => 1k events 58 10 => 1k events
59 8 => 512 events 59 8 => 512 events
60 60
61config SCHED_LITMUS_TRACEPOINT
62 bool "Enable Event/Tracepoint Tracing for real-time task tracing"
63 depends on TRACEPOINTS
64 default n
65 help
66 Enable kernel-style events (tracepoint) for Litmus. Litmus events
67 trace the same functions as the above sched_trace_XXX(), but can
68 be enabled independently.
69 Litmus tracepoints can be recorded and analyzed together (single
70 time reference) with all other kernel tracing events (e.g.,
71 sched:sched_switch, etc.).
72
73 This also enables a quick way to visualize schedule traces using
74 trace-cmd utility and kernelshark visualizer.
75
76 Say Yes for debugging and visualization purposes.
77 Say No for overhead tracing.
78
61config SCHED_OVERHEAD_TRACE 79config SCHED_OVERHEAD_TRACE
62 bool "Record timestamps for overhead measurements" 80 bool "Record timestamps for overhead measurements"
63 depends on FEATHER_TRACE 81 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 @@
15#include <litmus/feather_trace.h> 15#include <litmus/feather_trace.h>
16#include <litmus/ftdev.h> 16#include <litmus/ftdev.h>
17 17
18#ifdef CONFIG_SCHED_LITMUS_TRACEPOINT
19#define CREATE_TRACE_POINTS
20#include <trace/events/litmus.h>
21#endif
18 22
19#define NO_EVENTS (1 << CONFIG_SCHED_TASK_TRACE_SHIFT) 23#define NO_EVENTS (1 << CONFIG_SCHED_TASK_TRACE_SHIFT)
20 24