Large metrics such as Branch_Misprediction_Cost_SMT on x86 broadwell need more space. Signed-off-by: Ian Rogers <irogers@google.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Haiyan Song <haiyanx.song@intel.com> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: John Garry <john.garry@huawei.com> Cc: Kajol Jain <kjain@linux.ibm.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Clarke <pc@us.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Cc: Song Liu <songliubraving@fb.com> Cc: Stephane Eranian <eranian@google.com> Link: http://lore.kernel.org/lkml/20200501173333.227162-6-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
30 lines
685 B
C
30 lines
685 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef PARSE_CTX_H
|
|
#define PARSE_CTX_H 1
|
|
|
|
#define EXPR_MAX_OTHER 64
|
|
#define MAX_PARSE_ID EXPR_MAX_OTHER
|
|
|
|
struct expr_parse_id {
|
|
const char *name;
|
|
double val;
|
|
};
|
|
|
|
struct expr_parse_ctx {
|
|
int num_ids;
|
|
struct expr_parse_id ids[MAX_PARSE_ID];
|
|
};
|
|
|
|
struct expr_scanner_ctx {
|
|
int start_token;
|
|
int runtime;
|
|
};
|
|
|
|
void expr__ctx_init(struct expr_parse_ctx *ctx);
|
|
void expr__add_id(struct expr_parse_ctx *ctx, const char *id, double val);
|
|
int expr__parse(double *final_val, struct expr_parse_ctx *ctx, const char *expr, int runtime);
|
|
int expr__find_other(const char *expr, const char *one, const char ***other,
|
|
int *num_other, int runtime);
|
|
|
|
#endif
|