Re: [PATCH 5/6] perf: probes: move ftrace README parsing logic into trace-event-parse.c

2017-03-07 Thread Naveen N. Rao
On 2017/03/07 03:03PM, Masami Hiramatsu wrote: > On Tue, 7 Mar 2017 16:17:40 +0530 > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > probe-file.c needs libelf, but scanning ftrace README does not require > > that. As such, move the ftrace READ

Re: [PATCH 5/6] perf: probes: move ftrace README parsing logic into trace-event-parse.c

2017-03-07 Thread Naveen N. Rao
On 2017/03/07 03:03PM, Masami Hiramatsu wrote: > On Tue, 7 Mar 2017 16:17:40 +0530 > "Naveen N. Rao" wrote: > > > probe-file.c needs libelf, but scanning ftrace README does not require > > that. As such, move the ftrace README scanning logic out of probe-file.c &

[RESEND PATCH 2/6] powerpc: kretprobes: override default function entry offset

2017-03-07 Thread Naveen N. Rao
With ABIv2, we offset 8 bytes into a function to get at the local entry point. Acked-by: Ananth N Mavinakayanahalli <ana...@linux.vnet.ibm.com> Acked-by: Michael Ellerman <m...@ellerman.id.au> Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/ke

[RESEND PATCH 2/6] powerpc: kretprobes: override default function entry offset

2017-03-07 Thread Naveen N. Rao
With ABIv2, we offset 8 bytes into a function to get at the local entry point. Acked-by: Ananth N Mavinakayanahalli Acked-by: Michael Ellerman Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/kernel

[RESEND PATCH 6/6] perf: powerpc: choose local entry point with kretprobes

2017-03-07 Thread Naveen N. Rao
Hiramatsu <mhira...@kernel.org> Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- tools/perf/arch/powerpc/util/sym-handling.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powe

[RESEND PATCH 6/6] perf: powerpc: choose local entry point with kretprobes

2017-03-07 Thread Naveen N. Rao
Hiramatsu Signed-off-by: Naveen N. Rao --- tools/perf/arch/powerpc/util/sym-handling.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powerpc/util/sym-handling.c index 1030a6e504bb..e93b3db25012 100644

Re: [PATCH v4 2/3] perf: kretprobes: offset from reloc_sym if kernel

2017-03-07 Thread Naveen N. Rao
On 2017/03/06 10:06PM, Masami Hiramatsu wrote: > On Mon, 6 Mar 2017 23:19:09 +0530 > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > Masami, > > Your patch works, thanks! However, I felt we could refactor and reuse > > some of the code

Re: [PATCH v4 2/3] perf: kretprobes: offset from reloc_sym if kernel

2017-03-07 Thread Naveen N. Rao
On 2017/03/06 10:06PM, Masami Hiramatsu wrote: > On Mon, 6 Mar 2017 23:19:09 +0530 > "Naveen N. Rao" wrote: > > > Masami, > > Your patch works, thanks! However, I felt we could refactor and reuse > > some of the code across kprobes.c for this purpose. Can

[PATCH 5/6] perf: probes: move ftrace README parsing logic into trace-event-parse.c

2017-03-07 Thread Naveen N. Rao
probe-file.c needs libelf, but scanning ftrace README does not require that. As such, move the ftrace README scanning logic out of probe-file.c and into trace-event-parse.c. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- tools/perf/util/probe-file.c

[PATCH 5/6] perf: probes: move ftrace README parsing logic into trace-event-parse.c

2017-03-07 Thread Naveen N. Rao
probe-file.c needs libelf, but scanning ftrace README does not require that. As such, move the ftrace README scanning logic out of probe-file.c and into trace-event-parse.c. Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-file.c| 87 +++- tools

[RESEND PATCH 4/6] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-07 Thread Naveen N. Rao
] c04433d0 r do_open+0x0[DISABLED] c04ba058 r do_open+0x8[DISABLED] Acked-by: Masami Hiramatsu <mhira...@kernel.org> Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- tools/perf/util/probe-event.c | 12 +--- tools/perf/util/probe-

[RESEND PATCH 4/6] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-07 Thread Naveen N. Rao
] c04433d0 r do_open+0x0[DISABLED] c04ba058 r do_open+0x8[DISABLED] Acked-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-event.c | 12 +--- tools/perf/util/probe-file.c | 7 +++ tools/perf/util/probe-file.h | 1 +

[RESEND PATCH 3/6] perf: probe: factor out the ftrace README scanning

2017-03-07 Thread Naveen N. Rao
<mhira...@kernel.org> Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- tools/perf/util/probe-file.c | 70 +++- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-

[RESEND PATCH 3/6] perf: probe: factor out the ftrace README scanning

