From: Yang Jihong <yangjihong1@huawei.com>
To: Leo Yan <leo.yan@linaro.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>,
<mark.rutland@arm.com>, <alexander.shishkin@linux.intel.com>,
<jolsa@redhat.com>, <namhyung@kernel.org>,
<linux-perf-users@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] perf annotate: Add itrace options support
Date: Tue, 15 Jun 2021 15:19:48 +0800 [thread overview]
Message-ID: <52532fa6-8883-ee5a-7047-53415f9d34f9@huawei.com> (raw)
In-Reply-To: <20210615040447.GB9844@leoy-ThinkPad-X240s>
Hello, Leo and Arnaldo,
On 2021/6/15 12:04, Leo Yan wrote:
> Hi Jihong,
>
> Loop in Adrain to be aware this AUX trace change.
>
> On Tue, Jun 15, 2021 at 10:40:36AM +0800, Yang Jihong wrote:
>> The "auxtrace_info" and "auxtrace" functions are not set in "tool" member of
>> "annotate". As a result, perf annotate does not support parsing itrace data.
>>
>> Before:
>>
>> # perf record -e arm_spe_0/branch_filter=1/ -a sleep 1
>> [ perf record: Woken up 9 times to write data ]
>> [ perf record: Captured and wrote 20.874 MB perf.data ]
>> # perf annotate --stdio
>> Error:
>> The perf.data data has no samples!
>>
>> Solution:
>> 1.Add itrace options in help,
>> 2.Set hook functions of "auxtrace_info" and "auxtrace" in perf_tool.
>>
>> After:
>>
>> # perf record --all-user -e arm_spe_0/branch_filter=1/ ls
>> Couldn't synthesize bpf events.
>> perf.data
>> [ perf record: Woken up 1 times to write data ]
>> [ perf record: Captured and wrote 0.010 MB perf.data ]
>> # perf annotate --stdio
>
>> Percent | Source code & Disassembly of libc-2.28.so for branch-miss (1 samples, percent: local period)
>> ------------------------------------------------------------------------------------------------------------
>> :
>> :
>> :
>> : Disassembly of section .text:
>> :
>> : 0000000000066180 <__getdelim@@GLIBC_2.17>:
>> 0.00 : 66180: stp x29, x30, [sp, #-96]!
>> 0.00 : 66184: cmp x0, #0x0
>> 0.00 : 66188: ccmp x1, #0x0, #0x4, ne // ne = any
>> 0.00 : 6618c: mov x29, sp
>> 0.00 : 66190: stp x24, x25, [sp, #56]
>> 0.00 : 66194: stp x26, x27, [sp, #72]
>> 0.00 : 66198: str x28, [sp, #88]
>> 0.00 : 6619c: b.eq 66450 <__getdelim@@GLIBC_2.17+0x2d0> // b.none
>> 0.00 : 661a0: stp x22, x23, [x29, #40]
>
> [...]
>
> Nitpick: the above example is not typical for annotation, since it
> doesn't show any C source code with samples. At my side, I tested this
> patch and confirmed the patch works well with below commands:
>
> # gcc -ggdb -O0 -o task_migration task_migration.c
> # perf record -e cs_etm/@tmc_etr0/u --per-thread ./task_migration
> # perf annotate --itrace=i1000 --stdio
>
> The complete annotation result can be reviewed at [1].
>
> Thus for this patch:
>
> Tested-by: Leo Yan <leo.yan@linaro.org>
>
> [1] https://paste.ubuntu.com/p/pHz74MYRPJ/
>
> [...]
> .
>
Thank you very much for the detailed testing of this patch :)
Yes, this example may not be well written.
Arnaldo, please check whether the commit message needs to be modified.
If yes, I will resubmit a new v4 patch
Thanks,
Jihong
next prev parent reply other threads:[~2021-06-15 7:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 2:40 [PATCH v3] perf annotate: Add itrace options support Yang Jihong
2021-06-15 4:04 ` Leo Yan
2021-06-15 7:19 ` Yang Jihong [this message]
2021-06-15 8:22 ` Adrian Hunter
2021-06-15 9:28 ` Yang Jihong
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=52532fa6-8883-ee5a-7047-53415f9d34f9@huawei.com \
--to=yangjihong1@huawei.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=leo.yan@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.