Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1487782

Re: failed to add c++ probe

From Masami Hiramatsu <mhiramat@kernel.org>
Newsgroups linux.kernel
Subject Re: failed to add c++ probe
Date 2016-09-21 05:40 +0200
Message-ID <sjGy6-3Gi-9@gated-at.bofh.it> (permalink)
References <sj3wJ-3KO-15@gated-at.bofh.it> <sjfRf-3tA-11@gated-at.bofh.it> <sjgkh-3D7-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, 20 Sep 2016 01:32:04 +0200 (CEST)
Thomas Gleixner <tglx@linutronix.de> wrote:

> Masami,
> 
> On Tue, 20 Sep 2016, Masami Hiramatsu wrote:
> > Hmm, could you try to find mangled symbol from the library as below?
> > 
> > ./perf probe -x /usr/lib64/libstdc++.so.6 -F \*
> > 
> > And also try to do adding probe with -v option again?
> > 
> > In my case, I could find the mangled symbol, but failed to setup the probe...
> 
> ./perf probe -x /usr/lib/x86_64-linux-gnu/libstdc++.so.6 -v _X_ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv
> probe-definition(0): _X_ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv 
> symbol:_X_ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv file:(null) line:0 offset:0 return:0 lazy:(null)
> 0 arguments
> symbol:catch file:(null) line:0 offset:0 return:0 lazy:(null)
> symbol:throw file:(null) line:0 offset:0 return:0 lazy:(null)
> symbol:rethrow file:(null) line:0 offset:0 return:0 lazy:(null)
> Open Debuginfo file: /usr/lib/debug/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
> Try to find probe point from debuginfo.
> Symbol _X_ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv address found : 8c620
> Matched function: is_open
> found inline addr: 0x8cad0
> Probe point found: is_open+0
> found inline addr: 0x8cac0
> Probe point found: is_open+0
> found inline addr: 0x8cab0
> Probe point found: is_open+0
> Matched function: is_open
> An error occurred in debuginfo analysis (-2).
> Trying to use symbols.
> Opening /sys/kernel/tracing//uprobe_events write=1
> Writing event: p:probe_libstdc++/_X_ZNKSt13basic_fstreamIcSt11char_traitsIcEE7is_openEv /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22:0x8c620
> Failed to write event: Invalid argument
>   Error: Failed to add events. Reason: Invalid argument (Code: -22)
> 
> [16568.176464] Failed to allocate trace_uprobe.(-22)
> [16568.176468] Failed to parse address or file.
> 
> Aside of that mangled symbols with a @plt suffix do not work at all.

Oh, OK. I could reproduce it. I'll investigate it. :)

Thank you,


-- 
Masami Hiramatsu <mhiramat@kernel.org>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

failed to add c++ probe Jiri Olsa <jolsa@redhat.com> - 2016-09-19 12:00 +0200
  Re: failed to add c++ probe Masami Hiramatsu <mhiramat@kernel.org> - 2016-09-20 01:10 +0200
    Re: failed to add c++ probe Thomas Gleixner <tglx@linutronix.de> - 2016-09-20 01:40 +0200
      Re: failed to add c++ probe Masami Hiramatsu <mhiramat@kernel.org> - 2016-09-21 05:40 +0200
        Re: failed to add c++ probe Masami Hiramatsu <mhiramat@kernel.org> - 2016-09-21 06:50 +0200
          Re: failed to add c++ probe Peter Zijlstra <peterz@infradead.org> - 2016-09-22 11:00 +0200

csiph-web