[PATCH RFC] powerpc/ftrace: add powerpc timebase as a trace clock source

2015-04-21 Thread Naveen N. Rao
tb_offset). Signed-off-by: Naveen N. Rao --- I have followed the approach used by x86-tsc here, but we could get rid of trace_clock.c if we directly use get_tb() with perhaps the notrace annotation. Would that be preferable? Thanks, Naveen Documentation/trace/ftrace.txt | 5 + arch

Re: [PATCH RFC] powerpc/ftrace: add powerpc timebase as a trace clock source

2015-04-21 Thread Naveen N. Rao
On 2015/04/21 09:25AM, Steven Rostedt wrote: > On Tue, 21 Apr 2015 16:33:36 +0530 > "Naveen N. Rao" wrote: > > > Add a new powerpc-specific trace clock using the timebase register, > > similar to x86-tsc. This gives us a fast, monotonic, cross-cpu clock > >

Re: [PATCH RFC] powerpc/ftrace: add powerpc timebase as a trace clock source

2015-04-22 Thread Naveen N. Rao
On 2015/04/23 01:14PM, Michael Ellerman wrote: > On Wed, 2015-04-22 at 10:48 +0530, Naveen N. Rao wrote: > > On 2015/04/21 09:25AM, Steven Rostedt wrote: > > > On Tue, 21 Apr 2015 16:33:36 +0530 > > > "Naveen N. Rao" wrote: > > > > > > >

[PATCH] powerpc/ftrace: add powerpc timebase as a trace clock source

2015-04-22 Thread Naveen N. Rao
as + * published by the Free Software Foundation. + * + * Copyright (C) 2015 Naveen N. Rao, IBM Corporation + */ + +#ifndef _ASM_PPC_TRACE_CLOCK_H +#define _ASM_PPC_TRACE_CLOCK_H + +#include +#include + +#ifdef CONFIG_TRACE_CLOCK + +extern u64 notrace trace_clock_ppc_tb(void); + +#define ARCH_TRACE_CLO

Re: [PATCH] powerpc/ftrace: add powerpc timebase as a trace clock source

2015-04-24 Thread Naveen N. Rao
On 2015/04/23 09:10AM, Steven Rostedt wrote: > On Thu, 23 Apr 2015 12:15:04 +0530 > "Naveen N. Rao" wrote: > > > diff --git a/arch/powerpc/include/asm/trace_clock.h > > b/arch/powerpc/include/asm/trace_clock.h > > new file mode 100644 > > index 00

[PATCH v2] powerpc/ftrace: add powerpc timebase as a trace clock source

2015-04-24 Thread Naveen N. Rao
ght (C) 2015 Naveen N. Rao, IBM Corporation + */ + +#ifndef _ASM_PPC_TRACE_CLOCK_H +#define _ASM_PPC_TRACE_CLOCK_H + +#include +#include + +extern u64 notrace trace_clock_ppc_tb(void); + +#define ARCH_TRACE_CLOCKS { trace_clock_ppc_tb, "ppc-tb", 0 }, + +#endif /* _ASM_PPC_TRACE_CLOCK_H

Re: [PATCHv2 2/8] perf probe: Improve detection of file/function name in the probe pattern

2015-04-26 Thread Naveen N. Rao
On 2015/03/13 08:20PM, Masami Hiramatsu wrote: > (2015/03/13 5:24), Arnaldo Carvalho de Melo wrote: > > Em Mon, Dec 15, 2014 at 08:20:32PM +0530, Naveen N. Rao escreveu: > >> Currently, perf probe considers patterns including a '.' to be a file. > >> However,

Re: [PATCHv2 3/8] perf probe powerpc: Fix symbol fixup issues due to ELF type

2015-04-26 Thread Naveen N. Rao
On 2015/03/12 05:23PM, Arnaldo Carvalho de Melo wrote: > Em Mon, Dec 15, 2014 at 08:20:33PM +0530, Naveen N. Rao escreveu: > > If using the symbol table, symbol addresses are not being fixed up > > properly, resulting in probes being placed at wrong addresses: > > >

Re: [PATCHv2 5/8] perf probe powerpc: Allow matching against dot symbols

2015-04-26 Thread Naveen N. Rao
On 2015/03/12 05:30PM, Arnaldo Carvalho de Melo wrote: > Em Mon, Dec 15, 2014 at 08:20:35PM +0530, Naveen N. Rao escreveu: > > Allow perf probe to work on powerpc ABIv1 without the need to specify > > the leading dot '.' for functions. 'perf probe do_f

Re: [PATCHv2 2/8] perf probe: Improve detection of file/function name in the probe pattern

2015-04-26 Thread Naveen N. Rao
On 2015/03/13 08:20PM, Masami Hiramatsu wrote: > (2015/03/13 5:24), Arnaldo Carvalho de Melo wrote: > > Em Mon, Dec 15, 2014 at 08:20:32PM +0530, Naveen N. Rao escreveu: > >> Currently, perf probe considers patterns including a '.' to be a file. > >> However,

[PATCH v3 3/7] perf probe/ppc: Use the right prefix when ignoring SyS symbols on ppc

2015-04-28 Thread Naveen N. Rao
Use the proper prefix when ignoring SyS symbols on ppc ABIv1. While at it, generalize symbol selection so architectures can implement their own logic. Signed-off-by: Naveen N. Rao Reviewed-by: Srikar Dronamraju --- Changes: - Move logic to arch helper. tools/perf/arch/powerpc/util/sym

