You’re really not going to want to write a stack-unwinder by yourself, even 
with Dwarf it’s a horrible process, like building a space-ship from cheerios. 

I would recommend you take a look at this API and use it to integrate if you 
are planning on unwinding the stack. It does all the DWARF magic for you.

http://www.dyninst.org/stackwalker <http://www.dyninst.org/stackwalker>

Phil

> On Feb 11, 2016, at 11:56 AM, Stephane Eranian <eran...@googlemail.com> wrote:
> 
> Hi,
> 
> On Wed, Feb 10, 2016 at 9:04 AM, Maxime Colmant <maxime.colm...@inria.fr 
> <mailto:maxime.colm...@inria.fr>> wrote:
> Hello,
> 
> I’m trying to play with the PERF_SAMPLE_STACK_USER field for recording the 
> user stack level.
> I’m able to configure all the stuffs correctly and to read the corresponding 
> fields (all expected bytes are read) inside the PERF_RECORD_SAMPLE record.
> However, I don’t know how to use the field data[size] from it.
> 
> To unwind correctly, you need to have PERF_SAMPLE_STACK_USER and 
> PERF_SAMPLE_REGS_USER so that you capture
> the machine state at the user level. You should look at the perf code, it has 
> the support for this when you do:
> $ perf record --call_graph dwarf ......
> $ perf report -g
>  
> I’m aware of libdwarf and libunwinding but I don’t know how to link this 
> field and these libraries together.
> How can I unwind the stack with that?
> 
> And yes, they are using libunwind.
> 
> 
> 
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 
> <http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140>
> _______________________________________________
> perfmon2-devel mailing list
> perfmon2-devel@lists.sourceforge.net 
> <mailto:perfmon2-devel@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel 
> <https://lists.sourceforge.net/lists/listinfo/perfmon2-devel>
> 
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140_______________________________________________
> perfmon2-devel mailing list
> perfmon2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to