From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Linux Weekly News <lwn@lwn.net>,
Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Balbir Singh <bsingharora@gmail.com>,
Masami Hiramatsu <mhiramat@kernel.org>,
"Naveen N . Rao" <naveen.n.rao@linux.vnet.ibm.com>,
Peter Zijlstra <peterz@infradead.org>,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 01/13] perf uretprobe ppc64le: Fix probe location
Date: Thu, 6 Oct 2016 13:11:44 -0300 [thread overview]
Message-ID: <1475770316-20057-2-git-send-email-acme@kernel.org> (raw)
In-Reply-To: <1475770316-20057-1-git-send-email-acme@kernel.org>
From: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Perf uretprobe probes on GEP(Global Entry Point) which fails to record
all function calls via LEP(Local Entry Point). Fix that by probing on LEP.
Objdump:
00000000100005f0 <doit>:
100005f0: 02 10 40 3c lis r2,4098
100005f4: 00 7f 42 38 addi r2,r2,32512
100005f8: a6 02 08 7c mflr r0
100005fc: 10 00 01 f8 std r0,16(r1)
10000600: f8 ff e1 fb std r31,-8(r1)
Before applying patch:
$ cat /sys/kernel/debug/tracing/uprobe_events
r:probe_uprobe_test/doit /home/ravi/uprobe_test:0x00000000000005f0
After applying patch:
$ cat /sys/kernel/debug/tracing/uprobe_events
r:probe_uprobe_test/doit /home/ravi/uprobe_test:0x00000000000005f8
This is not the case with kretprobes because the kernel itself finds LEP
and probes on it.
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1475576865-6562-1-git-send-email-ravi.bangoria@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/arch/powerpc/util/sym-handling.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powerpc/util/sym-handling.c
index ed9d5d15d5b6..1030a6e504bb 100644
--- a/tools/perf/arch/powerpc/util/sym-handling.c
+++ b/tools/perf/arch/powerpc/util/sym-handling.c
@@ -82,7 +82,8 @@ void arch__fix_tev_from_maps(struct perf_probe_event *pev,
*
* In addition, we shouldn't specify an offset for kretprobes.
*/
- if (pev->point.offset || pev->point.retprobe || !map || !sym)
+ if (pev->point.offset || (!pev->uprobes && pev->point.retprobe) ||
+ !map || !sym)
return;
lep_offset = PPC64_LOCAL_ENTRY_OFFSET(sym->arch_sym);
--
2.7.4
next prev parent reply other threads:[~2016-10-06 16:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-06 16:11 [GIT PULL 00/13] perf/core improvements and fixes Arnaldo Carvalho de Melo
2016-10-06 16:11 ` Arnaldo Carvalho de Melo [this message]
2016-10-06 16:11 ` [PATCH 02/13] perf intel-pt: Fix estimated timestamps for cycle-accurate mode Arnaldo Carvalho de Melo
2016-10-06 16:11 ` [PATCH 03/13] perf intel-pt: Fix MTC timestamp calculation for large MTC periods Arnaldo Carvalho de Melo
2016-10-06 16:11 ` [PATCH 04/13] tools lib traceevent: Fix kbuffer_read_at_offset() Arnaldo Carvalho de Melo
2016-10-06 16:11 ` [PATCH 05/13] perf jevents: Fix Intel JSON fixed counter conversions Arnaldo Carvalho de Melo
2016-10-06 16:11 ` [PATCH 06/13] perf bench mem: Sync memcpy assembly sources with the kernel Arnaldo Carvalho de Melo
2016-10-06 16:11 ` [PATCH 07/13] tools: Synchronize tools/arch/x86/include/asm/cpufeatures.h Arnaldo Carvalho de Melo
2016-10-06 16:11 ` [PATCH 08/13] tools: Synchronize tools/include/uapi/linux/bpf.h Arnaldo Carvalho de Melo
2016-10-06 16:11 ` [PATCH 09/13] perf report/top: Add a tip about source line numbers with overhead Arnaldo Carvalho de Melo
2016-10-06 16:11 ` [PATCH 10/13] perf report/top: Add a tip about system-wide collection from all CPUs Arnaldo Carvalho de Melo
2016-10-06 16:11 ` [PATCH 11/13] perf top/report: Add tips about a list option Arnaldo Carvalho de Melo
2016-10-06 16:11 ` [PATCH 12/13] tools build: Support compiling C++ source file Arnaldo Carvalho de Melo
2016-10-06 16:11 ` [PATCH 13/13] tools build: Add feature detection for g++ Arnaldo Carvalho de Melo
2016-10-06 22:38 ` [GIT PULL 00/13] perf/core improvements and fixes Ingo Molnar
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=1475770316-20057-2-git-send-email-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bsingharora@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lwn@lwn.net \
--cc=mhiramat@kernel.org \
--cc=mingo@kernel.org \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).