mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-28 21:45:01 +08:00
03fe02b113
A new field "MetricConstraint" is introduced in JSON event list. Extend jevents to parse the field and save the value in metric_constraint. Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Link: http://lore.kernel.org/lkml/1582581564-184429-2-git-send-email-kan.liang@linux.intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
24 lines
631 B
C
24 lines
631 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#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, char *metric_expr,
|
|
char *metric_name, char *metric_group,
|
|
char *deprecated, char *metric_constraint),
|
|
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
|