[PATCH v3 6/7] perf probe/ppc64le: Prefer symbol table lookup over DWARF

2015-04-28 Thread Naveen N. Rao
s 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 Reviewed-by: Srikar Dronamraju --- Changes: - No changes other than move to use __weak functions tools/perf/a

[PATCH v3 5/7] perf probe/ppc64le: Fix ppc64 ABIv2 symbol decoding

2015-04-28 Thread Naveen N. Rao
From: Ananth N Mavinakayanahalli ppc64 ELF ABIv2 has a Global Entry Point (GEP) and a Local Entry Point (LEP). For purposes of probing, we need the LEP - the offset to which is encoded in st_other. Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao Reviewed-by: Srikar

[PATCH v3 4/7] perf probe/ppc: Enable matching against dot symbols automatically

2015-04-28 Thread Naveen N. Rao
, during symbol name comparison. Signed-off-by: Naveen N. Rao Reviewed-by: Srikar Dronamraju --- Changes: This patch has been redone since upstream changed quite a bit. We now implement arch-specific helper during symbol name comparison to ignore leading dot on ppc symbols. tools/perf/a

[PATCH v3 0/7] Fixes for perf probe issues on ppc

2015-04-28 Thread Naveen N. Rao
changelog. Please note that I have dropped the first (kernel) patch from the last series since it has been pushed upstream. This series now only includes the rest of the patches. (*) http://thread.gmane.org/gmane.linux.kernel/1851128 Naveen N. Rao (7): perf probe: Improve detection of file

[PATCH v3 1/7] perf probe: Improve detection of file/function name in the probe pattern

2015-04-28 Thread Naveen N. Rao
imeout_interruptible Semantic error :File always requires line number or lazy pattern. Error: Command Parse Error. Fix this: - by checking the probe pattern in more detail, and - skipping leading dot if one exists when creating/deleting events. Signed-off-by: Naveen N. Rao Reviewed-b

[PATCH v3 7/7] perf probe/ppc64le: Fixup function entry if using kallsyms lookup

2015-04-28 Thread Naveen N. Rao
On powerpc ABIv2, if no debug-info is found and we use kallsyms, we need to fixup the function entry to point to the local entry point. Use offset of 8 since current toolchains always generate 2 instructions (8 bytes). Signed-off-by: Naveen N. Rao Reviewed-by: Srikar Dronamraju --- Changes

[PATCH v3 2/7] perf probe/ppc: Fix symbol fixup issues due to ELF type

2015-04-28 Thread Naveen N. Rao
probe:do_fork -aR sleep 1 # cat /sys/kernel/debug/tracing/kprobe_events p:probe/do_fork _text+635952 # printf "%x" 635952 9b430 # grep do_fork /boot/System.map c00ab430 T .do_fork Fix by checking for ELF type ET_DYN used by ppc64 kernels. Signed-off-by: Naveen N. Rao Reviewed-

Re: [PATCH v3 0/7] Fixes for perf probe issues on ppc

2015-04-28 Thread Naveen N. Rao
On 2015/04/28 10:54AM, Arnaldo Carvalho de Melo wrote: > Em Tue, Apr 28, 2015 at 05:35:33PM +0530, Naveen N. Rao escreveu: > > This patchset fixes various issues with perf probe on powerpc across ABIv1 > > and > > ABIv2: > > - in the presence of DWARF debug-info, &g

Re: [PATCH v3 0/7] Fixes for perf probe issues on ppc

2015-04-28 Thread Naveen N. Rao
On 2015/04/29 07:17AM, Masami Hiramatsu wrote: > On 2015/04/28 22:54, Arnaldo Carvalho de Melo wrote: > > Em Tue, Apr 28, 2015 at 05:35:33PM +0530, Naveen N. Rao escreveu: > >> This patchset fixes various issues with perf probe on powerpc across ABIv1 > >> and > &g

[PATCH 2/3] kvm/x86: report guest steal time in host

2015-05-06 Thread Naveen N. Rao
Report guest steal time in host task statistics. On x86, this is just the scheduler run_delay. Signed-off-by: Naveen N. Rao --- arch/x86/kvm/x86.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 0ee725f..737b0e4 100644 --- a/arch/x86/kvm/x86.c

[PATCH 3/3] kvm/powerpc: report guest steal time in host

2015-05-06 Thread Naveen N. Rao
_arch structure to accurately track the guest vcpu cede status (this is needed since the existing ceded field is modified before we can use it). During DTL entry creation, we check this flag and account the time as stolen if the guest vcpu had not ceded. Signed-off-by: Naveen N. Rao --- Tests show tha

[PATCH 0/3] Report guest steal time in host

2015-05-06 Thread Naveen N. Rao
: 1008 - 30060.000.033.930.250.72 - |__qemu-system-ppc Thanks! - Naveen -- Changes since RFC: Updated description to clarify few aspects that I got questions about. No code changes. Naveen N. Rao (3): procfs: add guest steal time in /proc//stat kvm/x86

[PATCH 1/3] procfs: add guest steal time in /proc//stat

2015-05-06 Thread Naveen N. Rao
Introduce a field in /proc//stat to expose guest steal time. Signed-off-by: Naveen N. Rao --- fs/proc/array.c | 6 ++ include/linux/sched.h | 7 +++ kernel/fork.c | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/fs/proc/array.c b/fs/proc/array.c index

