libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] remote unwinding and perf_event_open


From: jblereste
Subject: [Libunwind-devel] remote unwinding and perf_event_open
Date: Wed, 6 Jul 2016 19:14:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0

Hi libunwind team,

I'm making a profiler using the perf_event_open system call.
I try to record callchain information for each function.

One option is to use PERF_SAMPLE_CALLCHAIN to get callchain information attached to a sample.
Unfortunately, when sample occurs in the system or some external libraries (openMP, MPI...) callchain info are missing.

To retrieve them, I read in the perf_event_open documentation that I can use
PERF_SAMPLE_STACK_USER and PERF_SAMPLE_REGS_USER  to do stack unwinding.

So now, for one sample I have the CPU register state and the stack (actually a part of the stack).

Now I have to use libunwind in remote mode to retrieve the callchain.
I supposed that I have to create the address space with the unw_create_addr_space function.

In the documentation, I see 8 call-back routines :
 - find_proc_info
 - put_unwind_info
 - get_dyn_info_list_addr
 - access_mem
 - access_reg
 - access_fpreg
 - resume
 - get_proc_name

Do I need to implement every routines to retrieve the callchain ?
Do you know where I can have more information about the implementation of these routines ?

Thank you for your help,

Jean-Baptiste.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]