2017-03-07 Thread Naveen N. Rao
Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-file.c | 70 +++- 1 file changed, 37 insertions(+), 33 deletions(-) diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c index 1a62daceb028..8a219cd831b7 100644 --- a/tools/perf

[RESEND PATCH 1/6] trace/kprobes: fix check for kretprobe offset within function entry

2017-03-07 Thread Naveen N. Rao
nux/tools/perf$ sudo cat /sys/kernel/debug/kprobes/list c0041370 k kretprobe_trampoline+0x0[OPTIMIZED] c04ba0b8 r do_open+0x8[DISABLED] c0443430 r do_open+0x0[DISABLED] Acked-by: Masami Hiramatsu <mhira...@kernel.org> Signed-off-b

[RESEND PATCH 1/6] trace/kprobes: fix check for kretprobe offset within function entry

2017-03-07 Thread Naveen N. Rao
nux/tools/perf$ sudo cat /sys/kernel/debug/kprobes/list c0041370 k kretprobe_trampoline+0x0[OPTIMIZED] c04ba0b8 r do_open+0x8[DISABLED] c0443430 r do_open+0x0[DISABLED] Acked-by: Masami Hiramatsu Signed-off-by: Naveen N. Rao --- include/linu

[tip:perf/core] perf probe: Generalize probe event file open routine

2017-03-07 Thread tip-bot for Naveen N. Rao
Commit-ID: e491bc2f0dd9f1b4a23ba6f3da88f6b695c4a4c9 Gitweb: http://git.kernel.org/tip/e491bc2f0dd9f1b4a23ba6f3da88f6b695c4a4c9 Author: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> AuthorDate: Thu, 23 Feb 2017 17:07:23 +0530 Committer: Arnaldo Carvalho de Melo <a...@r

[tip:perf/core] perf probe: Generalize probe event file open routine

2017-03-07 Thread tip-bot for Naveen N. Rao
Commit-ID: e491bc2f0dd9f1b4a23ba6f3da88f6b695c4a4c9 Gitweb: http://git.kernel.org/tip/e491bc2f0dd9f1b4a23ba6f3da88f6b695c4a4c9 Author: Naveen N. Rao AuthorDate: Thu, 23 Feb 2017 17:07:23 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 3 Mar 2017 19:07:18 -0300 perf probe

[tip:perf/core] trace/kprobes: Allow return probes with offsets and absolute addresses

2017-03-07 Thread tip-bot for Naveen N. Rao
Commit-ID: 35b6f55aa9ba65141f2def0997e23aab13715d3f Gitweb: http://git.kernel.org/tip/35b6f55aa9ba65141f2def0997e23aab13715d3f Author: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> AuthorDate: Wed, 22 Feb 2017 19:23:39 +0530 Committer: Arnaldo Carvalho de Melo <a...@r

[tip:perf/core] trace/kprobes: Allow return probes with offsets and absolute addresses

2017-03-07 Thread tip-bot for Naveen N. Rao
Commit-ID: 35b6f55aa9ba65141f2def0997e23aab13715d3f Gitweb: http://git.kernel.org/tip/35b6f55aa9ba65141f2def0997e23aab13715d3f Author: Naveen N. Rao AuthorDate: Wed, 22 Feb 2017 19:23:39 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 3 Mar 2017 19:07:18 -0300 trace/kprobes

[tip:perf/core] kretprobes: Ensure probe location is at function entry

2017-03-07 Thread tip-bot for Naveen N. Rao
Commit-ID: 90ec5e89e393c76e19afc845d8f88a5dc8315919 Gitweb: http://git.kernel.org/tip/90ec5e89e393c76e19afc845d8f88a5dc8315919 Author: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> AuthorDate: Wed, 22 Feb 2017 19:23:37 +0530 Committer: Arnaldo Carvalho de Melo <a...@r

[tip:perf/core] kretprobes: Ensure probe location is at function entry

2017-03-07 Thread tip-bot for Naveen N. Rao
Commit-ID: 90ec5e89e393c76e19afc845d8f88a5dc8315919 Gitweb: http://git.kernel.org/tip/90ec5e89e393c76e19afc845d8f88a5dc8315919 Author: Naveen N. Rao AuthorDate: Wed, 22 Feb 2017 19:23:37 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 3 Mar 2017 19:07:17 -0300 kretprobes

Re: [PATCH v4 2/3] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-06 Thread Naveen N. Rao
kernel/debug/kprobes/list c0041370 k kretprobe_trampoline+0x0[OPTIMIZED] c04ba0b8 r do_open+0x8[DISABLED] c0443430 r do_open+0x0[DISABLED] Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- include/linux/kprobes.h | 1 + kernel