Re: [PATCH 0/3] Report guest steal time in host

2015-05-06 Thread Naveen N. Rao
Arrgh! Sorry about the headers. Please ignore this set. Will repost in a separate thread. - Naveen On 2015/05/06 04:28PM, Naveen N Rao wrote: > Steal time accounts the time duration during which a guest vcpu was ready to > run, but was not scheduled to run by the hypervisor. T

[PATCH 2/3] kvm/x86: report guest steal time in host

2015-05-06 Thread Naveen N. Rao
Report guest steal time in host task statistics. On x86, this is just the scheduler run_delay. Signed-off-by: Naveen N. Rao --- arch/x86/kvm/x86.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index c73efcd..7107b7d 100644 --- a/arch/x86/kvm/x86.c

[PATCH 3/3] kvm/powerpc: report guest steal time in host

2015-05-06 Thread Naveen N. Rao
_arch structure to accurately track the guest vcpu cede status (this is needed since the existing ceded field is modified before we can use it). During DTL entry creation, we check this flag and account the time as stolen if the guest vcpu had not ceded. Signed-off-by: Naveen N. Rao --- Tests show tha

[PATCH 1/3] procfs: add guest steal time in /proc//stat

2015-05-06 Thread Naveen N. Rao
Introduce a field in /proc//stat to expose guest steal time. Signed-off-by: Naveen N. Rao --- fs/proc/array.c | 6 ++ include/linux/sched.h | 7 +++ kernel/fork.c | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/fs/proc/array.c b/fs/proc/array.c index

[PATCH 0/3] Report guest steal time in host

2015-05-06 Thread Naveen N. Rao
: 1008 - 30060.000.033.930.250.72 - |__qemu-system-ppc - Naveen -- Changes since RFC: Updated description to clarify few aspects that I got questions about. No code changes. Naveen N. Rao (3): procfs: add guest steal time in /proc//stat kvm/x86: report

Re: [PATCH 3/3] kvm/powerpc: report guest steal time in host

2015-05-06 Thread Naveen N. Rao
On 2015/05/06 02:46PM, Christian Borntraeger wrote: > Am 06.05.2015 um 13:56 schrieb Naveen N. Rao: > > On powerpc, kvm tracks both the guest steal time as well as the time > > when guest was idle and this gets sent in to the guest through DTL. The > > guest accounts these en

[RFC PATCH 1/8] kprobes: Fix kallsyms lookup across powerpc ABIv1 and ABIv2

2014-12-09 Thread Naveen N. Rao
avoid having to look at the function descriptor. Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/code-patching.h | 26 +- arch/powerpc/include/asm/kprobes.h | 58 ++-- 2 files changed, 58 insertions(+), 26 deletions(-) diff --git a/arch

[RFC PATCH 0/8] Fix perf probe issues on powerpc

2014-12-09 Thread Naveen N. Rao
patch 6. Tested on ppc64 BE and LE. - Naveen Naveen N. Rao (8): kprobes: Fix kallsyms lookup across powerpc ABIv1 and ABIv2 perf probe powerpc: Fix symbol fixup issues due to ELF type perf probe: Improve detection of file/function name in the probe pattern perf probe powerpc: Handle

[RFC PATCH 2/8] perf probe powerpc: Fix symbol fixup issues due to ELF type

2014-12-09 Thread Naveen N. Rao
probe:do_fork -aR sleep 1 # cat /sys/kernel/debug/tracing/kprobe_events p:probe/do_fork _text+635952 # printf "%x" 635952 9b430 # grep do_fork /boot/System.map c00ab430 T .do_fork Fix by checking for ELF type ET_DYN used by ppc64 kernels. Signed-off-by: Naveen N. Rao ---

[RFC PATCH 3/8] perf probe: Improve detection of file/function name in the probe pattern

2014-12-09 Thread Naveen N. Rao
imeout_interruptible Semantic error :File always requires line number or lazy pattern. Error: Command Parse Error. Fix this by checking the probe pattern in more detail. Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-event.c | 23 --- 1 file changed, 20 insert

[RFC PATCH 4/8] perf probe powerpc: Handle powerpc dot symbols

2014-12-09 Thread Naveen N. Rao
Fix up various perf aspects related to ppc64's usage of dot functions: - ignore leading '.' when generating event names and when looking for existing events. - use the proper prefix when ignoring SyS symbol lookups. Signed-off-by: Naveen N. Rao --- tools/perf/util/pr

[RFC PATCH 5/8] perf probe powerpc: Allow matching against dot symbols

2014-12-09 Thread Naveen N. Rao
Allow perf probe to work on powerpc ABIv1 without the need to specify the leading dot '.' for functions. 'perf probe do_fork' works with this patch. Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-event.c | 9 + 1 file changed, 9 insertions(+) diff --git a/t

[RFC PATCH 6/8] perf tools powerpc: Fix PPC64 ELF ABIv2 symbol decoding

2014-12-09 Thread Naveen N. Rao
PPC64 ELF ABIv2 has a Global Entry Point (GEP) and a Local Entry Point (LEP). For purposes of probing, we need the LEP. Offset to the LEP is encoded in st_other. Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- tools/perf/arch/powerpc/Makefile | 1

[RFC PATCH 7/8] perf probe powerpc: Use DWARF info only if necessary

