From: Jiri Olsa <jolsa@redhat.com>
To: Wei Li <liwei391@huawei.com>
Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
alexander.shishkin@linux.intel.com, namhyung@kernel.org,
yao.jin@linux.intel.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf: fix getting source line failure in annotate
Date: Thu, 21 Feb 2019 12:05:59 +0100 [thread overview]
Message-ID: <20190221110559.GF10990@krava> (raw)
In-Reply-To: <20190221095716.39529-1-liwei391@huawei.com>
On Thu, Feb 21, 2019 at 05:57:16PM +0800, Wei Li wrote:
SNIP
> liwei@euler:~/main_code/hulk_work/hulk/tools/perf$ sudo ./perf record ./common_while_1
> [ perf record: Woken up 2 times to write data ]
> [ perf record: Captured and wrote 0.488 MB perf.data (12500 samples) ]
> liwei@euler:~/main_code/hulk_work/hulk/tools/perf$ sudo ./perf annotate -l -s hotspot_1 --stdio
>
> Sorted summary for file /home/liwei/main_code/hulk_work/hulk/tools/perf/common_while_1
> ----------------------------------------------
>
> 33.34 common_while_1.c:5
> 33.34 common_while_1.c:6
> 33.32 common_while_1.c:7
> Percent | Source code & Disassembly of common_while_1 for cycles:ppp (12482 samples, percent: local period)
> -----------------------------------------------------------------------------------------------------------------
> :
> :
> :
> : Disassembly of section .text:
> :
> : 00000000000005fa <hotspot_1>:
> : hotspot_1():
> : void hotspot_1(void)
> : {
> 0.00 : 5fa: push %rbp
> 0.00 : 5fb: mov %rsp,%rbp
> : volatile int i;
> :
> : for (i = 0; i < 0x10000000; i++);
> 0.00 : 5fe: movl $0x0,-0x4(%rbp)
> 0.00 : 605: jmp 610 <hotspot_1+0x16>
> 0.00 : 607: mov -0x4(%rbp),%eax
> common_while_1.c:5 4.70 : 60a: add $0x1,%eax
> 4.89 : 60d: mov %eax,-0x4(%rbp)
> common_while_1.c:5 19.03 : 610: mov -0x4(%rbp),%eax
> common_while_1.c:5 4.72 : 613: cmp $0xfffffff,%eax
> 0.00 : 618: jle 607 <hotspot_1+0xd>
> : for (i = 0; i < 0x10000000; i++);
> 0.00 : 61a: movl $0x0,-0x4(%rbp)
> 0.00 : 621: jmp 62c <hotspot_1+0x32>
> 0.00 : 623: mov -0x4(%rbp),%eax
> common_while_1.c:6 4.54 : 626: add $0x1,%eax
> 4.73 : 629: mov %eax,-0x4(%rbp)
> common_while_1.c:6 19.54 : 62c: mov -0x4(%rbp),%eax
> common_while_1.c:6 4.54 : 62f: cmp $0xfffffff,%eax
> ...
>
> Fixes: 425859ff0de33 ("perf annotate: No need to calculate notes->start twice")
Acked-by: Jiri Olsa <jolsa@kernel.org>
thanks,
jirka
next prev parent reply other threads:[~2019-02-21 11:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-21 9:57 [PATCH] perf: fix getting source line failure in annotate Wei Li
2019-02-21 11:05 ` Jiri Olsa [this message]
2019-02-21 20:02 ` Arnaldo Carvalho de Melo
2019-02-28 7:48 ` [tip:perf/core] perf annotate: Fix getting source line failure tip-bot for Wei Li
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=20190221110559.GF10990@krava \
--to=jolsa@redhat.com \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liwei391@huawei.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=yao.jin@linux.intel.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).