LKML Archive on
help / color / mirror / Atom feed
* Re: perf report sort
       [not found]   ` <>
@ 2021-08-13 20:17     ` Namhyung Kim
  0 siblings, 0 replies; only message in thread
From: Namhyung Kim @ 2021-08-13 20:17 UTC (permalink / raw)
  To: Arnaldo Melo
  Cc: Ian Rogers, Riccardo Mancini, Arnaldo Carvalho de Melo, namhyung,
	linux-kernel, linux-perf-users

+ LKML and linux-perf-users

On Thu, Aug 12, 2021 at 5:20 PM Arnaldo Melo <> wrote:
> On Thu, Aug 12, 2021 at 4:15 PM Namhyung Kim <> wrote:
>> Hi Ian,
>> On Wed, Aug 11, 2021 at 12:01 AM Ian Rogers <> wrote:
>> > My suspicion is that page_fault and _dl_relocate_object have identical
>> > numbers of samples (5.56%) but sorting by the symbol (in sort_order)
>> > should solve this. I suspect providing a sort order in the test will
>> > make it robust, but I'm confused looking at the builtin-report code as
>> > it reads that this should already happen. I wondered if you had any
>> > suggestions?
>> So actually the sort key doesn't sort the output. :(
>> It should be called 'group-by' rather than sort.
> I think there is value in changing this behaviour to match what Ian expected, don't you think?
> And also I think we should start doing this not via command line options, but via .perfconfig settings.
> And perhaps we can mark these kinds of settings as .perfconfig-only ones.
> This way we can have a 'perf config' mode that extracts these settings to share with others, or keep
> per-organization defaults.
> The range of preferences is huge, it is really difficult to find sane defaults that please everybody, so we probably should try to help facilitate per-community defaults.
> wdyt?

I agree that it's confusing especially with -F/--fields option.
If users want to change the behavior to be a real sort key
they probably need to use -F too.

Not sure what's the best way to handle it.  But by providing
the config option, I guess users should be aware of the
change and use appropriate options.

> - Arnaldo
> P.S.: This discussion should really have happened in the open, please consider replying to this CCing linux-perf-users & linux-kernel while keeping as-is this response :-)

Yep, Cc-ed.


>> The output is sorted by the overhead (= period) by default.
>> There is -F/--fields option to control which fields are displayed.
>> When it's used, the -s option will behave as (real) sort keys.
>> In fact, 'perf report' (using the default sort key) is same as
>>   perf report -F overhead,comm,dso,sym -s overhead
>> If you want to sort the output by symbol name,
>>   perf report -F overhead,comm,dso,sym -s sym
>> Maybe we need to change the test like above.
>> Thanks,
>> Namhyung

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-13 20:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <>
     [not found] ` <>
     [not found]   ` <>
2021-08-13 20:17     ` perf report sort Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).