summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/probe-event.h
diff options
context:
space:
mode:
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>2015-04-28 14:05:39 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-05-04 17:43:46 +0200
commitd5c2e2c17ae1d630ddbceb53a264f24cc99703a4 (patch)
tree140641716e514c3f40e1002f26146cfacf91f5c0 /tools/perf/util/probe-event.h
parentperf probe ppc64le: Fix ppc64 ABIv2 symbol decoding (diff)
downloadlinux-d5c2e2c17ae1d630ddbceb53a264f24cc99703a4.tar.xz
linux-d5c2e2c17ae1d630ddbceb53a264f24cc99703a4.zip
perf probe ppc64le: Prefer symbol table lookup over DWARF
Use symbol table lookups by default if DWARF is not necessary, since powerpc ABIv2 encodes local entry points in the symbol table and the function entry address in DWARF may not be appropriate for kprobes, as described here: https://sourceware.org/bugzilla/show_bug.cgi?id=17638 "The DWARF address ranges deliberately include the *whole* function, both global and local entry points." ... "If you want to set probes on a local entry point, you should look up the symbol in the main symbol table (not DWARF), and check the st_other bits; they will indicate whether the function has a local entry point, and what its offset from the global entry point is. Note that GDB does the same when setting a breakpoint on a function entry." Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Reviewed-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/88a10e22f4aaba2aef812824ca4b10d7beeea012.1430217967.git.naveen.n.rao@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-event.h')
-rw-r--r--tools/perf/util/probe-event.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/probe-event.h b/tools/perf/util/probe-event.h
index d6b783447be9..52bca4bf07ca 100644
--- a/tools/perf/util/probe-event.h
+++ b/tools/perf/util/probe-event.h
@@ -135,6 +135,7 @@ extern int show_available_vars(struct perf_probe_event *pevs, int npevs,
struct strfilter *filter, bool externs);
extern int show_available_funcs(const char *module, struct strfilter *filter,
bool user);
+bool arch__prefers_symtab(void);
/* Maximum index number of event-name postfix */
#define MAX_EVENT_INDEX 1024