From: Namhyung Kim <namhyung@google.com>
To: Arnaldo Melo <acme@redhat.com>
Cc: Ian Rogers <irogers@google.com>,
Riccardo Mancini <rickyman7@gmail.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
namhyung@kernel.org, linux-kernel@vger.kernel.org,
linux-perf-users@vger.kernel.org
Subject: Re: perf report sort
Date: Fri, 13 Aug 2021 13:17:06 -0700 [thread overview]
Message-ID: <CAA4y5iARtvPfLEQ+UcrNMQwpwxXr56Of6U7ApiOqffHf8OCYWw@mail.gmail.com> (raw)
In-Reply-To: <CAGq6xJ4oo2WM2j58vkMayp_FikLEEJ7pK+oMcp=85aPGdEaFGg@mail.gmail.com>
+ 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
>>
parent reply other threads:[~2021-08-13 20:17 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <CAGq6xJ4oo2WM2j58vkMayp_FikLEEJ7pK+oMcp=85aPGdEaFGg@mail.gmail.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAA4y5iARtvPfLEQ+UcrNMQwpwxXr56Of6U7ApiOqffHf8OCYWw@mail.gmail.com \
--to=namhyung@google.com \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=irogers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=namhyung@kernel.org \
--cc=rickyman7@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).