Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1681313
| Path | csiph.com!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Taeung Song <treeze.taeung@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [QUESTION] perf annotate: how do we fix the 'total period' feature ? |
| Date | Wed, 05 Jul 2017 09:00:02 +0200 |
| Message-ID | <tZMs2-2Ms-9@gated-at.bofh.it> (permalink) |
| References | <tZLmi-27Q-11@gated-at.bofh.it> <tZLFE-2ti-13@gated-at.bofh.it> |
| X-Original-To | Namhyung Kim <namhyung@kernel.org> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=xbsoh/BddENlql3fZ2rXygtJJaatUaQtKwA/WreMtBI=; b=uZDrEFUDiWor/viJtquyQla9jqutcY7A8Z4DUjxYWVz5uxOhyJMmlJPCFJHIA2wmzt jwHBz9zjTwCgQ/URAQyWCjfsgjnK1vE4+J4ZQUUSG2DyHUUgyl1rm7qag/hsPFBJ398p r4vSWQhImBo1Qbi49pYPbDU/lgqbW+fCFULS8owvYWBYznKBAVODxQ6/rl8A8aiI151U xJxaCZOSKwfDU9IoWsoZkKp5EbouEnXNLF8X8AKuoHvVcn7whlBWRO6R+6HyhT2abqzf Xi2je8WzrqpKAmGb2AIjEasOcRAmNJ/zSTfFmXZesoQGBedlUmZTTkWBONQIWE/shSrq zlQQ== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=xbsoh/BddENlql3fZ2rXygtJJaatUaQtKwA/WreMtBI=; b=SKzXD1OcbiowoWUFR+gJKbnGetCe+bJ1rwQUPgvPF4NOR3kQdLV7jP9I9B/MpQc2hU GvraoGVUttI5kzflm7WbWQHNISlNUaYlOojUgOwSLdygVaXHrLeMwCrr504h/EK+BkjB DHEhnTTnOrFhBluZbQnnS+DsqSAteVLSojQHK8eJTZ6WvecFZ35LR9kclAv6uDP02+XA lH52WuSDynmOdeM2b6ey1A5BFCH9j3+8rR7DIA0aNQ6JV/ZKacMXPNBRaZYuWDXIX02m LdlskMN+8c1OEmRbTl3OvxAQq5wsR1rn4kIoL1YNQ2pdeNXiG6hOqPwUgFHG/W0bgQ71 kJfA== |
| X-Gm-Message-State | AIVw111EtPZiEoOIWbKIE53ny/6IM9rD5qtPzshyg521P0pcTOM37yPy 7NA76wVzijgEyw== |
| X-Received | by 10.84.225.19 with SMTP id t19mr20321545plj.238.1499237442868; Tue, 04 Jul 2017 23:50:42 -0700 (PDT) |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Language | en-US |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 85 |
| Organization | linux.* mail to news gateway |
| X-Original-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> |
| X-Original-Date | Wed, 5 Jul 2017 15:50:39 +0900 |
| X-Original-Message-ID | <75f62a2d-a9f2-1d08-926b-a1615ef14f45@gmail.com> |
| X-Original-References | <a7a611a6-1544-ae69-9068-0c65ca6313cf@gmail.com> <CAM9d7cjoBNK3bhchz9yKkE2OOE4OBO-J3a8jaGTN7PXHPFZM6Q@mail.gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1681313 |
Show key headers only | View raw
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[QUESTION] perf annotate: how do we fix the 'total period' feature ? Taeung Song <treeze.taeung@gmail.com> - 2017-07-05 07:50 +0200
Re: [QUESTION] perf annotate: how do we fix the 'total period' feature ? Namhyung Kim <namhyung@kernel.org> - 2017-07-05 08:10 +0200
Re: [QUESTION] perf annotate: how do we fix the 'total period' feature ? Taeung Song <treeze.taeung@gmail.com> - 2017-07-05 09:00 +0200
csiph-web