2014-12-09 Thread Naveen N. Rao
: Naveen N. Rao --- tools/perf/util/probe-event.c | 8 1 file changed, 8 insertions(+) diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c index 174c22e..adcdbd2 100644 --- a/tools/perf/util/probe-event.c +++ b/tools/perf/util/probe-event.c @@ -2382,6 +2382,14 @@ static

[RFC PATCH 8/8] perf probe powerpc: Fixup function entry if using kallsyms lookup

2014-12-09 Thread Naveen N. Rao
On powerpc ABIv2, if no debug-info is found and we use kallsyms, we need to fixup the function entry to point to the local entry point. Use offset of 8 since current toolchains always generate 2 instructions (8 bytes). Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-event.c | 9

Re: [RFC PATCH 2/8] perf probe powerpc: Fix symbol fixup issues due to ELF type

2014-12-10 Thread Naveen N. Rao
On 2014/12/09 06:07PM, Arnaldo Carvalho de Melo wrote: > Em Tue, Dec 09, 2014 at 11:04:00PM +0530, Naveen N. Rao escreveu: > > If using the symbol table, symbol addresses are not being fixed up > > properly, resulting in probes being placed at wrong addresses: > > >

Re: [RFC PATCH 1/8] kprobes: Fix kallsyms lookup across powerpc ABIv1 and ABIv2

2014-12-10 Thread Naveen N. Rao
On 2014/12/10 08:37PM, Michael Ellerman wrote: > On Tue, 2014-12-09 at 23:03 +0530, Naveen N. Rao wrote: > > Currently, all non-dot symbols are being treated as function descriptors > > in ABIv1. This is incorrect and is resulting in perf probe not working: > > I don&#x

Re: [RFC PATCH 2/8] perf probe powerpc: Fix symbol fixup issues due to ELF type

2014-12-10 Thread Naveen N. Rao
On 2014/12/10 08:50PM, Michael Ellerman wrote: > On Tue, 2014-12-09 at 23:04 +0530, Naveen N. Rao wrote: > > If using the symbol table, symbol addresses are not being fixed up > > properly, resulting in probes being placed at wrong addresses: > > > > # perf probe do

Re: [RFC PATCH 3/8] perf probe: Improve detection of file/function name in the probe pattern

2014-12-10 Thread Naveen N. Rao
On 2014/12/10 09:00PM, Michael Ellerman wrote: > On Tue, 2014-12-09 at 23:04 +0530, Naveen N. Rao wrote: > > Currently, perf probe considers patterns including a '.' to be a file. > > However, this causes problems on powerpc ABIv1 where all functions have > > a leadi

Re: [RFC PATCH 6/8] perf tools powerpc: Fix PPC64 ELF ABIv2 symbol decoding

2014-12-10 Thread Naveen N. Rao
On 2014/12/10 09:13PM, Michael Ellerman wrote: > On Tue, 2014-12-09 at 23:04 +0530, Naveen N. Rao wrote: > > PPC64 ELF ABIv2 has a Global Entry Point (GEP) and a Local Entry Point > > (LEP). For purposes of probing, we need the LEP. Offset to the LEP is > > encoded in st_other

Re: [RFC PATCH 7/8] perf probe powerpc: Use DWARF info only if necessary

2014-12-10 Thread Naveen N. Rao
On 2014/12/10 09:17PM, Michael Ellerman wrote: > On Tue, 2014-12-09 at 23:04 +0530, Naveen N. Rao wrote: > > 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 addres

[PATCHv2 1/8] kprobes: Fix kallsyms lookup across powerpc ABIv1 and ABIv2

2014-12-15 Thread Naveen N. Rao
don't have dot symbols, but need to use the local entry point. Signed-off-by: Naveen N. Rao --- Mike, I have restricted all changes to just the kprobe_lookup_name() macro. It has now been split into different implementations for ABIv1 and ABIv2, hopefully addressing the concerns you ra

[PATCHv2 0/8] Fix perf probe issues on powerpc

2014-12-15 Thread Naveen N. Rao
. - Naveen Naveen N. Rao (8): kprobes: Fix kallsyms lookup across powerpc ABIv1 and ABIv2 perf probe: Improve detection of file/function name in the probe pattern perf probe powerpc: Fix symbol fixup issues due to ELF type perf probe powerpc: Handle powerpc dot symbols perf probe

[PATCHv2 2/8] perf probe: Improve detection of file/function name in the probe pattern

2014-12-15 Thread Naveen N. Rao
imeout_interruptible Semantic error :File always requires line number or lazy pattern. Error: Command Parse Error. Fix this by checking the probe pattern in more detail. Signed-off-by: Naveen N. Rao --- tools/perf/util/probe-event.c | 23 --- 1 file changed, 20 insert

[PATCHv2 3/8] perf probe powerpc: Fix symbol fixup issues due to ELF type

2014-12-15 Thread Naveen N. Rao
probe:do_fork -aR sleep 1 # cat /sys/kernel/debug/tracing/kprobe_events p:probe/do_fork _text+635952 # printf "%x" 635952 9b430 # grep do_fork /boot/System.map c00ab430 T .do_fork Fix by checking for ELF type ET_DYN used by ppc64 kernels. Signed-off-by: Naveen N. Rao ---

[PATCHv2 4/8] perf probe powerpc: Handle powerpc dot symbols

2014-12-15 Thread Naveen N. Rao
Fix up various perf aspects related to ppc64's usage of dot functions: - ignore leading '.' when generating event names and when looking for existing events. - use the proper prefix when ignoring SyS symbol lookups. Signed-off-by: Naveen N. Rao --- tools/perf/util/pr

