[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200712185534.GB147742@krava>
Date: Sun, 12 Jul 2020 20:55:34 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Kajol Jain <kjain@...ux.ibm.com>
Cc: acme@...nel.org, peterz@...radead.org, mingo@...hat.com,
mark.rutland@....com, alexander.shishkin@...ux.intel.com,
pc@...ibm.com, namhyung@...nel.org, ak@...ux.intel.com,
yao.jin@...ux.intel.com, linux-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org, irogers@...gle.com,
maddy@...ux.ibm.com, ravi.bangoria@...ux.ibm.com,
anju@...ux.vnet.ibm.com, kan.liang@...ux.intel.com,
nasastry@...ibm.com
Subject: Re: [RFC v2 1/5] perf/pmu-events/jevents: Add enum to store
aggregation like PerPkg
On Tue, Jul 07, 2020 at 05:53:10PM +0530, Kajol Jain wrote:
SNIP
> }
>
> diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
> index 93fe72a9dc0b..3cafbb320d68 100644
> --- a/tools/perf/util/pmu.c
> +++ b/tools/perf/util/pmu.c
> @@ -306,7 +306,7 @@ static bool perf_pmu_merge_alias(struct perf_pmu_alias *newalias,
> static int __perf_pmu__new_alias(struct list_head *list, char *dir, char *name,
> char *desc, char *val,
> char *long_desc, char *topic,
> - char *unit, char *perpkg,
> + char *unit, char *aggr_mode,
> char *metric_expr,
> char *metric_name,
> char *deprecated)
> @@ -378,7 +378,7 @@ static int __perf_pmu__new_alias(struct list_head *list, char *dir, char *name,
> return -1;
> snprintf(alias->unit, sizeof(alias->unit), "%s", unit);
> }
> - alias->per_pkg = perpkg && sscanf(perpkg, "%d", &num) == 1 && num == 1;
> + alias->per_pkg = aggr_mode && sscanf(aggr_mode, "%d", &num) == 1 && num == 1;
should you rather use 'num == PerPkg' instead 'num == 1' ?
jirka
Powered by blists - more mailing lists