Re: [PATCH v4 2/3] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-06 Thread Naveen N. Rao
kernel/debug/kprobes/list c0041370 k kretprobe_trampoline+0x0[OPTIMIZED] c04ba0b8 r do_open+0x8[DISABLED] c0443430 r do_open+0x0[DISABLED] Signed-off-by: Naveen N. Rao --- include/linux/kprobes.h | 1 + kernel/kprob

[PATCH 2/2] arm64: kprobes: remove kprobe_exceptions_notify

2017-03-06 Thread Naveen N. Rao
Commit fc62d0207ae0 ("kprobes: Introduce weak variant of kprobe_exceptions_notify()") introduces a generic empty version of the function for architectures that don't need special handling, like arm64. As such, remove the arch/arm64/ specific handler. Signed-off-by: Naveen N. Rao

[PATCH 2/2] arm64: kprobes: remove kprobe_exceptions_notify

2017-03-06 Thread Naveen N. Rao
Commit fc62d0207ae0 ("kprobes: Introduce weak variant of kprobe_exceptions_notify()") introduces a generic empty version of the function for architectures that don't need special handling, like arm64. As such, remove the arch/arm64/ specific handler. Signed-off-by: Naveen N. Rao ---

Re: [PATCH 2/3] arm: kprobes: remove kprobe_exceptions_notify

2017-03-06 Thread Naveen N. Rao
On 2017/03/06 06:38PM, Russell King - ARM Linux wrote: > On Mon, Mar 06, 2017 at 11:37:20PM +0530, Naveen N. Rao wrote: > > On 2017/02/08 01:24AM, Naveen N Rao wrote: > > > ... as the weak variant will do. > > > > > > Signed-off-by: Naveen N.

Re: [PATCH 2/3] arm: kprobes: remove kprobe_exceptions_notify

2017-03-06 Thread Naveen N. Rao
On 2017/03/06 06:38PM, Russell King - ARM Linux wrote: > On Mon, Mar 06, 2017 at 11:37:20PM +0530, Naveen N. Rao wrote: > > On 2017/02/08 01:24AM, Naveen N Rao wrote: > > > ... as the weak variant will do. > > > > > > Signed-off-by: Naveen N. Rao > > &

[PATCH 1/2] arm: kprobes: remove kprobe_exceptions_notify

2017-03-06 Thread Naveen N. Rao
Commit fc62d0207ae0 ("kprobes: Introduce weak variant of kprobe_exceptions_notify()") introduces a generic empty version of the function for architectures that don't need special handling, like arm. As such, remove the arch/arm/ specific handler. Signed-off-by: Naveen N. Rao

[PATCH 1/2] arm: kprobes: remove kprobe_exceptions_notify

2017-03-06 Thread Naveen N. Rao
Commit fc62d0207ae0 ("kprobes: Introduce weak variant of kprobe_exceptions_notify()") introduces a generic empty version of the function for architectures that don't need special handling, like arm. As such, remove the arch/arm/ specific handler. Signed-off-by: Naveen N. Rao --- arch/

Re: [PATCH v4 2/3] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-06 Thread Naveen N. Rao
On 2017/03/04 01:34PM, Masami Hiramatsu wrote: > On Sat, 4 Mar 2017 11:35:51 +0900 > Masami Hiramatsu <mhira...@kernel.org> wrote: > > > On Sat, 4 Mar 2017 09:49:11 +0900 > > Masami Hiramatsu <mhira...@kernel.org> wrote: > > > > > On Thu,

Re: [PATCH v4 2/3] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-06 Thread Naveen N. Rao
On 2017/03/04 01:34PM, Masami Hiramatsu wrote: > On Sat, 4 Mar 2017 11:35:51 +0900 > Masami Hiramatsu wrote: > > > On Sat, 4 Mar 2017 09:49:11 +0900 > > Masami Hiramatsu wrote: > > > > > On Thu, 2 Mar 2017 23:25:06 +0530 > > > "Naveen

Re: [PATCH 2/3] arm: kprobes: remove kprobe_exceptions_notify

2017-03-06 Thread Naveen N. Rao
On 2017/02/08 01:24AM, Naveen N Rao wrote: > ... as the weak variant will do. > > Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> > --- > arch/arm/probes/kprobes/core.c | 10 -- > arch/arm64/kernel/probes/kprobes.c | 6 -- > 2

Re: [PATCH 2/3] arm: kprobes: remove kprobe_exceptions_notify

2017-03-06 Thread Naveen N. Rao
On 2017/02/08 01:24AM, Naveen N Rao wrote: > ... as the weak variant will do. > > Signed-off-by: Naveen N. Rao > --- > arch/arm/probes/kprobes/core.c | 10 -- > arch/arm64/kernel/probes/kprobes.c | 6 -- > 2 files changed, 16 deletions(-) Wit