[PATCHv2 5/8] perf probe powerpc: Allow matching against dot symbols

2014-12-15 Thread Naveen N. Rao
_filter() on powerpc to account for dot symbols. Signed-off-by: Naveen N. Rao --- Changes from the previous patchset: Introduced arch helper to override the way probe function filter works. tools/perf/arch/powerpc/Makefile| 1 + tools/perf/arch/powerpc/util

[PATCHv2 6/8] perf tools powerpc: Fix PPC64 ELF ABIv2 symbol decoding

2014-12-15 Thread Naveen N. Rao
PPC64 ELF ABIv2 has a Global Entry Point (GEP) and a Local Entry Point (LEP). For purposes of probing, we need the LEP. Offset to the LEP is encoded in st_other. Signed-off-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- Changes from previous patchset: Simplified logic by adding

[PATCHv2 7/8] perf probe powerpc: Use DWARF info only if necessary

2014-12-15 Thread Naveen N. Rao
s 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 --- Changes from previous patchset: Generalize and introduce helper to prefer symbol table over DWARF. tools/pe

[PATCHv2 8/8] perf probe powerpc: Fixup function entry if using kallsyms lookup

2014-12-15 Thread Naveen N. Rao
On powerpc ABIv2, if no debug-info is found and we use kallsyms, we need to fixup the function entry to point to the local entry point. Use offset of 8 since current toolchains always generate 2 instructions (8 bytes). Signed-off-by: Naveen N. Rao --- Changes: Generalize and introduce helper to

[BACKPORT PATCH 1/5] perf probe ppc: Fix symbol fixup issues due to ELF type

2015-06-23 Thread Naveen N. Rao
probe:do_fork -aR sleep 1 # cat /sys/kernel/debug/tracing/kprobe_events p:probe/do_fork _text+635952 # printf "%x" 635952 9b430 # grep do_fork /boot/System.map c00ab430 T .do_fork Fix by checking for ELF type ET_DYN used by ppc64 kernels. Signed-off-by: Naveen N. Rao Reviewed-

[BACKPORT PATCH 2/5] perf probe ppc64le: Fix ppc64 ABIv2 symbol decoding

2015-06-23 Thread Naveen N. Rao
Dronamraju Cc: Masami Hiramatsu Cc: Michael Ellerman Cc: Sukadev Bhattiprolu Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/ab9cc5e2b9de4cbaaf50f6ef2346a6a81100bad1.1430217967.git.naveen.n@linux.vnet.ibm.com Signed-off-by: Naveen N. Rao Signed-off-by: Arnaldo Carvalho de

[BACKPORT PATCH 3/5] perf probe ppc64le: Prefer symbol table lookup over DWARF

2015-06-23 Thread Naveen N. Rao
s 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 Reviewed-by: Srikar Dronamraju Cc: Ananth N Mavinakayanahalli Cc: Masami Hiramatsu Cc: Michael Ellerman Cc:

[BACKPORT PATCH 4/5] perf probe ppc64le: Fixup function entry if using kallsyms lookup

2015-06-23 Thread Naveen N. Rao
On powerpc ABIv2, if no debug-info is found and we use kallsyms, we need to fixup the function entry to point to the local entry point. Use offset of 8 since current toolchains always generate 2 instructions (8 bytes). Signed-off-by: Naveen N. Rao Reviewed-by: Srikar Dronamraju Cc: Ananth N

Re: [PATCH v2] powerpc/ftrace: add powerpc timebase as a trace clock source

2015-07-30 Thread Naveen N. Rao
On 2015/04/24 02:24PM, Naveen N Rao wrote: > Add a new powerpc-specific trace clock using the timebase register, > similar to x86-tsc. This gives us > - a fast, monotonic, hardware clock source for trace entries, and > - a clock that can be used to correlate events across cpus as we

Re: [RFC PATCH 0/8] Fix perf probe issues on powerpc

2015-01-21 Thread Naveen N. Rao
On 2015/01/21 09:51AM, Arnaldo Carvalho de Melo wrote: > Em Tue, Dec 09, 2014 at 11:03:58PM +0530, Naveen N. Rao escreveu: > > This patchset fixes various issues with perf probe on powerpc > > across ABIv1 and ABIv2: > > - in the presence of DWARF debug-info, > > - i

Re: [PATCHv2 0/8] Fix perf probe issues on powerpc

2015-01-27 Thread Naveen N. Rao
On 2014/12/15 08:20PM, Naveen N Rao wrote: > This patchset fixes various issues with perf probe on powerpc across ABIv1 and > ABIv2: > - in the presence of DWARF debug-info, > - in the absence of DWARF, but with the symbol table, and > - in the absence of debug-info, bu

Re: [PATCHv2 0/8] Fix perf probe issues on powerpc

2015-01-27 Thread Naveen N. Rao
On 2015/01/28 05:14PM, Michael Ellerman wrote: > On Wed, 2015-01-28 at 11:12 +0530, Naveen N. Rao wrote: > > On 2014/12/15 08:20PM, Naveen N Rao wrote: > > > This patchset fixes various issues with perf probe on powerpc across > > > ABIv1 and > > > ABIv2: &g

Re: [PATCH v5 1/9] selftests/powerpc: Test the preservation of FPU and VMX regs across syscall

