Re: [PATCH v4 07/17] perf jevents: Sort json files entries
From: John Garry <hidden>
Date: 2022-08-10 15:56:18
Also in:
linux-perf-users, lkml
From: John Garry <hidden>
Date: 2022-08-10 15:56:18
Also in:
linux-perf-users, lkml
On 10/08/2022 15:23, Ian Rogers wrote:
quoted
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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel