Andi Kleen | 80eeb67 | 2016-09-19 17:39:33 -0300 | [diff] [blame] | 1 | #ifndef JEVENTS_H |
| 2 | #define JEVENTS_H 1 |
| 3 | |
| 4 | int json_events(const char *fn, |
Sukadev Bhattiprolu | 794ba54 | 2016-09-15 15:24:47 -0700 | [diff] [blame] | 5 | int (*func)(void *data, char *name, char *event, char *desc, |
Andi Kleen | fedb2b5 | 2017-01-27 18:03:37 -0800 | [diff] [blame] | 6 | char *long_desc, |
| 7 | char *pmu, |
Andi Kleen | 9628481 | 2017-03-20 13:17:10 -0700 | [diff] [blame] | 8 | char *unit, char *perpkg, char *metric_expr, |
| 9 | char *metric_name), |
Andi Kleen | 80eeb67 | 2016-09-19 17:39:33 -0300 | [diff] [blame] | 10 | void *data); |
| 11 | char *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 |