summaryrefslogtreecommitdiff
path: root/include/trace/events/latency_hist.h
blob: d6b5d77c57aaa45208ad588735c8a64d79f82549 (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
30
#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 */