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

From: Jiri Olsa <[email-masked]>
Date: Mon, 30 Mar 2020 21:35:58 +0200

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 value(yyscanner, 10); }
> -{symbol}	{ return str(yyscanner, ID); }
> +{symbol}	{ return str(yyscanner, ID, sctx->runtime_param); }
>  "|"		{ return '|'; }
>  "^"		{ return '^'; }
>  "&"		{ return '&'; }
> diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c
> index b905eaa907a7..66695b4a358d 100644
> --- a/tools/perf/util/metricgroup.c
> +++ b/tools/perf/util/metricgroup.c
> @@ -90,6 +90,7 @@ struct egroup {
>  	const char *metric_name;
>  	const char *metric_expr;
>  	const char *metric_unit;
> +	int param;

could you please use runtime_param everywhere? ... s/param/runtime_param/
or maybe just 'runtime' to keep it short..? it's param in any case ;-)

other than that it looks ok

jirka