From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: He Kuang <hekuang@huawei.com>,
a.p.zijlstra@chello.nl, mingo@redhat.com, paulus@samba.org,
wangnan0@huawei.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf probe: Fix bug in perf probe with global variables
Date: Mon, 27 Apr 2015 13:38:53 -0300 [thread overview]
Message-ID: <20150427163853.GD16849@kernel.org> (raw)
In-Reply-To: <553C37A6.3090206@hitachi.com>
Em Sun, Apr 26, 2015 at 09:56:06AM +0900, Masami Hiramatsu escreveu:
> (2015/04/25 17:08), He Kuang wrote:
> > There are missing curly braces which causes find_variable() return wrong
> > value when probing with global variables.
> >
> > This problem can be reproduced as following:
> >
> > $ perf probe -v --add='generic_perform_write global_variable_for_test'
> > ...
> > Try to find probe point from debuginfo.
> > Probe point found: generic_perform_write+0
> > Searching 'global_variable_for_test' variable in context.
> > An error occurred in debuginfo analysis (-2).
> > Error: Failed to add events. Reason: No such file or directory (Code: -2)
> >
> > After this patch:
> >
> > $ perf probe -v --add='generic_perform_write global_variable_for_test'
> > ...
> > Converting variable global_variable_for_test into trace event.
> > global_variable_for_test type is int.
> > Found 1 probe_trace_events.
> > Opening /sys/kernel/debug/tracing/kprobe_events write=1
> > Added new event:
> > Writing event: p:probe/generic_perform_write _stext+1237464
> > global_variable_for_test=@global_variable_for_test+0:s32
> > probe:generic_perform_write (on generic_perform_write with
> > global_variable_for_test)
> >
> > You can now use it in all perf tools, such as:
> >
> > perf record -e probe:generic_perform_write -aR sleep 1
>
> Oops, that's my fault! :(
>
> Acked-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
>
> Thank you!!
Thanks, applied to perf/urgent.
- Arnaldo
next prev parent reply other threads:[~2015-04-27 16:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-25 8:08 [PATCH] perf probe: Fix bug in perf probe with global variables He Kuang
2015-04-26 0:56 ` Masami Hiramatsu
2015-04-27 16:38 ` Arnaldo Carvalho de Melo [this message]
2015-05-01 10:15 ` [tip:perf/urgent] perf probe: Fix bug with global variables handling tip-bot for He Kuang
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=20150427163853.GD16849@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=hekuang@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=wangnan0@huawei.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