public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: David Ahern <dsahern@gmail.com>
Cc: acme@ghostprotocols.net, linux-kernel@vger.kernel.org,
	Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	"yrl.pp-manager.tt@hitachi.com" <yrl.pp-manager.tt@hitachi.com>
Subject: Re: Re: [PATCH 1/2] perf probe: Improve error message when function not found
Date: Tue, 03 Dec 2013 14:12:04 +0900	[thread overview]
Message-ID: <529D6824.1020006@hitachi.com> (raw)
In-Reply-To: <529C9EC0.70607@gmail.com>

(2013/12/02 23:52), David Ahern wrote:
> On 12/1/13, 10:59 PM, Masami Hiramatsu wrote:
>> (2013/12/02 9:07), David Ahern wrote:
>>> When requesting a function from a userspace library the error message to
>>> the user is less than helpful. e.g.,
>>>
>>>      perf probe -x /lib64/libpthread-2.14.90.so -a 'lock_full=__pthread_mutex_lock_full'
>>>      no symbols found in /lib64/libpthread-2.14.90.so, maybe install a debug package?
>>>      Failed to load map.
>>>         Error: Failed to add events. (-22)
>>>
>>> In this cae the symbol really does exist but is a local symbol which is
>>> filtered:
>>>
>>>      nm /lib64/libpthread-2.14.90.so | grep __pthread_mutex_lock_full
>>>      0000000000005700 t __pthread_mutex_lock_full
>>>
>>> With this patch:
>>>      perf probe -x /lib64/libpthread-2.14.90.so -a 'lock_full=__pthread_mutex_lock_full'
>>>
>>>      no symbols found in /lib64/libpthread-2.14.90.so, maybe install a debug package?
>>>      Failed to find function in /lib64/libpthread-2.14.90.so. Perhaps it is a local variable?
>>
>> Hmm, indeed current message is too less information, but your message looks
>> wired. I think just showing "Failed to find requested symbol in %s" is enough. :)
> 
> I disagree. perf-probe filters non-global variables:
> 
>     if (sym->binding == STB_GLOBAL &&
>         strfilter__compare(available_func_filter, sym->name))
>         return 0;
> 
> That needs to be explicitly stated in the error message -- only global
> symbols may be given.

Ah, I see. In that case, I think the "variable" is not a correct word,
the "symbol" is better, because perf probe can take tracing variable
arguments after the trace point definition. :)

Thank you,

-- 
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com



  reply	other threads:[~2013-12-03  5:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-02  0:07 [PATCH 1/2] perf probe: Improve error message when function not found David Ahern
2013-12-02  0:07 ` [PATCH 2/2] perf probe: Allow user to specify address within executable David Ahern
2013-12-02  5:53   ` Masami Hiramatsu
2013-12-02  6:15   ` Masami Hiramatsu
2013-12-02 14:49     ` David Ahern
2013-12-02 17:55       ` David Ahern
2013-12-03  9:24         ` Masami Hiramatsu
2013-12-03 15:58           ` David Ahern
2013-12-04  1:22             ` Masami Hiramatsu
2013-12-04  1:44               ` David Ahern
2013-12-04  7:39                 ` Masami Hiramatsu
2013-12-08 17:50                   ` David Ahern
2013-12-02  5:59 ` [PATCH 1/2] perf probe: Improve error message when function not found Masami Hiramatsu
2013-12-02 14:52   ` David Ahern
2013-12-03  5:12     ` Masami Hiramatsu [this message]
2013-12-03 15:15       ` David Ahern
2013-12-04  1:23         ` 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=529D6824.1020006@hitachi.com \
    --to=masami.hiramatsu.pt@hitachi.com \
    --cc=acme@ghostprotocols.net \
    --cc=dsahern@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=yrl.pp-manager.tt@hitachi.com \
    /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