lkml.org 
[lkml]   [2022]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4 07/17] perf jevents: Sort json files entries
From
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

\
 
 \ /
  Last update: 2022-08-10 17:57    [W:0.061 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site