[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3f0579b3-2d58-c8c6-3e3f-ff966ad09bad@huawei.com>
Date: Wed, 10 Aug 2022 16:53:41 +0100
From: John Garry <john.garry@...wei.com>
To: Ian Rogers <irogers@...gle.com>
CC: Will Deacon <will@...nel.org>, James Clark <james.clark@....com>,
"Mike Leach" <mike.leach@...aro.org>, Leo Yan <leo.yan@...aro.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
"Arnaldo Carvalho de Melo" <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
"Alexander Shishkin" <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Andi Kleen <ak@...ux.intel.com>,
"Zhengjun Xing" <zhengjun.xing@...ux.intel.com>,
Ravi Bangoria <ravi.bangoria@....com>,
Kan Liang <kan.liang@...ux.intel.com>,
Adrian Hunter <adrian.hunter@...el.com>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-perf-users@...r.kernel.org>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH v4 07/17] perf jevents: Sort json files entries
On 10/08/2022 15:23, Ian Rogers wrote:
>> We sort the attributes of the events alphabetically by attribute name,
>> right? Is there any advantage in this? Do we need it for later?
>
> The sort order is given by the tuple:
> (not j.desc is None, fix_none(j.topic), fix_none(j.name),
> fix_none(j.pmu), fix_none(j.metric_name))
> which is putting events with descriptions and topics before those
> without, then sorting by name, then pmu and finally metric_name. The
> advantage is that when we qsort alias events:
> https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/perf/util/pmu.c?h=perf/core#n1759
> the events are already in the sorted format, which should make the
> code faster -
ok, so can you mention that in the commit message? Just writing that you
want to replicate cmp_sevent from pmu.c does not tell us this clearly.
> it still has to qsort the sysfs events.
thanks,
John
Powered by blists - more mailing lists