* brstack information with perf-intel-pt?
@ 2023-02-13 18:33 Iti Shree
2023-03-06 6:54 ` Adrian Hunter
0 siblings, 1 reply; 4+ messages in thread
From: Iti Shree @ 2023-02-13 18:33 UTC (permalink / raw)
To: linux-perf-users
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?
Best regard,
Iti
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: brstack information with perf-intel-pt?
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
0 siblings, 1 reply; 4+ messages in thread
From: Adrian Hunter @ 2023-03-06 6:54 UTC (permalink / raw)
To: Iti Shree, linux-perf-users
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.
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: brstack information with perf-intel-pt?
2023-03-06 6:54 ` Adrian Hunter
@ 2023-03-08 8:49 ` Iti Shree
2023-03-08 18:57 ` Adrian Hunter
0 siblings, 1 reply; 4+ messages in thread
From: Iti Shree @ 2023-03-08 8:49 UTC (permalink / raw)
To: Adrian Hunter; +Cc: linux-perf-users
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?
> 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?).
Thank you again. Good day!
Iti
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: brstack information with perf-intel-pt?
2023-03-08 8:49 ` Iti Shree
@ 2023-03-08 18:57 ` Adrian Hunter
0 siblings, 0 replies; 4+ messages in thread
From: Adrian Hunter @ 2023-03-08 18:57 UTC (permalink / raw)
To: Iti Shree; +Cc: linux-perf-users
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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-08 18:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).