All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ask for Help]LBR usage in kernel
@ 2020-02-20 13:53 陈弋玺
  2020-02-24  1:28 ` Xu, Like
  0 siblings, 1 reply; 2+ messages in thread
From: 陈弋玺 @ 2020-02-20 13:53 UTC (permalink / raw)
  To: linux-kernel, linux-x86_64

Hi experts,
    We want to try to retreive callchains of some perf events from LBR rather than frame stacks, as the information in frame stacks would be optimized by compiler. After investigating the usage of LBR in kernel, we found that LBR can only operated via Intel PMU, that means for now only callchains of hardware events can be retrieved from LBR. Is that correct? 
    If yes, I wonder if callchains of other perf events(eg. tracepoint, software events) can be retrieved from LBR? Or only callchains of events on PMU can be retrieved from LBR as there are some hardware restrictions?

Thanks for any help you can offer!

Best Regards,
Yixi Chen

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Ask for Help]LBR usage in kernel
  2020-02-20 13:53 [Ask for Help]LBR usage in kernel 陈弋玺
@ 2020-02-24  1:28 ` Xu, Like
  0 siblings, 0 replies; 2+ messages in thread
From: Xu, Like @ 2020-02-24  1:28 UTC (permalink / raw)
  To: 陈弋玺, linux-kernel, linux-x86_64

Hi 弋玺,

On 2020/2/20 21:53, 陈弋玺 wrote:
> Hi experts,
>      We want to try to retreive callchains of some perf events from LBR rather than frame stacks, as the information in frame stacks would be optimized by compiler. After investigating the usage of LBR in kernel, we found that LBR can only operated via Intel PMU,
The default driver to operate LBR on the Linux is the PMU deriver,
which is one of perf feature ofs and I assume you know about its basic usages.

     perf record -b ./workload
     perf record --call-graph lbr ./workload

Other performance monitoring tools like Emon, VTune and other non-opensource
commercial tools in Ring 0 could operate LBR as well.
> that means for now only callchains of hardware events can be retrieved from LBR. Is that correct?
the callchains and the basic branch records in sampling mode.
>   
>      If yes, I wonder if callchains of other perf events(eg. tracepoint, software events) can be retrieved from LBR?
Software events like trace points are not retrieved from LBR,
but you could wrapper them with intentional branch instructions changes.

> Or only callchains of events on PMU can be retrieved from LBR as there are some hardware restrictions?
I won't say its hardware restrictions but intentional behavior.
It's all about your innovative ideas to operate LBR for your purpose.

Thanks,
Like Xu
>
> Thanks for any help you can offer!
>
> Best Regards,
> Yixi Chen


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-24  1:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-20 13:53 [Ask for Help]LBR usage in kernel 陈弋玺
2020-02-24  1:28 ` Xu, Like

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.