2016-02-24 Thread Naveen N. Rao
On 2016/02/23 02:38PM, Cyril Bur wrote: > Test that the non volatile floating point and Altivec registers get > correctly preserved across the fork() syscall. > > fork() works nicely for this purpose, the registers should be the same for > both parent and child > > Signed-off-by: Cyril Bur > ---

Re: [PATCH v5 1/9] selftests/powerpc: Test the preservation of FPU and VMX regs across syscall

2016-02-24 Thread Naveen N. Rao
On 2016/02/25 10:44AM, Cyril Bur wrote: > On Wed, 24 Feb 2016 19:57:38 +0530 > "Naveen N. Rao" wrote: > > > On 2016/02/23 02:38PM, Cyril Bur wrote: > > > Test that the non volatile floating point and Altivec registers get > > > correctly preserved a

Re: [PATCH v5 1/9] selftests/powerpc: Test the preservation of FPU and VMX regs across syscall

2016-02-28 Thread Naveen N. Rao
On 2016/02/26 09:18AM, Cyril Bur wrote: > On Thu, 25 Feb 2016 11:52:05 +0530 > "Naveen N. Rao" wrote: > > > On 2016/02/25 10:44AM, Cyril Bur wrote: > > > On Wed, 24 Feb 2016 19:57:38 +0530 > > > "Naveen N. Rao" wrote: > > > &g

Re: [PATCH] Remove kretprobe_trampoline_holder.

2016-03-30 Thread Naveen N. Rao
On 2016/03/29 08:35PM, Thiago Jung Bauermann wrote: > Am Dienstag, 29 März 2016, 14:31:34 schrieb Michael Ellerman: > > On Mon, 2016-03-28 at 17:06 -0300, Thiago Jung Bauermann wrote: > > > With this patch, all vmlinux symbols match /proc/kallsyms and the > > > testcase passes. > > > > Have you te

Re: [PATCH] Remove kretprobe_trampoline_holder.

2016-03-30 Thread Naveen N. Rao
On 2016/03/30 01:34PM, Naveen N Rao wrote: > On 2016/03/29 08:35PM, Thiago Jung Bauermann wrote: > > Am Dienstag, 29 März 2016, 14:31:34 schrieb Michael Ellerman: > > > On Mon, 2016-03-28 at 17:06 -0300, Thiago Jung Bauermann wrote: > > So at first glance, it looks like

[RFC PATCH 1/2] tools/perf: Change how ppc64le symbols are fixed up

2016-03-30 Thread Naveen N. Rao
tself in a different manner. Cc: Thiago Jung Bauermann Cc: Ananth N Mavinakayanahalli Cc: Arnaldo Carvalho de Melo Cc: Masami Hiramatsu Reported-by: Michael Ellerman Signed-off-by: Naveen N. Rao --- tools/perf/arch/powerpc/util/sym-handling.c | 12 +--- tools/perf/util/pro

[RFC PATCH 2/2] tools/perf: Change how probe offsets are handled

2016-03-30 Thread Naveen N. Rao
Signed-off-by: Naveen N. Rao --- tools/perf/arch/powerpc/util/sym-handling.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powerpc/util/sym-handling.c index 3e98a61..36f6eb0 100644 --- a

Re: [PATCH] Remove kretprobe_trampoline_holder.

2016-03-31 Thread Naveen N. Rao
e_trampoline. But, since this is a trampoline, I think that is good. So, for this patch: Reviewed-by: Naveen N. Rao - Naveen ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [RFC PATCH 2/2] tools/perf: Change how probe offsets are handled

2016-03-31 Thread Naveen N. Rao
On 2016/03/30 10:13PM, Naveen N Rao wrote: > While trying to address the kallsyms perf test failure on ppc64le, > Ananth noticed that we were not necessarily probing at the expected > address when an offset to the function was specified. > > So far, we used to treat probe point o

[PATCH 2/4] samples/bpf: Use llc in PATH, rather than a hardcoded value

2016-03-31 Thread Naveen N. Rao
While at it, fix some typos in the comment. Cc: Alexei Starovoitov Cc: David S. Miller Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Signed-off-by: Naveen N. Rao --- samples/bpf/Makefile | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/samples/bpf

[PATCH 3/4] samples/bpf: Simplify building BPF samples

2016-03-31 Thread Naveen N. Rao
BPF=y make Cc: Alexei Starovoitov Cc: David S. Miller Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Signed-off-by: Naveen N. Rao --- samples/Makefile | 2 +- samples/bpf/Makefile | 39 --- 2 files changed, 21 insertions(+), 20 deletions(-) diff

[PATCH 4/4] samples/bpf: Enable powerpc support

2016-03-31 Thread Naveen N. Rao
t not s390. Cc: Alexei Starovoitov Cc: David S. Miller Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Signed-off-by: Naveen N. Rao --- samples/bpf/bpf_helpers.h | 26 ++ samples/bpf/spintest_kern.c | 2 +- samples/bpf/tracex2_kern.c | 4 ++-- sample

[PATCH 1/4] samples/bpf: Fix build breakage with map_perf_test_user.c

2016-03-31 Thread Naveen N. Rao
: Alexei Starovoitov Cc: David S. Miller Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Signed-off-by: Naveen N. Rao --- samples/bpf/map_perf_test_user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/bpf/map_perf_test_user.c b/samples/bpf/map_perf_test_user.c index 95af56e.

