linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Clarke <pc@us.ibm.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	bhargavb <bhargavaramudu@gmail.com>,
	linux-rt-users@vger.kernel.org, linux-perf-users@vger.kernel.org
Subject: Re: uprobes enable condition (user space) - sysfs interface
Date: Tue, 5 Dec 2017 07:58:34 -0600	[thread overview]
Message-ID: <bace0c39-894c-7c68-cc3b-6646938d1a47@us.ibm.com> (raw)
In-Reply-To: <20171205164547.144c51e493a05b61907dda01@kernel.org>

On 12/05/2017 01:45 AM, Masami Hiramatsu wrote:
> On Mon, 4 Dec 2017 09:23:16 -0600
> Paul Clarke <pc@us.ibm.com> wrote:
>> On 12/04/2017 08:55 AM, Arnaldo Carvalho de Melo wrote:
>>> Em Mon, Dec 04, 2017 at 09:36:19PM +0900, Masami Hiramatsu escreveu:
>>>> On Fri, 1 Dec 2017 13:40:39 -0300
>>>> Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>>>>
>>>>> Adding Masami to the CC list, to see if he can come up with a fix for
>>>>> the 'perf probe' failure below, improving the message or ignoring
>>>>> versioned symbols (with a warning perhaps).
>>>>
>>>> Thanks. Should we ignore the versioned symbols? or can we put a probe
>>>> on that? If we have symbol address, we can put a probe on it, even
>>>> if it is versioned.
>>>
>>> Lemme try...
>>>
>>> [root@jouet ~]# perf probe -x /usr/lib64/libc-2.25.so malloc_get_state_225=malloc_get_state@GLIBC_2.2.5
>>> The /usr/lib64/libc-2.25.so file has no debug information.
>>> Rebuild with -g, or install an appropriate debuginfo package.
>>>   Error: Failed to add events.
>>> [root@jouet ~]# perf probe -x /usr/lib64/libc-2.25.so malloc_get_state@GLIBC_2.2.5
>>> The /usr/lib64/libc-2.25.so file has no debug information.
>>> Rebuild with -g, or install an appropriate debuginfo package.
>>>   Error: Failed to add events.
>>
>> commit d80406453ad4a69932dc17a617d5b7bc7ae80b8f should have allowed adding probes on versioned symbols if you omit the versioning part of the symbol.  So, in the above example, this should work:
>>
>> # perf probe -x /usr/lib64/libc-2.25.so malloc_get_state
> 
> No, it doesn't, the above commit improves *find_symbol_by_name(),
> but perf probe uses its own lookup function, because it has to
> support glob pattern matching.

That commit was explicitly to allow perf probe on versioned symbols.  However, it was limited to creating probes on _default_ versioned symbols (marked by '@@").  So, you're correct that it would not work on this symbol in particular.

The value of the commit was to prevent something like the following from failing, even though the symbol existed, but was versioned (presuming one of the versions of the symbol was marked as default ('@@')):

# perf probe perf probe -x /lib/powerpc64le-linux-gnu/libpthread.so.0 pthread_create

PC


  reply	other threads:[~2017-12-05 13:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29 18:34 uprobes enable condition (user space) - sysfs interface bhargavb
2017-12-01 16:40 ` Arnaldo Carvalho de Melo
2017-12-03 17:14   ` bhargavb
2017-12-04  6:03     ` Namhyung Kim
2017-12-04 12:36   ` Masami Hiramatsu
2017-12-04 14:55     ` Arnaldo Carvalho de Melo
2017-12-04 15:23       ` Paul Clarke
2017-12-05  6:53         ` Masami Hiramatsu
2017-12-05  7:45         ` Masami Hiramatsu
2017-12-05 13:58           ` Paul Clarke [this message]
2017-12-05  6:51       ` 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=bace0c39-894c-7c68-cc3b-6646938d1a47@us.ibm.com \
    --to=pc@us.ibm.com \
    --cc=acme@kernel.org \
    --cc=bhargavaramudu@gmail.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mhiramat@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).