Re: [PATCH v4 2/3] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-06 Thread Naveen N. Rao
On 2017/03/04 09:49AM, Masami Hiramatsu wrote: > On Thu, 2 Mar 2017 23:25:06 +0530 > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > We indicate support for accepting sym+offset with kretprobes through a > > line in ftrace README. Parse th

Re: [PATCH v4 2/3] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-06 Thread Naveen N. Rao
On 2017/03/04 09:49AM, Masami Hiramatsu wrote: > On Thu, 2 Mar 2017 23:25:06 +0530 > "Naveen N. Rao" wrote: > > > We indicate support for accepting sym+offset with kretprobes through a > > line in ftrace README. Parse the same to identify support and ch

[PATCH v4 1/3] perf: probe: factor out the ftrace README scanning

2017-03-02 Thread Naveen N. Rao
Simplify and separate out the ftrace README scanning logic into a separate helper. This is used subsequently to scan for all patterns of interest and to cache the result. Since we are only interested in availability of probe argument type x, we will only scan for that. Signed-off-by: Naveen N

[PATCH v4 1/3] perf: probe: factor out the ftrace README scanning

2017-03-02 Thread Naveen N. Rao
Simplify and separate out the ftrace README scanning logic into a separate helper. This is used subsequently to scan for all patterns of interest and to cache the result. Since we are only interested in availability of probe argument type x, we will only scan for that. Signed-off-by: Naveen N

Re: [PATCH v2 4/5] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-02 Thread Naveen N. Rao
On 2017/02/24 05:11PM, Arnaldo Carvalho de Melo wrote: > Em Sat, Feb 25, 2017 at 02:29:17AM +0900, Masami Hiramatsu escreveu: > > On Fri, 24 Feb 2017 00:46:08 +0530 > > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > Thanks. I hope that's an A

Re: [PATCH v2 4/5] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-02 Thread Naveen N. Rao
On 2017/02/24 05:11PM, Arnaldo Carvalho de Melo wrote: > Em Sat, Feb 25, 2017 at 02:29:17AM +0900, Masami Hiramatsu escreveu: > > On Fri, 24 Feb 2017 00:46:08 +0530 > > "Naveen N. Rao" wrote: > > > Thanks. I hope that's an Ack for this patchset? >

[PATCH v4 2/3] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-02 Thread Naveen N. Rao
We indicate support for accepting sym+offset with kretprobes through a line in ftrace README. Parse the same to identify support and choose the appropriate format for kprobe_events. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- tools/perf/util/probe-event.

[PATCH v4 2/3] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-02 Thread Naveen N. Rao
We indicate support for accepting sym+offset with kretprobes through a line in ftrace README. Parse the same to identify support and choose the appropriate format for kprobe_events. Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-event.c | 12 +--- tools/perf/util/probe-file.c

[PATCH v4 3/3] perf: powerpc: choose local entry point with kretprobes

2017-03-02 Thread Naveen N. Rao
N. Rao <naveen.n@linux.vnet.ibm.com> --- tools/perf/arch/powerpc/util/sym-handling.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powerpc/util/sym-handling.c index 1030a6e504bb..cc7c2697c036

[PATCH v4 3/3] perf: powerpc: choose local entry point with kretprobes

2017-03-02 Thread Naveen N. Rao
N. Rao --- tools/perf/arch/powerpc/util/sym-handling.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powerpc/util/sym-handling.c index 1030a6e504bb..cc7c2697c036 100644 --- a/tools/perf/arch/powerpc

Re: [PATCH v3 1/2] perf: probe: generalize probe event file open routine

2017-03-01 Thread Naveen N. Rao
On 2017/02/25 01:46AM, Masami Hiramatsu wrote: > On Thu, 23 Feb 2017 17:07:23 +0530 > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > ...into a generic function for opening trace files. > > Even if it repeats subject, please write complete des

Re: [PATCH v3 1/2] perf: probe: generalize probe event file open routine

2017-03-01 Thread Naveen N. Rao
On 2017/02/25 01:46AM, Masami Hiramatsu wrote: > On Thu, 23 Feb 2017 17:07:23 +0530 > "Naveen N. Rao" wrote: > > > ...into a generic function for opening trace files. > > Even if it repeats subject, please write complete description... Agh, ok sure. I will try

Re: [PATCH v2 4/5] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-01 Thread Naveen N. Rao
On 2017/02/25 08:55AM, Masami Hiramatsu wrote: > On Fri, 24 Feb 2017 17:11:03 -0300 > Arnaldo Carvalho de Melo <a...@kernel.org> wrote: > > > Em Sat, Feb 25, 2017 at 02:29:17AM +0900, Masami Hiramatsu escreveu: > > > On Fri, 24 Feb 2017 00:46:08 +0530 &