Re: [PATCH 1/4] samples/bpf: Fix build breakage with map_perf_test_user.c

2016-03-31 Thread Naveen N. Rao
On 2016/03/31 10:43AM, Alexei Starovoitov wrote: > On 3/31/16 4:25 AM, Naveen N. Rao wrote: > >Building BPF samples is failing with the below error: > > > >samples/bpf/map_perf_test_user.c: In function ‘main’: > >samples/bpf/map_perf_test_user.c:134:9: error: variable

Re: [PATCH 3/4] samples/bpf: Simplify building BPF samples

2016-03-31 Thread Naveen N. Rao
On 2016/03/31 10:49AM, Alexei Starovoitov wrote: > On 3/31/16 4:25 AM, Naveen N. Rao wrote: > >Make BPF samples build depend on CONFIG_SAMPLE_BPF. We still don't add a > >Kconfig option since that will add a dependency on llvm for allyesconfig > >builds which may not be d

[RFC PATCH 0/6] eBPF JIT for PPC64

2016-04-01 Thread Naveen N. Rao
- Naveen Naveen N. Rao (6): ppc: bpf/jit: Fix/enhance 32-bit Load Immediate implementation ppc: bpf/jit: Optimize 64-bit Immediate loads ppc: bpf/jit: Introduce rotate immediate instructions ppc: bpf/jit: A few cleanups ppc: bpf/jit: Isolate classic BPF JIT specifics into a separate he

[RFC PATCH 1/6] ppc: bpf/jit: Fix/enhance 32-bit Load Immediate implementation

2016-04-01 Thread Naveen N. Rao
we now only need a single LI. The new implementation now generates the same or less number of instructions. Cc: Matt Evans Cc: Michael Ellerman Cc: Paul Mackerras Cc: Alexei Starovoitov Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/p

[RFC PATCH 2/6] ppc: bpf/jit: Optimize 64-bit Immediate loads

2016-04-01 Thread Naveen N. Rao
: Alexei Starovoitov Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit.h | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/net/bpf_jit.h b/arch/powerpc/net/bpf_jit.h ind

[RFC PATCH 3/6] ppc: bpf/jit: Introduce rotate immediate instructions

2016-04-01 Thread Naveen N. Rao
c: Michael Ellerman Cc: Paul Mackerras Cc: Alexei Starovoitov Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/ppc-opcode.h | 2 ++ arch/powerpc/net/bpf_jit.h| 20 +++- 2 files changed, 13 insert

[RFC PATCH 4/6] ppc: bpf/jit: A few cleanups

2016-04-01 Thread Naveen N. Rao
-alignment, per the ISA. Change the macros to use IMM_L(). 4. A few white-space cleanups to satisfy checkpatch.pl. Cc: Matt Evans Cc: Michael Ellerman Cc: Paul Mackerras Cc: Alexei Starovoitov Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- ar

[RFC PATCH 5/6] ppc: bpf/jit: Isolate classic BPF JIT specifics into a separate header

2016-04-01 Thread Naveen N. Rao
ayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/net/bpf_jit.h | 122 +- arch/powerpc/net/bpf_jit32.h| 140 arch/powerpc/net/bpf_jit_asm.S | 2 +- arch/powerpc/net/bpf_jit_comp.c | 2 +- 4 files changed, 145

