summaryrefslogtreecommitdiff
path: root/include/trace/events/latency_hist.h
blob: d3f2fbd560b1aeaa0fc68c5c827cc4c2c448cbfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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 */