Re: [PATCH v2 4/5] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-01 Thread Naveen N. Rao
On 2017/02/25 08:55AM, Masami Hiramatsu wrote: > On Fri, 24 Feb 2017 17:11:03 -0300 > Arnaldo Carvalho de Melo wrote: > > > Em Sat, Feb 25, 2017 at 02:29:17AM +0900, Masami Hiramatsu escreveu: > > > On Fri, 24 Feb 2017 00:46:08 +0530 > > > "Naveen N. Rao&

Re: [PATCH v3 2/2] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-01 Thread Naveen N. Rao
On 2017/02/25 02:12AM, Masami Hiramatsu wrote: > On Thu, 23 Feb 2017 17:07:24 +0530 > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > We indicate support for accepting sym+offset with kretprobes through a > > line in ftrace README. Parse th

Re: [PATCH v3 2/2] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-03-01 Thread Naveen N. Rao
On 2017/02/25 02:12AM, Masami Hiramatsu wrote: > On Thu, 23 Feb 2017 17:07:24 +0530 > "Naveen N. Rao" wrote: > > > We indicate support for accepting sym+offset with kretprobes through a > > line in ftrace README. Parse the same to identify support and ch

Re: [PATCH v2 3.5/5] trace/kprobes: Add back warning about offset in return probes

2017-03-01 Thread Naveen N. Rao
On 2017/02/27 11:52AM, Steven Rostedt (VMware) wrote: > Let's not remove the warning about offsets and return probes when the > offset is invalid. Good point! Thanks, Steve! > > Signed-off-by: Steven Rostedt (VMware) <rost...@goodmis.org> Acked-by: Navee

Re: [PATCH v2 3.5/5] trace/kprobes: Add back warning about offset in return probes

2017-03-01 Thread Naveen N. Rao
On 2017/02/27 11:52AM, Steven Rostedt (VMware) wrote: > Let's not remove the warning about offsets and return probes when the > offset is invalid. Good point! Thanks, Steve! > > Signed-off-by: Steven Rostedt (VMware) Acked-by: Naveen N. Rao > --- > diff --git a/kernel/tr

Re: [PATCH v2 4/5] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-02-23 Thread Naveen N. Rao
On 2017/02/23 06:10PM, Masami Hiramatsu wrote: > On Wed, 22 Feb 2017 19:23:40 +0530 > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > We indicate support for accepting sym+offset with kretprobes through a > > line in ftrace README. Parse th

Re: [PATCH v2 4/5] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-02-23 Thread Naveen N. Rao
On 2017/02/23 06:10PM, Masami Hiramatsu wrote: > On Wed, 22 Feb 2017 19:23:40 +0530 > "Naveen N. Rao" wrote: > > > We indicate support for accepting sym+offset with kretprobes through a > > line in ftrace README. Parse the same to identify support and ch

[PATCH v3 2/2] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-02-23 Thread Naveen N. Rao
We indicate support for accepting sym+offset with kretprobes through a line in ftrace README. Parse the same to identify support and choose the appropriate format for kprobe_events. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- tools/perf/util/probe-event.

[PATCH v3 1/2] perf: probe: generalize probe event file open routine

2017-02-23 Thread Naveen N. Rao
...into a generic function for opening trace files. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- tools/perf/util/probe-file.c | 20 +++- tools/perf/util/probe-file.h | 1 + 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/tools/per

[PATCH v3 2/2] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-02-23 Thread Naveen N. Rao
We indicate support for accepting sym+offset with kretprobes through a line in ftrace README. Parse the same to identify support and choose the appropriate format for kprobe_events. Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-event.c | 49

[PATCH v3 1/2] perf: probe: generalize probe event file open routine

2017-02-23 Thread Naveen N. Rao
...into a generic function for opening trace files. Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-file.c | 20 +++- tools/perf/util/probe-file.h | 1 + 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe

[PATCH v2 4/5] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-02-22 Thread Naveen N. Rao
We indicate support for accepting sym+offset with kretprobes through a line in ftrace README. Parse the same to identify support and choose the appropriate format for kprobe_events. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- tools/perf/util/probe-event.

[PATCH v2 3/5] trace/kprobes: allow return probes with offsets and absolute addresses

2017-02-22 Thread Naveen N. Rao
with kretprobes. Allow its use with the trace infrastructure. To distinguish kernels that support this, update ftrace README to explicitly call this out. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- kernel/trace/trace.c| 1 + kernel/trace/trace_kprobe

[PATCH v2 4/5] perf: kretprobes: offset from reloc_sym if kernel supports it

2017-02-22 Thread Naveen N. Rao
We indicate support for accepting sym+offset with kretprobes through a line in ftrace README. Parse the same to identify support and choose the appropriate format for kprobe_events. Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-event.c | 47

[PATCH v2 3/5] trace/kprobes: allow return probes with offsets and absolute addresses

