aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/latency_hist.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/events/latency_hist.h')
-rw-r--r--include/trace/events/latency_hist.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/include/trace/events/latency_hist.h b/include/trace/events/latency_hist.h
new file mode 100644
index 000000000000..d3f2fbd560b1
--- /dev/null
+++ b/include/trace/events/latency_hist.h
@@ -0,0 +1,29 @@
+#ifndef _LATENCY_HIST_H
+#define _LATENCY_HIST_H
+
+enum hist_action {
+ IRQS_ON,
+ PREEMPT_ON,
+ TRACE_STOP,
+ IRQS_OFF,
+ PREEMPT_OFF,
+ TRACE_START,
+};
+
+static char *actions[] = {
+ "IRQS_ON",
+ "PREEMPT_ON",
+ "TRACE_STOP",
+ "IRQS_OFF",
+ "PREEMPT_OFF",
+ "TRACE_START",
+};
+
+static inline char *getaction(int action)
+{
+ if (action >= 0 && action <= sizeof(actions)/sizeof(actions[0]))
+ return actions[action];
+ return "unknown";
+}
+
+#endif /* _LATENCY_HIST_H */