diff options
author | Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> | 2015-04-02 16:33:12 +0900 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-04-02 13:18:44 -0300 |
commit | c72738355b2ac79506fbfa10ffee8fe3a27e69da (patch) | |
tree | 80eb75ac29267a0cf3b70b66af3ef0ffd5c3f551 /block/blk-core.c | |
parent | b83e868d0a0350c107b98417b4dcc73834506f98 (diff) | |
download | linux-c72738355b2ac79506fbfa10ffee8fe3a27e69da.tar.bz2 |
perf probe: Fix to track down unnamed union/structure members
Fix 'perf probe' to track down unnamed union/structure members.
perf probe did not track down the tree of unnamed union/structure
members, since it just failed to find given "name" in a parent
structure/union. To solve this issue, I've introduced 2 changes.
- Fix die_find_member() to track down the type-DIE if it is
unnamed, and if it contains the specified member, returns the
unnamed member.
(note that we don't return found member, since unnamed member
has the offset in the parent structure)
- Fix convert_variable_fields() to track down the unnamed union/
structure (one-by-one).
With this patch, perf probe can access unnamed fields:
-----
#./perf probe -nfx ./perf lock__delete ops 'locked_ops=ops->locked.ops'
Added new event:
probe_perf:lock__delete (on lock__delete in /home/mhiramat/ksrc/linux-3/tools/perf/perf with ops locked_ops=ops->locked.ops)
You can now use it in all perf tools, such as:
perf record -e probe_perf:lock__delete -aR sleep 1
-----
Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Report-Link: https://lkml.org/lkml/2015/3/5/431
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20150402073312.14482.37942.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'block/blk-core.c')
0 files changed, 0 insertions, 0 deletions