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

2020-03-13 Thread kajoljain
On 3/12/20 4:22 PM, Jiri Olsa wrote: > On Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain wrote: > > SNIP > >> +static int metricgroup__add_metric_runtime_param(struct strbuf *events, >> +struct list_head *group_list, struct pmu_event *pe) >> +{ >> +int i, count; >>

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

2020-03-12 Thread Jiri Olsa
On Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain wrote: SNIP > diff --git a/tools/perf/util/expr.h b/tools/perf/util/expr.h > index 9377538f4097..d17664e628db 100644 > --- a/tools/perf/util/expr.h > +++ b/tools/perf/util/expr.h > @@ -15,6 +15,7 @@ struct parse_ctx { > struct parse_id

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

2020-03-12 Thread Jiri Olsa
On Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain wrote: SNIP > +static int metricgroup__add_metric_runtime_param(struct strbuf *events, > + struct list_head *group_list, struct pmu_event *pe) > +{ > + int i, count; > + int ret = -EINVAL; > + > + count =

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

2020-03-12 Thread Jiri Olsa
On Tue, Mar 10, 2020 at 03:34:55PM -0300, Arnaldo Carvalho de Melo wrote: SNIP > > diff --git a/tools/perf/arch/powerpc/util/header.c > > b/tools/perf/arch/powerpc/util/header.c > > index 3b4cdfc5efd6..036f6b2ce202 100644 > > --- a/tools/perf/arch/powerpc/util/header.c > > +++

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

2020-03-12 Thread Jiri Olsa
On Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain wrote: SNIP > diff --git a/tools/perf/util/expr.l b/tools/perf/util/expr.l > index 1928f2a3dddc..ec4b00671f67 100644 > --- a/tools/perf/util/expr.l > +++ b/tools/perf/util/expr.l > @@ -45,6 +45,21 @@ static char *normalize(char *str) >

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

2020-03-12 Thread Jiri Olsa
On Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain wrote: SNIP > diff --git a/tools/perf/util/metricgroup.c b/tools/perf/util/metricgroup.c > index c3a8c701609a..11eeeb929b91 100644 > --- a/tools/perf/util/metricgroup.c > +++ b/tools/perf/util/metricgroup.c > @@ -474,6 +474,98 @@ static bool

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

2020-03-12 Thread kajoljain
On 3/11/20 12:04 AM, Arnaldo Carvalho de Melo wrote: > Em Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain escreveu: >> Patch enhances current metric infrastructure to handle "?" in the metric >> expression. The "?" can be use for parameters whose value not known while >> creating metric

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

2020-03-10 Thread Arnaldo Carvalho de Melo
Em Mon, Mar 09, 2020 at 11:55:50AM +0530, Kajol Jain escreveu: > 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

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

2020-03-09 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