From: Adrian Hunter <adrian.hunter@intel.com>
To: Iti Shree <itishree1999@gmail.com>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: brstack information with perf-intel-pt?
Date: Wed, 8 Mar 2023 20:57:49 +0200 [thread overview]
Message-ID: <921ab358-691d-26b6-a8f2-1f34239b571a@intel.com> (raw)
In-Reply-To: <CAO3P5YTf+by5ppR2K44Bw+1h0B2JAZH__oJThS6hepAe5v6LMg@mail.gmail.com>
On 8/03/23 10:49, Iti Shree wrote:
> Hello Adrian,
>
> Thank you for the reply and the link to itrace page.
>
> On Mon, Mar 6, 2023 at 6:54 AM Adrian Hunter <adrian.hunter@intel.com> wrote:
>>
>> On 13/02/23 20:33, Iti Shree wrote:
>>> Hello,
>>> I am trying to get brstack information in perf.data with intel-pt
>>> flag. I am passing following command for the following: perf record -e
>>> intel-pt// -m, 32768
>>>
>>> When I try to check if brstack is present in the gathered data with :
>>> perf script -F pid, ip, brstack -i pt-perf.data I can only see pid and
>>> ip information.
>>>
>>> I can seem to find branching information with --itrace=b however I was
>>> wondering if there is any way I can get brstack information decoded
>>> into perf.data when I use intel-pt flag similar to what I get with
>>> default perf record?
>>
>> You need to use --itrace=li which will synthesize "instructions" events
>> and add a branch stack. Note that the period of the instructions events
>> can be defined e.g. --itrace=li10us for 10 microseconds. And also the
>> max size of the branch stack e.g. --itrace=l10i for 10 branches.
>>
>
> I am wondering if I can get a branch stack on "branches" events Either
> by some --itrace options (I tried --itrace=Lcr/lcr) or by modifying
> perf's codebase a bit?
At the moment the code will not synthesize a branch stack for a
synthesized branch event. "L" is for synthesizing a branch stack
for real events (e.g. -e branch-misses) where as "l" synthesizes
branch stacks only for synthesized instructions, cycles or
transactions events.
So the code would have to be modified.
But how are you consuming the data? "perf report"?
>
>> Typically you need to be aware of decoding errors also, so also add
>> the 'e' option i.e. --itrace=el10i10us. There is also 'L' which adds
>> the branch stack to non-synthesized events (that you may have added
>> with the -e option).
>
>> Some more information about --itrace for Intel PT is here:
>>
>> https://perf.wiki.kernel.org/index.php/Latest_Manual_Page_of_perf-intel-pt.1#New_--itrace_option
>>
>> General information and examples for about Intel PT can be found here:
>>
>> https://perf.wiki.kernel.org/index.php/Perf_tools_support_for_Intel%C2%AE_Processor_Trace
>>
>>
>
> Another question, not related. I am working quite a bit with perf and
> Intel PT right now, is there any sort of active IRC channel/slack or
> discord for more interactive discussions? If not, would it be okay to
> cc you (or where can I find the right people to reach out?).
It is just fine to email me and cc linux-perf-users@vger.kernel.org
>
> Thank you again. Good day!
>
> Iti
prev parent reply other threads:[~2023-03-08 18:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 18:33 brstack information with perf-intel-pt? Iti Shree
2023-03-06 6:54 ` Adrian Hunter
2023-03-08 8:49 ` Iti Shree
2023-03-08 18:57 ` Adrian Hunter [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=921ab358-691d-26b6-a8f2-1f34239b571a@intel.com \
--to=adrian.hunter@intel.com \
--cc=itishree1999@gmail.com \
--cc=linux-perf-users@vger.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;
as well as URLs for NNTP newsgroup(s).