From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Ingo Molnar <mingo@redhat.com>, Paul Mackerras <paulus@samba.org>,
lkml <linux-kernel@vger.kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH -tip ] [BUGFIX] perf probe: Fix to probe on symbols with optimization suffix
Date: Fri, 27 Sep 2013 15:56:00 +0900 [thread overview]
Message-ID: <52452C00.1000505@hitachi.com> (raw)
In-Reply-To: <20130925153838.GE2634@ghostprotocols.net>
Hi Arnaldo,
BTW, I also found another issue which the perf probe -l showed
incorrect line number and file name for probes on such inline
functions. :(
I found the root causes (the line info is not correct and
perf probe failed to handle nested inline functions). I'll send
the bugfix patch soon.
Thank you,
(2013/09/26 0:38), Arnaldo Carvalho de Melo wrote:
> Em Wed, Sep 25, 2013 at 10:16:16PM +0900, Masami Hiramatsu escreveu:
>> Fix perf probe to probe on some symbols which have some
>> optimzation suffixes, e.g. ".part", ".isra", and ".constprop".
>> To fix this issue, instead of using DIE name, perf probe
>> uses symbol name found by dwfl_module_addrsym().
>
> Thanks Masami! Now it behaves _exactly_ as I expected and need:
>
> [root@zoo linux]# perf probe -L getname_flags:65
> <getname_flags@/home/git/linux/fs/namei.c:65>
> 65 result->uptr = filename;
> 66 audit_getname(result);
> return result;
>
> error:
> 70 final_putname(result);
> 71 return err;
> 72 }
>
> struct filename *
> getname(const char __user * filename)
>
> [root@zoo linux]# perf probe -V getname_flags:65
> Available variables at getname_flags:65
> @<getname_flags.part.35+178>
> char* filename
> int* empty
> long int max
> struct filename* result
> [root@zoo linux]# perf probe 'getname_flags:66 pathname=result->name:string'
> Added new event:
> probe:getname_flags (on getname_flags:66 with pathname=result->name:string)
>
> You can now use it in all perf tools, such as:
>
> perf record -e probe:getname_flags -aR sleep 1
>
> [root@zoo linux]# perf record -a -e probe:getname_flags
> ^C[ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 1.252 MB perf.data (~54692 samples) ]
> [root@zoo linux]# perf script | grep -v '# | head -5
>> ^C
> [root@zoo linux]# perf script | grep -v '^#' | head -5
> libvirtd 1163 [001] 100606.469450: probe:getname_flags: (ffffffff811a2f89) pathname="/proc/cpuinfo"
> libvirtd 1163 [001] 100606.469563: probe:getname_flags: (ffffffff811a2f89) pathname="/sys/devices/system/node"
> libvirtd 1163 [001] 100606.469596: probe:getname_flags: (ffffffff811a2f89) pathname="/sys/devices/system/node/node0"
> libvirtd 1163 [001] 100606.469612: probe:getname_flags: (ffffffff811a2f89) pathname="/sys/devices/system/node/node0/cpu0/online"
> libvirtd 1163 [001] 100606.469628: probe:getname_flags: (ffffffff811a2f89) pathname="/sys/devices/system/node/node0/cpu0/topology/physical_package_id"
> [root@zoo linux]#
>
> Thanks a lot, applied to my perf/urgent branch,
>
> - Arnaldo
>
--
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@hitachi.com
next prev parent reply other threads:[~2013-09-27 6:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-25 13:16 [PATCH -tip ] [BUGFIX] perf probe: Fix to probe on symbols with optimization suffix Masami Hiramatsu
2013-09-25 15:38 ` Arnaldo Carvalho de Melo
2013-09-27 6:56 ` Masami Hiramatsu [this message]
2013-09-25 18:31 ` [tip:perf/urgent] perf probe: Fix probing " tip-bot for 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=52452C00.1000505@hitachi.com \
--to=masami.hiramatsu.pt@hitachi.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.