2017-02-22 Thread Naveen N. Rao
with kretprobes. Allow its use with the trace infrastructure. To distinguish kernels that support this, update ftrace README to explicitly call this out. Signed-off-by: Naveen N. Rao --- kernel/trace/trace.c| 1 + kernel/trace/trace_kprobe.c | 8 2 files changed, 1 insertion

[PATCH v2 5/5] perf: powerpc: choose local entry point with kretprobes

2017-02-22 Thread Naveen N. Rao
N. Rao <naveen.n@linux.vnet.ibm.com> --- tools/perf/arch/powerpc/util/sym-handling.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powerpc/util/sym-handling.c index 1030a6e504bb..73dbdc83286c

[PATCH v2 5/5] perf: powerpc: choose local entry point with kretprobes

2017-02-22 Thread Naveen N. Rao
N. Rao --- tools/perf/arch/powerpc/util/sym-handling.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powerpc/util/sym-handling.c index 1030a6e504bb..73dbdc83286c 100644 --- a/tools/perf/arch/powerpc/util

[PATCH v2 2/5] powerpc: kretprobes: override default function entry offset

2017-02-22 Thread Naveen N. Rao
With ABIv2, we offset 8 bytes into a function to get at the local entry point. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/kernel/kprobes.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/

[PATCH v2 2/5] powerpc: kretprobes: override default function entry offset

2017-02-22 Thread Naveen N. Rao
With ABIv2, we offset 8 bytes into a function to get at the local entry point. Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c index 735ff3d3f77d

[PATCH v2 1/5] kretprobes: ensure probe location is at function entry

2017-02-22 Thread Naveen N. Rao
from a function entry, as determined through a kallsyms_lookup(). Introduce arch_function_offset_within_entry() as a way for architectures to override this. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- include/linux/kprobes.h | 1 + kernel/kprobes.c

[PATCH v2 0/5] kretprobe fixes

2017-02-22 Thread Naveen N. Rao
README. Patch 4 is new. Patch 5 is updated to consider ftrace README. Thanks, Naveen Naveen N. Rao (5): kretprobes: ensure probe location is at function entry powerpc: kretprobes: override default function entry offset trace/kprobes: allow return probes with offsets and absolute addresses

[PATCH v2 0/5] kretprobe fixes

2017-02-22 Thread Naveen N. Rao
README. Patch 4 is new. Patch 5 is updated to consider ftrace README. Thanks, Naveen Naveen N. Rao (5): kretprobes: ensure probe location is at function entry powerpc: kretprobes: override default function entry offset trace/kprobes: allow return probes with offsets and absolute addresses

[PATCH v2 1/5] kretprobes: ensure probe location is at function entry

2017-02-22 Thread Naveen N. Rao
from a function entry, as determined through a kallsyms_lookup(). Introduce arch_function_offset_within_entry() as a way for architectures to override this. Signed-off-by: Naveen N. Rao --- include/linux/kprobes.h | 1 + kernel/kprobes.c| 13 + 2 files changed, 14 insertions

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-22 Thread Naveen N. Rao
On 2017/02/21 10:07PM, Masami Hiramatsu wrote: > On Mon, 20 Feb 2017 15:20:24 +0530 > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > On 2017/02/19 01:42PM, Masami Hiramatsu wrote: > > > On Fri, 17 Feb 2017 17:42:54 -0300 > > >

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-22 Thread Naveen N. Rao
On 2017/02/21 10:07PM, Masami Hiramatsu wrote: > On Mon, 20 Feb 2017 15:20:24 +0530 > "Naveen N. Rao" wrote: > > > On 2017/02/19 01:42PM, Masami Hiramatsu wrote: > > > On Fri, 17 Feb 2017 17:42:54 -0300 > > > Arnaldo Carvalho de Melo wrote: > &

[PATCH v2 3/5] kprobes: Skip preparing optprobe if the probe is ftrace-based

2017-02-21 Thread Naveen N. Rao
From: Masami Hiramatsu <mhira...@kernel.org> Skip preparing optprobe if the probe is ftrace-based, since anyway, it must not be optimized (or already optimized by ftrace). Tested-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> Signed-off-by: Masami Hiramatsu <mhira...@kernel.o

[PATCH v2 3/5] kprobes: Skip preparing optprobe if the probe is ftrace-based

2017-02-21 Thread Naveen N. Rao
From: Masami Hiramatsu Skip preparing optprobe if the probe is ftrace-based, since anyway, it must not be optimized (or already optimized by ftrace). Tested-by: Naveen N. Rao Signed-off-by: Masami Hiramatsu --- kernel/kprobes.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions

[PATCH v2 5/5] powerpc: kprobes: prefer ftrace when probing function entry

