diff options
Diffstat (limited to 'kernel/include/trace/events/latency_hist.h')
-rw-r--r-- | kernel/include/trace/events/latency_hist.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/kernel/include/trace/events/latency_hist.h b/kernel/include/trace/events/latency_hist.h new file mode 100644 index 000000000..d3f2fbd56 --- /dev/null +++ b/kernel/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 */ |