aboutsummaryrefslogtreecommitdiffstats
path: root/litmus
diff options
context:
space:
mode:
authorFelipe Cerqueira <felipec@mpi-sws.org>2013-02-12 10:31:10 -0500
committerBjoern Brandenburg <bbb@mpi-sws.org>2013-08-07 03:46:47 -0400
commit432a8fc96280b61a2ca592a9d76596650c4011d8 (patch)
treec049cf7e6c977bcd9080b67cfef6844d2b0d7579 /litmus
parent755f7bf22de30de260264c2f0b04c783952618f1 (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 5ef8d09ab41f..2bdfbbddedb2 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