2017-02-21 Thread Naveen N. Rao
k kretprobe_trampoline+0x0[OPTIMIZED] and after patch: # cat ../kprobes/list c00d074c k _do_fork+0xc[DISABLED][FTRACE] c00412b0 k kretprobe_trampoline+0x0[OPTIMIZED] Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/kernel/

[PATCH v2 5/5] powerpc: kprobes: prefer ftrace when probing function entry

2017-02-21 Thread Naveen N. Rao
k kretprobe_trampoline+0x0[OPTIMIZED] and after patch: # cat ../kprobes/list c00d074c k _do_fork+0xc[DISABLED][FTRACE] c00412b0 k kretprobe_trampoline+0x0[OPTIMIZED] Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 17 +++-- 1 f

[PATCH v2 4/5] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-21 Thread Naveen N. Rao
on the x86 code by Masami. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- .../debug/kprobes-on-ftrace/arch-support.txt | 2 +- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/kprobes.h | 10 ++ arch/powerpc/

[PATCH v2 2/5] powerpc: ftrace: restore LR from pt_regs

2017-02-21 Thread Naveen N. Rao
. Live patch and function graph continue to work fine with this change. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/kernel/entry_64.S | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/entry_64.S b/arch/p

[PATCH v2 4/5] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-21 Thread Naveen N. Rao
on the x86 code by Masami. Signed-off-by: Naveen N. Rao --- .../debug/kprobes-on-ftrace/arch-support.txt | 2 +- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/kprobes.h | 10 ++ arch/powerpc/kernel/Makefile | 3

[PATCH v2 2/5] powerpc: ftrace: restore LR from pt_regs

2017-02-21 Thread Naveen N. Rao
. Live patch and function graph continue to work fine with this change. Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/entry_64.S | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 8fd8718722a1

[PATCH v2 1/5] powerpc: ftrace: minor cleanup

2017-02-21 Thread Naveen N. Rao
livepatch_handler() nor ftrace_graph_caller() return back here. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/kernel/entry_64.S | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entr

[PATCH v2 1/5] powerpc: ftrace: minor cleanup

2017-02-21 Thread Naveen N. Rao
livepatch_handler() nor ftrace_graph_caller() return back here. Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/entry_64.S | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index 6432d4bf08c8..8fd8718722a1

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-20 Thread Naveen N. Rao
On 2017/02/17 05:42PM, Arnaldo Carvalho de Melo wrote: > Em Fri, Feb 17, 2017 at 07:44:33PM +0900, Masami Hiramatsu escreveu: > > On Thu, 16 Feb 2017 13:47:37 +0530 > > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > > > I am

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-20 Thread Naveen N. Rao
On 2017/02/17 05:42PM, Arnaldo Carvalho de Melo wrote: > Em Fri, Feb 17, 2017 at 07:44:33PM +0900, Masami Hiramatsu escreveu: > > On Thu, 16 Feb 2017 13:47:37 +0530 > > "Naveen N. Rao" wrote: > > > > > I am posting the powerpc bits in the same thread so as

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-20 Thread Naveen N. Rao
On 2017/02/19 01:42PM, Masami Hiramatsu wrote: > On Fri, 17 Feb 2017 17:42:54 -0300 > Arnaldo Carvalho de Melo <a...@kernel.org> wrote: > > > Em Fri, Feb 17, 2017 at 07:44:33PM +0900, Masami Hiramatsu escreveu: > > > On Thu, 16 Feb 2017 13:47:37 +0530 &

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-20 Thread Naveen N. Rao
On 2017/02/19 01:42PM, Masami Hiramatsu wrote: > On Fri, 17 Feb 2017 17:42:54 -0300 > Arnaldo Carvalho de Melo wrote: > > > Em Fri, Feb 17, 2017 at 07:44:33PM +0900, Masami Hiramatsu escreveu: > > > On Thu, 16 Feb 2017 13:47:37 +0530 > > > "Naveen N. Ra

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-20 Thread Naveen N. Rao
On 2017/02/17 05:42PM, Arnaldo Carvalho de Melo wrote: > Em Fri, Feb 17, 2017 at 07:44:33PM +0900, Masami Hiramatsu escreveu: > > On Thu, 16 Feb 2017 13:47:37 +0530 > > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > > > I am

Re: [PATCH 0/2] powerpc: kretprobe updates

2017-02-20 Thread Naveen N. Rao
On 2017/02/17 05:42PM, Arnaldo Carvalho de Melo wrote: > Em Fri, Feb 17, 2017 at 07:44:33PM +0900, Masami Hiramatsu escreveu: > > On Thu, 16 Feb 2017 13:47:37 +0530 > > "Naveen N. Rao" wrote: > > > > > I am posting the powerpc bits in the same thread so as

