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

From: Jiri Olsa <[email-masked]>
Date: Mon, 2 Mar 2020 16:09:03 +0100

On Sat, Feb 29, 2020 at 03:11:57PM +0530, Kajol Jain wrote:

SNIP

> +					*dst++ = paramval[i++];
> +				free(paramval);
> +			}
> +		}
>  		else
>  			*dst++ = *str;
>  		str++;
> @@ -72,8 +86,8 @@ number		[0-9]+
>  
>  sch		[-,=]
>  spec		\\{sch}
> -sym		[0-9a-zA-Z_\.:@]+
> -symbol		{spec}*{sym}*{spec}*{sym}*
> +sym            [0-9a-zA-Z_\.:@?]+
> +symbol         {spec}*{sym}*{spec}*{sym}*{spec}*{sym}
>  
>  %%
>  	{
> diff --git a/tools/perf/util/expr.y b/tools/perf/util/expr.y
> index 4720cbe79357..0f3ef0f37bf4 100644
> --- a/tools/perf/util/expr.y
> +++ b/tools/perf/util/expr.y
> @@ -38,6 +38,8 @@
>  %type <num> expr if_expr
>  
>  %{
> +int expr__runtimeparam;

we don't like global variables.. could this be part of the
contaxt struct?

jirka