[lttng-dev] get function names with lttng-ust-cyg-profile
    Liu, Changcheng 
    changcheng.liu at intel.com
       
    Fri Jun 26 22:38:30 EDT 2020
    
    
  
Hi Christophe,
    I've checked lots of examples about func_entry/exit. It seems all
    the address are the linked address. However, my result shows that
    they're the loaded running address.
    Do you have some suggestions to check it further?
B.R.
Changcheng
On 22:22 Fri 26 Jun, Liu, Changcheng wrote:
> On 10:19 Fri 26 Jun, Christophe Bédard wrote:
> >    Hi,
> >    On Tue, 23 Jun 2020 at 21:45, Liu, Changcheng
> >    <[1]changcheng.liu at intel.com> wrote:
> > 
> >      Do you know how to print the call site function_name/offset?
> >      For example:
> >                  11     getchar();
> >                  12
> >                  13     x = add3(x);
> >      Currently, it only shows call_site address instead of function name
> >      with offset.
> >      func_entry: { cpu_id = 2 }, { ip = 0x55CFA4F5C1EE, debug_info = {
> >      bin = "instrument+0x11ee", func = "main+0", src = "instrument.c:7"
> >      }, vpid = 8523 }, { addr = 0x55CFA4F5C1EE, call_site =
> >      0x7F27C4B1E0B3 }
> >      func_entry: { cpu_id = 1 }, { ip = 0x55CFA4F5C1A9, debug_info = {
> >      bin = "instrument+0x11a9", func = "add3+0", src = "instrument.c:3"
> >      }, vpid = 8523 }, { addr = 0x55CFA4F5C1A9, call_site =
> >      0x55CFA4F5C237 }
> >      func_exit: { cpu_id = 1 }, { ip = 0x55CFA4F5C1A9, debug_info = { bin
> >      = "instrument+0x11a9", func = "add3+0", src = "instrument.c:3" },
> >      vpid = 8523 }, { addr = 0x55CFA4F5C1A9, call_site = 0x55CFA4F5C237 }
> >      func_exit: { cpu_id = 1 }, { ip = 0x55CFA4F5C1EE, debug_info = { bin
> >      = "instrument+0x11ee", func = "main+0", src = "instrument.c:7" },
> >      vpid = 8523 }, { addr = 0x55CFA4F5C1EE, call_site = 0x7F27C4B1E0B3 }
> > 
> >     Maybe I'm missing something, but isn't it right here? E.g.
>       I'm also curious about the output here. "main+0" the function name
>       "main" is right, but the offset "+0" isn't right.
>       I've run it for several times, it always shows like the above
>       output.
>       So, two questions here:
>       1. How to show the rigth offset?
>       2. How to show call_site in "func/offset" format?
> > 
> >      debug_info = { bin = "instrument+0x11ee", func = "main+0", src =
> >      "instrument.c:7" }
> > 
> >    Otherwise, I don't think babeltrace can provide any more information.
> >    Christophe
> > 
> > References
> > 
> >    1. mailto:changcheng.liu at intel.com
    
    
More information about the lttng-dev
mailing list