[RFC PATCH 6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF

2016-04-01 Thread Naveen N. Rao
. Cc: Matt Evans Cc: Michael Ellerman Cc: Paul Mackerras Cc: Alexei Starovoitov Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/ppc-opcode.h | 19 +- arch/powerpc/net/Makefile | 4 + arch/powerpc/net/bpf_j

Re: [RFC PATCH 0/6] eBPF JIT for PPC64

2016-04-01 Thread Naveen N. Rao
On 2016/04/01 03:28PM, Naveen N Rao wrote: > Implement extended BPF JIT for ppc64. We retain the classic BPF JIT for > ppc32 and move ppc64 BE/LE to use the new JIT. Classic BPF filters will > be converted to extended BPF (see convert_filter()) and JIT'ed with the > new compiler.

Re: [PATCH 2/4] samples/bpf: Use llc in PATH, rather than a hardcoded value

2016-04-01 Thread Naveen N. Rao
On 2016/03/31 08:19PM, Daniel Borkmann wrote: > On 03/31/2016 07:46 PM, Alexei Starovoitov wrote: > >On 3/31/16 4:25 AM, Naveen N. Rao wrote: > >> clang $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(EXTRA_CFLAGS) \ > >> -D__KERNEL__ -D__ASM_SYSREG_H -Wno-unu

Re: [PATCH 4/4] samples/bpf: Enable powerpc support

2016-04-01 Thread Naveen N. Rao
On 2016/03/31 10:52AM, Alexei Starovoitov wrote: > On 3/31/16 4:25 AM, Naveen N. Rao wrote: > ... > >+ > >+#ifdef __powerpc__ > >+#define BPF_KPROBE_READ_RET_IP(ip, ctx) { (ip) = (ctx)->link; } > >+#define BPF_KRETPROBE_READ_RET_IP(ip, ctx) BPF_KPRO

[PATCHv2 net 1/3] samples/bpf: Fix build breakage with map_perf_test_user.c

2016-04-04 Thread Naveen N. Rao
: Alexei Starovoitov Cc: Daniel Borkmann Cc: David S. Miller Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Acked-by: Alexei Starovoitov Signed-off-by: Naveen N. Rao --- v2: no changes samples/bpf/map_perf_test_user.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sam

[PATCHv2 net 2/3] samples/bpf: Use llc in PATH, rather than a hardcoded value

2016-04-04 Thread Naveen N. Rao
While at it, remove the generation of .s files and fix some typos in the related comment. Cc: Alexei Starovoitov Cc: David S. Miller Cc: Daniel Borkmann Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Signed-off-by: Naveen N. Rao --- v2: removed generation of .s files samples/bpf

[PATCHv2 net 3/3] samples/bpf: Enable powerpc support

2016-04-04 Thread Naveen N. Rao
vid S. Miller Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Signed-off-by: Naveen N. Rao --- v2: updated macros using ({ }) gcc extension as per Alexei samples/bpf/bpf_helpers.h | 26 ++ samples/bpf/spintest_kern.c | 2 +- samples/bpf/tracex2_kern.c

Re: [RFC PATCH 6/6] ppc: ebpf/jit: Implement JIT compiler for extended BPF

2016-04-04 Thread Naveen N. Rao
On 2016/04/01 08:34PM, Daniel Borkmann wrote: > On 04/01/2016 08:10 PM, Alexei Starovoitov wrote: > >On 4/1/16 2:58 AM, Naveen N. Rao wrote: > >>PPC64 eBPF JIT compiler. Works for both ABIv1 and ABIv2. > >> > >>Enable with: > >>echo 1 > /proc/sys/n

[PATCH net 1/4] lib/test_bpf: Fix JMP_JSET tests

2016-04-05 Thread Naveen N. Rao
JMP_JSET tests incorrectly used BPF_JNE. Fix the same. Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Paul Mackerras Signed-off-by: Naveen N. Rao --- lib/test_bpf.c | 8 1 file changed, 4 insert

[PATCH net 3/4] lib/test_bpf: Add test to check for result of 32-bit add that overflows

2016-04-05 Thread Naveen N. Rao
BPF_ALU32 and BPF_ALU64 tests for adding two 32-bit values that results in 32-bit overflow. Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Paul Mackerras Signed-off-by: Naveen N. Rao --- lib/test_

[PATCH net 2/4] lib/test_bpf: Add tests for unsigned BPF_JGT

2016-04-05 Thread Naveen N. Rao
Unsigned Jump-if-Greater-Than. Cc: Alexei Starovoitov Cc: Daniel Borkmann Cc: "David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Paul Mackerras Signed-off-by: Naveen N. Rao --- lib/test_bpf.c | 29 + 1 file changed, 29 insertion

[PATCH net 4/4] lib/test_bpf: Add additional BPF_ADD tests

2016-04-05 Thread Naveen N. Rao
: "David S. Miller" Cc: Ananth N Mavinakayanahalli Cc: Michael Ellerman Cc: Paul Mackerras Signed-off-by: Naveen N. Rao --- lib/test_bpf.c | 128 + 1 file changed, 128 insertions(+) diff --git a/lib/test_bpf.c b/lib/test_bpf.c ind

Re: [PATCH net 2/4] lib/test_bpf: Add tests for unsigned BPF_JGT

2016-04-05 Thread Naveen N. Rao
On 2016/04/05 09:20AM, Alexei Starovoitov wrote: > On 4/5/16 3:02 AM, Naveen N. Rao wrote: > >Unsigned Jump-if-Greater-Than. > > > >Cc: Alexei Starovoitov > >Cc: Daniel Borkmann > >Cc: "David S. Miller" > >Cc: Ananth N Mavinakayanahalli > >

Re: [PATCH net 4/4] lib/test_bpf: Add additional BPF_ADD tests

2016-04-05 Thread Naveen N. Rao
On 2016/04/05 09:28AM, Alexei Starovoitov wrote: > On 4/5/16 3:02 AM, Naveen N. Rao wrote: > >Some of these tests proved useful with the powerpc eBPF JIT port due to > >sign-extended 16-bit immediate loads. Though some of these aspects get > >covered in other tests, it is be

[PATCH 0/2] perf probe fixes for ppc64le

2016-04-06 Thread Naveen N. Rao
c: Masami Hiramatsu Cc: Michael Ellerman Cc: Ananth N Mavinakayanahalli Naveen N. Rao (2): perf/powerpc: Fix kprobe and kretprobe handling with kallsyms tools/perf: Fix kallsyms perf test on ppc64le tools/perf/arch/powerpc/util/sym-handling.c | 41

[PATCH 1/2] perf/powerpc: Fix kprobe and kretprobe handling with kallsyms

2016-04-06 Thread Naveen N. Rao
: Michael Ellerman Reported-by: Ananth N Mavinakayanahalli Signed-off-by: Naveen N. Rao --- tools/perf/arch/powerpc/util/sym-handling.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/tools/perf/arch/powerpc/util/sym-handling.c b/tools/perf/arch/powerpc/util

[PATCH 2/2] tools/perf: Fix kallsyms perf test on ppc64le

2016-04-06 Thread Naveen N. Rao
Cc: Thiago Jung Bauermann Cc: Ananth N Mavinakayanahalli Cc: Arnaldo Carvalho de Melo Cc: Masami Hiramatsu Reported-by: Michael Ellerman Signed-off-by: Naveen N. Rao --- tools/perf/arch/powerpc/util/sym-handling.c | 24 tools/perf/util/probe-event.c

  1   2   3   4   5   6   7   8   9   10   >