From: Paul Clarke <pc@us.ibm.com>
To: David Ahern <dsahern@gmail.com>, linux-perf-users@vger.kernel.org
Subject: Re: uprobe symbols with @GLIBC...
Date: Fri, 20 Feb 2015 11:57:58 -0600 [thread overview]
Message-ID: <54E775A6.8000704@us.ibm.com> (raw)
In-Reply-To: <54E76CDC.2090904@gmail.com>
On 02/20/2015 11:20 AM, David Ahern wrote:
> On 2/20/15 8:29 AM, Paul Clarke wrote:
>> How does one set a dynamic tracepoint for user-mode symbols with "@"
>> qualifiers?
>>
>> # perf probe -F -x /lib/libpthread.so.0 --filter='pthread_create*'
>> pthread_create@@GLIBC_2.1
>> pthread_create@GLIBC_2.0
>
> one of many reasons I proposed an option to let users specify an address.
>
> https://lkml.org/lkml/2013/12/1/126
> https://lkml.org/lkml/2013/12/2/324
>
> It was not picked up.
I presume then, that I'm not doing something obviously wrong, and this
is the current state of affairs?
Given that, I would argue that a better resolution would be to:
1. Support setting probes using the name of the symbol as reported by
"--funcs". For example, the following should work:
# perf probe -x /lib/libpthread.so.0 pthread_create@GLIBC_2.0
-- AND / OR --
2. Go ahead and just set probes at all functions which match the base
function name. For example, the following:
# perf probe -v -x /lib/libpthread.so.0 pthread_create
Would set probes at both known "pthread_create" entry points:
- pthread_create@@GLIBC_2.1
- pthread_create@GLIBC_2.0
>> # perf probe -v -x /lib/libpthread.so.0 pthread_create@GLIBC_2.0
>> probe-definition(0): pthread_create@GLIBC_2.0
>> symbol:pthread_create file:GLIBC_2.0 line:0 offset:0 return:0 lazy:(null)
>> 0 arguments
>> Failed to open debuginfo file.
>> Error: Failed to add events. (-2)
>>
>> # perf probe -v -x /lib/libpthread.so.0 pthread_create
>> probe-definition(0): pthread_create
>> symbol:pthread_create file:(null) line:0 offset:0 return:0 lazy:(null)
>> 0 arguments
>> Could not open debuginfo. Try to use symbols.
>> no symbols found in /usr/lib/libpthread-2.18.so, maybe install a debug
>> package?
>> Failed to find symbol pthread_create in /usr/lib/libpthread-2.18.so
>> Error: Failed to add events. (-2)
>>
>> Symbols without such qualifiers work fine:
>>
>> # perf probe -F -x /lib/libpthread.so.0 --filter='pthread_detach*'
>> pthread_detach
>>
>> # perf probe -v -x /lib/libpthread.so.0 pthread_detach
>> probe-definition(0): pthread_detach
>> symbol:pthread_detach file:(null) line:0 offset:0 return:0 lazy:(null)
>> 0 arguments
>> Could not open debuginfo. Try to use symbols.
>> Opening /sys/kernel/debug/tracing/uprobe_events write=1
>> Added new event:
>> Writing event: p:probe_libpthread/pthread_detach
>> /usr/lib/libpthread-2.18.so:0x8b30
>> probe_libpthread:pthread_detach (on pthread_detach in
>> /usr/lib/libpthread-2.18.so)
--
PC
next prev parent reply other threads:[~2015-02-20 17:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-20 15:29 uprobe symbols with @GLIBC Paul Clarke
2015-02-20 17:20 ` David Ahern
2015-02-20 17:57 ` Paul Clarke [this message]
2017-03-27 21:49 ` Paul Clarke
2017-03-29 16:23 ` David Ahern
2017-03-30 3:44 ` Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54E775A6.8000704@us.ibm.com \
--to=pc@us.ibm.com \
--cc=dsahern@gmail.com \
--cc=linux-perf-users@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).