Re: [PATCH v7 4/6] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-30 Thread Jiri Olsa
On Fri, Mar 27, 2020 at 03:55:26PM +0530, Kajol Jain wrote: SNIP > > %% > struct expr_scanner_ctx *sctx = expr_get_extra(yyscanner); > @@ -93,7 +106,7 @@ if { return IF; } > else { return ELSE; } > #smt_on { return SMT_ON; } > {number} { return

Re: [PATCH v7 4/6] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-30 Thread Jiri Olsa
On Fri, Mar 27, 2020 at 03:55:26PM +0530, Kajol Jain wrote: SNIP > diff --git a/tools/perf/tests/expr.c b/tools/perf/tests/expr.c > index ea10fc4412c4..516504cf0ea5 100644 > --- a/tools/perf/tests/expr.c > +++ b/tools/perf/tests/expr.c > @@ -10,7 +10,7 @@ static int test(struct expr_parse_ctx

[PATCH v7 4/6] perf/tools: Enhance JSON/metric infrastructure to handle "?"

2020-03-27 Thread Kajol Jain
Patch enhances current metric infrastructure to handle "?" in the metric expression. The "?" can be use for parameters whose value not known while creating metric events and which can be replace later at runtime to the proper value. It also add flexibility to create multiple events out of single