From: Taeung Song <treeze.taeung@gmail.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>,
LKML <linux-kernel@vger.kernel.org>, Jiri Olsa <jolsa@kernel.org>,
Milian Wolff <milian.wolff@kdab.com>
Subject: Re: [QUESTION] perf annotate: how do we fix the 'total period' feature ?
Date: Wed, 5 Jul 2017 15:50:39 +0900 [thread overview]
Message-ID: <75f62a2d-a9f2-1d08-926b-a1615ef14f45@gmail.com> (raw)
In-Reply-To: <CAM9d7cjoBNK3bhchz9yKkE2OOE4OBO-J3a8jaGTN7PXHPFZM6Q@mail.gmail.com>
Hi Namhyung :)
On 07/05/2017 03:07 PM, Namhyung Kim wrote:
> Hi Taeung,
>
> On Wed, Jul 5, 2017 at 2:47 PM, Taeung Song <treeze.taeung@gmail.com> wrote:
>> Hi,
>>
>> Two problems of perf-annotate were mentioned in recent PATCH reviews
>> by Milian and Namhyung.
>>
>> Currently perf-annotate has a '--show-total-period' option
>> and a 't' key "Toggle total period view" on TUI browser.
>
> Hmm... I didn't notice it has the option. I think its name is
> incorrect and should be --show-nr-samples in accordance with perf
> report.
>
>
Okey, I got it.
>>
>> However, they actually show the number of samples, not period(Raw number of
>> event count of sample).
>> So it's a different number to the perf report like below.
>>
>> For example,
>>
>> $ perf report --stdio --show-nr-sample --show-total-period -S hex2u64
>> ...
>> # Overhead Samples Period Command Shared Object
>> # ........ ............ ............ ....... .............
>> #
>> 3.07% 36 26484668 perf perf
>>
>>
>> $ perf annotate --stdio --show-total-period -s hex2u64
>> Percent | Source code & Disassembly of perf for cycles:ppp (36
>> samples)
>> -----------------------------------------------------------------------------
>> :
>> :
>> :
>> : Disassembly of section .text:
>> :
>> : 000000000053ef9e <hex2u64>:
>> : hex2u64():
>> 0 : 53ef9e: push %rbp
>> 0 : 53ef9f: mov %rsp,%rbp
>> 0 : 53efa2: sub $0x30,%rsp
>> 1 : 53efa6: callq 424810
>> <pthread_attr_setdetachstate@plt+0x10>
>> 0 : 53efab: mov %rdi,-0x28(%rbp)
>> 2 : 53efaf: mov %rsi,-0x30(%rbp)
>> ...
>>
>> Problems:
>> 1) the total period of perf-annotate is different from perf-report's
>> 2) perf-annotate only shows the first column as 'Percent'
>> (even though the number of samples for each addr are actually printed)
>>
>> So we need to just rename it ? ('total period' -> 'samples')
>>
>> Or,
>> we should enable perf-annotate to support both features for 'periods' and
>> 'samples' ?
>
> I think we should support both. Then you need to change the code to
> save periods when processing samples and show them in the annotate
> IMHO.
>
> Thanks,
> Namhyung
>
Currently perf-annotate only count the number of samples for each addr
in __symbol__inc_addr_samples() of util/annotate.c when processing samples.
But it seems to make new functions for 'periods'..
Okey, I got hints of how to fix this problems.
will send the PATCH for them ! :)
Thanks,
Taeung
prev parent reply other threads:[~2017-07-05 6:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-05 5:47 Taeung Song
2017-07-05 6:07 ` Namhyung Kim
2017-07-05 6:50 ` Taeung Song [this message]
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=75f62a2d-a9f2-1d08-926b-a1615ef14f45@gmail.com \
--to=treeze.taeung@gmail.com \
--cc=arnaldo.melo@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=milian.wolff@kdab.com \
--cc=namhyung@kernel.org \
/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
all inboxes | Powered by JetHome®