1
0
Fork 0
alistair23-linux/tools/perf
Masami Hiramatsu 082f96a93e perf probe: Fix perf probe to find correct variable DIE
Fix perf probe to find correct variable DIE which has location or
external instance by tracking down the lexical blocks.

Current die_find_variable() expects that the all variable DIEs
which has DW_TAG_variable have a location. However, since recent
dwarf information may have declaration variable DIEs at the
entry of function (subprogram), die_find_variable() returns it.

To solve this problem, it must track down the DIE tree to find
a DIE which has an actual location or a reference for external
instance.

e.g. finding a DIE which origin is <0xdc73>;

 <1><11496>: Abbrev Number: 95 (DW_TAG_subprogram)
    <11497>   DW_AT_abstract_origin: <0xdc42>
    <1149b>   DW_AT_low_pc      : 0x1850
[...]
 <2><114cc>: Abbrev Number: 119 (DW_TAG_variable) <- this is a declaration
    <114cd>   DW_AT_abstract_origin: <0xdc73>
 <2><114d1>: Abbrev Number: 119 (DW_TAG_variable)
[...]
 <3><115a7>: Abbrev Number: 105 (DW_TAG_lexical_block)
    <115a8>   DW_AT_ranges      : 0xaa0
 <4><115ac>: Abbrev Number: 96 (DW_TAG_variable) <- this has a location
    <115ad>   DW_AT_abstract_origin: <0xdc73>
    <115b1>   DW_AT_location    : 0x486c        (location list)

Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Tested-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Acked-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/20140529121930.30879.87092.stgit@ltc230.yrl.intra.hitachi.co.jp
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
2014-06-04 14:49:20 +02:00
..
Documentation perf bench: Update manpage to mention numa and futex 2014-04-14 12:55:41 +02:00
arch perf tests x86: Fix stack map lookup in dwarf unwind test 2014-04-30 17:02:31 +02:00
bench Merge branch 'perf-core-for-mingo' into perf/urgent 2014-04-14 16:45:39 +02:00
config perf x86: Fix perf to use non-executable stack, again 2014-04-30 17:02:30 +02:00
python perf python: Remove duplicate TID bit from mask 2013-08-07 17:35:25 -03:00
scripts perf tools: Finish the removal of 'self' arguments 2013-11-05 15:32:36 -03:00
tests perf tests: Add static build make test 2014-04-30 16:48:57 +02:00
ui perf ui hists: Pass evsel to hpp->header/width functions explicitly 2014-03-14 18:08:40 -03:00
util perf probe: Fix perf probe to find correct variable DIE 2014-06-04 14:49:20 +02:00
.gitignore perf tools: Ignore 'perf timechart' output file 2013-10-11 12:17:37 -03:00
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
MANIFEST perf tools: Move hash.h header 2014-02-18 09:34:49 -03:00
Makefile perf tools: Add 'build-test' make target 2014-01-16 16:26:26 -03:00
Makefile.perf perf tools: Use LDFLAGS instead of ALL_LDFLAGS 2014-04-30 16:48:39 +02:00
builtin-annotate.c perf evlist: Introduce evlist__for_each() & friends 2014-01-13 10:06:25 -03:00
builtin-bench.c perf bench: Fix segfault at the end of an 'all' execution 2014-04-14 12:55:53 +02:00
builtin-buildid-cache.c perf buildid-cache: Check relocation when checking for existing kcore 2014-01-31 17:21:54 -03:00
builtin-buildid-list.c perf session: Separating data file properties from session 2013-10-21 17:33:25 -03:00
builtin-diff.c perf ui hists: Pass evsel to hpp->header/width functions explicitly 2014-03-14 18:08:40 -03:00
builtin-evlist.c perf evlist: Introduce evlist__for_each() & friends 2014-01-13 10:06:25 -03:00
builtin-help.c perf help: Fix --help for builtins 2012-10-22 12:35:49 -02:00
builtin-inject.c perf callchain: Add mask into struct regs_dump 2014-02-18 09:34:48 -03:00
builtin-kmem.c perf evsel: Ditch evsel->handler.data field 2013-11-07 10:40:47 -03:00
builtin-kvm.c perf kvm: Fix 'Min time' counting in report command 2014-04-20 00:14:08 +02:00
builtin-list.c perf list: Add usage 2013-11-05 14:26:41 -03:00
builtin-lock.c perf evsel: Ditch evsel->handler.data field 2013-11-07 10:40:47 -03:00
builtin-mem.c perf mem: Remove unused parameter from dump_raw_samples() 2013-12-19 17:03:39 -03:00
builtin-probe.c perf probe: Replace line_list with intlist 2014-02-18 09:34:50 -03:00
builtin-record.c perf tools: Improve error reporting 2014-04-20 00:15:12 +02:00
builtin-report.c perf report: Use ui__has_annotation() 2014-03-18 18:17:02 -03:00
builtin-sched.c perf sched: Fixup header alignment in 'latency' output 2014-03-18 18:16:55 -03:00
builtin-script.c perf evlist: Introduce evlist__for_each() & friends 2014-01-13 10:06:25 -03:00
builtin-stat.c perf stat: Initialize statistics correctly 2014-04-14 12:56:06 +02:00
builtin-timechart.c perf symbols: Record the reason for filtering an address_location 2014-03-18 18:16:57 -03:00
builtin-top.c Merge branch 'perf/urgent' into perf/core 2014-03-11 11:53:50 +01:00
builtin-trace.c perf trace: Decode architecture-specific signal numbers 2014-03-10 11:10:45 -03:00
builtin.h perf tools: Add new mem command for memory access profiling 2013-04-01 12:21:44 -03:00
command-list.txt perf tools: Add new mem command for memory access profiling 2013-04-01 12:21:44 -03:00
design.txt perf tools: Update some code references in design.txt 2014-03-18 18:17:06 -03:00
perf-archive.sh perf archive: Make 'f' the last parameter for tar 2012-09-17 13:10:42 -03:00
perf-completion.sh perf kvm: introduce --list-cmds for use by scripts 2014-03-14 18:08:41 -03:00
perf.c tools/: Convert to new topic libraries 2013-12-16 16:03:27 -03:00
perf.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2014-04-06 08:11:57 -07:00