Re: [PATCH 1/3] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-16 Thread Naveen N. Rao
On 2017/02/15 04:11PM, Masami Hiramatsu wrote: > Hi Naveen, > > On Wed, 15 Feb 2017 00:28:34 +0530 > "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> wrote: > > > diff --git a/arch/powerpc/kernel/optprobes.c > > b/arch/powerpc/kernel/optprobes.c

Re: [PATCH 1/3] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-16 Thread Naveen N. Rao
On 2017/02/15 04:11PM, Masami Hiramatsu wrote: > Hi Naveen, > > On Wed, 15 Feb 2017 00:28:34 +0530 > "Naveen N. Rao" wrote: > > > diff --git a/arch/powerpc/kernel/optprobes.c > > b/arch/powerpc/kernel/optprobes.c > > index e51a045f3d3b..a8f414

Re: [PATCH 1/3] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-16 Thread Naveen N. Rao
On 2017/02/15 09:58AM, Ananth N Mavinakayanahalli wrote: > On Wed, Feb 15, 2017 at 12:28:34AM +0530, Naveen N. Rao wrote: > > Allow kprobes to be placed on ftrace _mcount() call sites. This > > optimization avoids the use of a trap, by riding on ftrace > > infrastructure.

Re: [PATCH 1/3] powerpc: kprobes: add support for KPROBES_ON_FTRACE

2017-02-16 Thread Naveen N. Rao
On 2017/02/15 09:58AM, Ananth N Mavinakayanahalli wrote: > On Wed, Feb 15, 2017 at 12:28:34AM +0530, Naveen N. Rao wrote: > > Allow kprobes to be placed on ftrace _mcount() call sites. This > > optimization avoids the use of a trap, by riding on ftrace > > infrastructure.

[PATCH 3/5] powerpc: kprobes: fix handling of function offsets on ABIv2

2017-02-16 Thread Naveen N. Rao
ine+0x0[OPTIMIZED] Acked-by: Ananth N Mavinakayanahalli <ana...@linux.vnet.ibm.com> Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/kernel/kprobes.c | 4 ++-- include/linux/kprobes.h | 2 +- kernel/kprobes.c | 7 --- 3 files chang

[PATCH 5/5] powerpc: kprobes: emulate instructions on kprobe handler re-entry

2017-02-16 Thread Naveen N. Rao
On kprobe handler re-entry, try to emulate the instruction rather than single stepping always. As a related change, remove the duplicate saving of msr as that is already done in set_current_kprobe() Acked-by: Ananth N Mavinakayanahalli <ana...@linux.vnet.ibm.com> Signed-off-by: Naveen

[PATCH 3/5] powerpc: kprobes: fix handling of function offsets on ABIv2

2017-02-16 Thread Naveen N. Rao
ine+0x0[OPTIMIZED] Acked-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 4 ++-- include/linux/kprobes.h | 2 +- kernel/kprobes.c | 7 --- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/kprob

[PATCH 5/5] powerpc: kprobes: emulate instructions on kprobe handler re-entry

2017-02-16 Thread Naveen N. Rao
On kprobe handler re-entry, try to emulate the instruction rather than single stepping always. As a related change, remove the duplicate saving of msr as that is already done in set_current_kprobe() Acked-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel

[PATCH 4/5] powerpc: kprobes: factor out code to emulate instruction into a helper

2017-02-16 Thread Naveen N. Rao
This helper will be used in a subsequent patch to emulate instructions on re-entering the kprobe handler. No functional change. Acked-by: Ananth N Mavinakayanahalli <ana...@linux.vnet.ibm.com> Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/kernel/kp

[PATCH 4/5] powerpc: kprobes: factor out code to emulate instruction into a helper

2017-02-16 Thread Naveen N. Rao
This helper will be used in a subsequent patch to emulate instructions on re-entering the kprobe handler. No functional change. Acked-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/kernel/kprobes.c | 52 ++- 1 file changed

[PATCH 2/5] kprobes: convert kprobe_lookup_name() to a function

2017-02-16 Thread Naveen N. Rao
The macro is now pretty long and ugly on powerpc. In the light of further changes needed here, convert it to a __weak variant to be over-ridden with a nicer looking function. Suggested-by: Masami Hiramatsu <mhira...@kernel.org> Signed-off-by: Naveen N. Rao <naveen.n@linux.vne

[PATCH 1/5] powerpc: introduce a new helper to obtain function entry points

2017-02-16 Thread Naveen N. Rao
kprobe_lookup_name() is specific to the kprobe subsystem and may not always return the function entry point (in a subsequent patch for KPROBES_ON_FTRACE). For looking up function entry points, introduce a separate helper and use the same in optprobes.c Signed-off-by: Naveen N. Rao <navee

<    1   2   3   4   5   6   7   8   9   10   >