summaryrefslogtreecommitdiffstats
path: root/tools/perf/pmu-events/jevents.h
blob: 71e13de31092f2de94827573f4e4dc537df8b726 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef JEVENTS_H
#define JEVENTS_H 1

int json_events(const char *fn,
		int (*func)(void *data, char *name, char *event, char *desc,
				char *long_desc,
				char *pmu,
				char *unit, char *perpkg),
		void *data);
char *get_cpu_str(void);

#ifndef min
#define min(x, y) ({                            \
	typeof(x) _min1 = (x);                  \
	typeof(y) _min2 = (y);                  \
	(void) (&_min1 == &_min2);              \
	_min1 < _min2 ? _min1 : _min2; })
#endif

#endif