linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: perf report sort
       [not found]   ` <CAGq6xJ4oo2WM2j58vkMayp_FikLEEJ7pK+oMcp=85aPGdEaFGg@mail.gmail.com>
@ 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 <acme@redhat.com> wrote:
>
> On Thu, Aug 12, 2021 at 4:15 PM Namhyung Kim <namhyung@google.com> wrote:
>>
>> Hi Ian,
>>
>> On Wed, Aug 11, 2021 at 12:01 AM Ian Rogers <irogers@google.com> 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.

Thanks,
Namhyung


>
>>
>> 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] <CAP-5=fUV-Tbo+X-myLZ2z8hpjBbHUrgLN6wq9z_wsykyXgxp+g@mail.gmail.com>
     [not found] ` <CAA4y5iAnwnubx1hSxrfopPajqNnyH+UWWUvMZJqsiyy=L3sx-w@mail.gmail.com>
     [not found]   ` <CAGq6xJ4oo2WM2j58vkMayp_FikLEEJ7pK+oMcp=85aPGdEaFGg@mail.gmail.com>
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).