blob: 611fac01913de14335924f1b7e02a86263fa377e [file] [log] [blame]
Andi Kleen80eeb672016-09-19 17:39:33 -03001#ifndef JEVENTS_H
2#define JEVENTS_H 1
3
4int json_events(const char *fn,
Sukadev Bhattiprolu794ba542016-09-15 15:24:47 -07005 int (*func)(void *data, char *name, char *event, char *desc,
Andi Kleenfedb2b52017-01-27 18:03:37 -08006 char *long_desc,
7 char *pmu,
Andi Kleen96284812017-03-20 13:17:10 -07008 char *unit, char *perpkg, char *metric_expr,
9 char *metric_name),
Andi Kleen80eeb672016-09-19 17:39:33 -030010 void *data);
11char *get_cpu_str(void);
12
13#ifndef min
14#define min(x, y) ({ \
15 typeof(x) _min1 = (x); \
16 typeof(y) _min2 = (y); \
17 (void) (&_min1 == &_min2); \
18 _min1 < _min2 ? _min1 : _min2; })
19#endif
20
21#endif