[PATCH] PPC Hardware Breakpoints: Fix incorrect pointer access

2012-07-06 Thread Naveen N. Rao
If arch_validate_hwbkpt_settings() fails, bp-ctx won't be valid and the kernel panics. Add a check to fix this. Reported-by: Edjunior Barbosa Machado emach...@linux.vnet.ibm.com Signed-off-by: Naveen N. Rao naveen.n@linux.vnet.ibm.com --- arch/powerpc/kernel/hw_breakpoint.c |2 +- 1 file

[PATCH RESEND] PPC Hardware Breakpoints: Fix incorrect pointer access

2012-07-18 Thread Naveen N. Rao
If arch_validate_hwbkpt_settings() fails, bp-ctx won't be valid and the kernel panics. Add a check to fix this. Reported-by: Edjunior Barbosa Machado emach...@linux.vnet.ibm.com Signed-off-by: Naveen N. Rao naveen.n@linux.vnet.ibm.com --- arch/powerpc/kernel/hw_breakpoint.c |2 +- 1 file

[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 naveen.n@linux.vnet.ibm.com --- arch/powerpc/include/asm/code-patching.h | 26 +- arch/powerpc/include/asm/kprobes.h | 58 ++-- 2 files changed, 58 insertions(+), 26

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

2014-12-09 Thread Naveen N. Rao
to 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 naveen.n

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

2014-12-09 Thread Naveen N. Rao
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 naveen.n@linux.vnet.ibm.com --- tools/perf/util/probe-event.c | 23 --- 1 file changed, 20

[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 naveen.n@linux.vnet.ibm.com --- tools/perf

[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 naveen.n@linux.vnet.ibm.com --- tools/perf/util/probe-event.c | 9 + 1 file changed, 9 insertions(+) diff

[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 ana...@in.ibm.com Signed-off-by: Naveen N. Rao naveen.n@linux.vnet.ibm.com --- tools

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

2014-12-09 Thread Naveen N. Rao
-by: Naveen N. Rao naveen.n@linux.vnet.ibm.com --- 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

[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 naveen.n@linux.vnet.ibm.com --- tools/perf

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: # perf probe do_fork Added new

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't understand that first sentence

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_fork Added new event

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 leading '.': $ perf probe -F | grep

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. diff --git a/tools

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 address in DWARF may

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

2014-12-15 Thread Naveen N. Rao
dot symbols, but need to use the local entry point. Signed-off-by: Naveen N. Rao naveen.n@linux.vnet.ibm.com --- 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

[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
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 naveen.n@linux.vnet.ibm.com --- tools/perf/util/probe-event.c | 23 --- 1 file changed, 20

[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 naveen.n

[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 naveen.n@linux.vnet.ibm.com --- tools/perf

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

2014-12-15 Thread Naveen N. Rao
to account for dot symbols. Signed-off-by: Naveen N. Rao naveen.n@linux.vnet.ibm.com --- 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/sym-handling.c

[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 ana...@in.ibm.com Signed-off-by: Naveen N. Rao naveen.n@linux.vnet.ibm.com --- Changes

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

2014-12-15 Thread Naveen N. Rao
, 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@linux.vnet.ibm.com --- Changes from previous patchset: Generalize and introduce helper to prefer symbol table over DWARF

[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 naveen.n@linux.vnet.ibm.com --- Changes

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, - in the absence of DWARF

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: - in the presence of DWARF debug-info

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, but with kallsyms. Applies

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 naveen.n@linux.vnet.ibm.com wrote: diff --git a/arch/powerpc/include/asm/trace_clock.h b/arch/powerpc/include/asm/trace_clock.h new file mode 100644 index 000..0b0d094 --- /dev/null

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

2015-04-24 Thread Naveen N. Rao
Foundation. + * + * Copyright (C) 2015 Naveen N. Rao, IBM Corporation + */ + +#ifndef _ASM_PPC_TRACE_CLOCK_H +#define _ASM_PPC_TRACE_CLOCK_H + +#include linux/compiler.h +#include linux/types.h + +extern u64 notrace trace_clock_ppc_tb(void); + +#define ARCH_TRACE_CLOCKS { trace_clock_ppc_tb, ppc-tb

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 naveen.n@linux.vnet.ibm.com 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 for trace entries

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 naveen.n@linux.vnet.ibm.com wrote: Add a new powerpc-specific trace clock using

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

2015-04-23 Thread Naveen N. Rao
License, version 2, 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 linux/compiler.h +#include linux/types.h + +#ifdef CONFIG_TRACE_CLOCK + +extern u64 notrace

[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 naveen.n@linux.vnet.ibm.com --- 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

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

2015-04-28 Thread Naveen N. Rao
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 naveen.n@linux.vnet.ibm.com Reviewed

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

2015-04-28 Thread Naveen N. Rao
comparison. Signed-off-by: Naveen N. Rao naveen.n@linux.vnet.ibm.com Reviewed-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- 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

[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 naveen.n@linux.vnet.ibm.com Reviewed-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- Changes: - Move logic

[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 6/7] perf probe/ppc64le: Prefer symbol table lookup over DWARF

2015-04-28 Thread Naveen N. Rao
, 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@linux.vnet.ibm.com Reviewed-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- Changes: - No changes other than move to use

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

2015-04-28 Thread Naveen N. Rao
-by: Naveen N. Rao naveen.n@linux.vnet.ibm.com Reviewed-by: Srikar Dronamraju sri...@linux.vnet.ibm.com --- Changes: - No changes other than move to use __weak functions tools/perf/arch/powerpc/util/sym-handling.c | 7 +++ tools/perf/util/symbol-elf.c| 4 tools/perf/util

[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 naveen.n

[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 naveen.n@linux.vnet.ibm.com Reviewed

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 ABIv2: - in the presence of DWARF debug

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, - in the absence of DWARF

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, this causes problems on powerpc ABIv1 where all

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_fork' works with this patch. Introduce

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: # perf probe do_fork Added new

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, this causes problems on powerpc ABIv1 where all

[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 naveen.n@linux.vnet.ibm.com --- 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

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

2015-05-06 Thread Naveen N. Rao
Introduce a field in /proc/pid/stat to expose guest steal time. Signed-off-by: Naveen N. Rao naveen.n@linux.vnet.ibm.com --- 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

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

2015-05-06 Thread Naveen N. Rao
Average: 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/pid/stat

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

2015-05-06 Thread Naveen N. Rao
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 naveen.n

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

2015-05-06 Thread Naveen N. Rao
Average: 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/pid

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

2015-05-06 Thread Naveen N. Rao
Introduce a field in /proc/pid/stat to expose guest steal time. Signed-off-by: Naveen N. Rao naveen.n@linux.vnet.ibm.com --- 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

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

2015-05-06 Thread Naveen N. Rao
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 naveen.n

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

[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 naveen.n@linux.vnet.ibm.com --- 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

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 entries as either steal time

[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 naveen.n

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

2015-06-23 Thread Naveen N. Rao
/ab9cc5e2b9de4cbaaf50f6ef2346a6a81100bad1.1430217967.git.naveen.n@linux.vnet.ibm.com Signed-off-by: Naveen N. Rao naveen.n@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo a...@redhat.com --- tools/perf/arch/powerpc/util/sym-handling.c | 7 +++ tools/perf/util/symbol-elf.c

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

2015-06-23 Thread Naveen N. Rao
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@linux.vnet.ibm.com Reviewed-by: Srikar Dronamraju sri...@linux.vnet.ibm.com Cc: Ananth N Mavinakayanahalli ana...@in.ibm.com

[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 naveen.n@linux.vnet.ibm.com Reviewed

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 well as across

Re: [PATCH] perf record: Limit --intr-regs to platforms supporting PERF_REGS

2015-09-28 Thread Naveen N. Rao
On 2015/09/24 10:15PM, Naveen N Rao wrote: > On 2015/09/24 08:32AM, Stephane Eranian wrote: > > On Thu, Sep 24, 2015 at 5:57 AM, Jiri Olsa <jo...@redhat.com> wrote: > > > > > > On Thu, Sep 24, 2015 at 05:41:58PM +0530, Naveen N. Rao wrote: > > &g

Re: [PATCH] perf record: Limit --intr-regs to platforms supporting PERF_REGS

2015-09-29 Thread Naveen N. Rao
On 2015/09/29 08:53AM, Jiri Olsa wrote: > On Tue, Sep 29, 2015 at 11:06:17AM +0530, Naveen N. Rao wrote: > > On 2015/09/24 10:15PM, Naveen N Rao wrote: > > > On 2015/09/24 08:32AM, Stephane Eranian wrote: > > > > On Thu, Sep 24, 2015 at 5:57 AM, Jiri

Re: [PATCH] perf record: Limit --intr-regs to platforms supporting PERF_REGS

2015-09-29 Thread Naveen N. Rao
On 2015/09/29 12:47PM, Jiri Olsa wrote: > On Tue, Sep 29, 2015 at 01:30:10PM +0530, Naveen N. Rao wrote: > > SNIP > > > > > Suka has also posted a fix for this with a different approach [1]. Can > > > > you please ack/pull one of these versions? Building pe

Re: [RESEND PATCH v4 2/3] tools: Move Makefile.arch from perf/config to tools/scripts

2015-12-16 Thread Naveen N. Rao
d-off-by: Wang Nan <wangn...@huawei.com> > Acked-by: Jiri Olsa <jo...@kernel.org> > Tested-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> > Cc: Arnaldo Carvalho de Melo <a...@kernel.org> > Cc: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> > Cc: Sukad

Re: [PATCH v4] perf: bpf: Fix build breakage due to libbpf

2015-12-16 Thread Naveen N. Rao
On 2015/12/17 09:29AM, Wang Nan wrote: > > > On 2015/12/17 3:42, Arnaldo Carvalho de Melo wrote: > >Em Tue, Dec 15, 2015 at 05:10:46PM +0530, Naveen N. Rao escreveu: > >>On 2015/12/15 08:51AM, Wang Nan wrote: > >>>From: "Naveen N. Rao" <navee

[PATCH] perf: bpf: Fix build breakage due to libbpf

2015-12-14 Thread Naveen N. Rao
. While at it, remove redundant LP64 macro definition. Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- tools/lib/bpf/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index 636e3dd..050e0e8 100644 --- a

Re: [PATCH] perf: bpf: Fix build breakage due to libbpf

2015-12-14 Thread Naveen N. Rao
On 2015/12/14 07:53PM, Wang Nan wrote: > Hi Naveen, > > On 2015/12/14 18:50, Naveen N. Rao wrote: > >perf build is currently (v4.4-rc5) broken on powerpc: > > > >bpf.c:28:4: error: #error __NR_bpf not defined. libbpf does not support > >your arch. > > #

Re: [PATCH v2] tools lib bpf: Support libbpf on PowerPC

2015-12-14 Thread Naveen N. Rao
On 2015/12/14 11:57AM, Wang Nan wrote: > Support basic PowerPC compiling. > > Checks BPF syscall number, turn off libbpf building on platform doesn't > support sys_bpf instead of blocking compiling. > > Reported-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> > Sig

Re: [PATCH v4] perf: bpf: Fix build breakage due to libbpf

2015-12-15 Thread Naveen N. Rao
On 2015/12/15 08:51AM, Wang Nan wrote: > From: "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> > > perf build is currently (v4.4-rc5) broken on powerpc: > > bpf.c:28:4: error: #error __NR_bpf not defined. libbpf does not support > your arch. > # er

Re: [PATCH v3 0/3] perf build: PowerPC: Fix build breakage due to libbpf

2015-12-15 Thread Naveen N. Rao
3 patches. Please help me test it on PowerPC. Hi Wang, Thanks for putting this together. Entire series: Tested-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> > > Cc: Arnaldo Carvalho de Melo <a...@kernel.org> > Cc: Jiri Olsa <jo...@redhat.com> > Cc: N

Re: [PATCH v4] perf: bpf: Fix build breakage due to libbpf

2016-01-06 Thread Naveen N. Rao
On 2015/12/17 09:19AM, Arnaldo Carvalho de Melo wrote: > Em Thu, Dec 17, 2015 at 10:37:14AM +0530, Naveen N. Rao escreveu: > > On 2015/12/17 09:29AM, Wang Nan wrote: > > > The whole thread is: > > > > > > [PATCH v3 0/3] perf build: PowerPC: Fix buil

Re: [PATCH v4] perf: bpf: Fix build breakage due to libbpf

2016-01-07 Thread Naveen N. Rao
On 2016/01/07 05:39PM, Arnaldo Carvalho de Melo wrote: > Em Thu, Jan 07, 2016 at 12:28:15PM +0530, Naveen N. Rao escreveu: > > On 2015/12/17 09:19AM, Arnaldo Carvalho de Melo wrote: > > > Em Thu, Dec 17, 2015 at 10:37:14AM +0530, Naveen N. Rao escreveu: > > > > O

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

2016-06-08 Thread Naveen N. Rao
On 2016/06/07 03:56PM, Alexei Starovoitov wrote: > On Tue, Jun 07, 2016 at 07:02:23PM +0530, Naveen N. Rao wrote: > > PPC64 eBPF JIT compiler. > > > > Enable with: > > echo 1 > /proc/sys/net/core/bpf_jit_enable > > or > > echo 2 > /proc/sy

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

2016-06-07 Thread Naveen N. Rao
; Cc: Alexei Starovoitov <a...@fb.com> Cc: Daniel Borkmann <dan...@iogearbox.net> Cc: "David S. Miller" <da...@davemloft.net> Cc: Ananth N Mavinakayanahalli <ana...@in.ibm.com> Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/net/bp

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

2016-06-07 Thread Naveen N. Rao
Cc: Paul Mackerras <pau...@samba.org> Cc: Alexei Starovoitov <a...@fb.com> Cc: Daniel Borkmann <dan...@iogearbox.net> Cc: "David S. Miller" <da...@davemloft.net> Cc: Ananth N Mavinakayanahalli <ana...@in.ibm.com> Signed-off-by: Naveen N. Rao <naveen.n@l

[PATCH 0/6] eBPF JIT for PPC64

2016-06-07 Thread Naveen N. Rao
for BPF constant blinding Please note that patch [2] is a pre-requisite for this patchset, and is not yet upstream. - Naveen [1] http://thread.gmane.org/gmane.linux.kernel/2188694 [2] http://thread.gmane.org/gmane.linux.ports.ppc.embedded/96514 Naveen N. Rao (6): ppc: bpf/jit: Fix/enhance 32-bit

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

2016-06-07 Thread Naveen N. Rao
erman.id.au> Cc: Paul Mackerras <pau...@samba.org> Cc: Alexei Starovoitov <a...@fb.com> Cc: Daniel Borkmann <dan...@iogearbox.net> Cc: "David S. Miller" <da...@davemloft.net> Cc: Ananth N Mavinakayanahalli <ana...@in.ibm.com> Signed-off-by: Naveen N. R

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

2016-06-07 Thread Naveen N. Rao
Cc: Paul Mackerras <pau...@samba.org> Cc: Alexei Starovoitov <a...@fb.com> Cc: Daniel Borkmann <dan...@iogearbox.net> Cc: "David S. Miller" <da...@davemloft.net> Cc: Ananth N Mavinakayanahalli <ana...@in.ibm.com> Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet

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

2016-06-07 Thread Naveen N. Rao
; Cc: Alexei Starovoitov <a...@fb.com> Cc: Daniel Borkmann <dan...@iogearbox.net> Cc: "David S. Miller" <da...@davemloft.net> Cc: Ananth N Mavinakayanahalli <ana...@in.ibm.com> Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/net/b

[PATCH v4] powerpc: Define and use PPC64_ELF_ABI_v2/v1

2016-06-06 Thread Naveen N. Rao
define PPC64_ELF_ABI_v2 when ELF ABI v2 is detected. We also have a few places where what we're really trying to check is that we are using the 64-bit v1 ABI, ie. function descriptors. So also add a #define for that, which simplifies several checks. Signed-off-by: Naveen N. Rao <naveen.n@linux.vne

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

2016-06-07 Thread Naveen N. Rao
t; Cc: Ananth N Mavinakayanahalli <ana...@in.ibm.com> Signed-off-by: Naveen N. Rao <naveen.n@linux.vnet.ibm.com> --- arch/powerpc/include/asm/ppc-opcode.h | 2 ++ arch/powerpc/net/bpf_jit.h| 20 +++- 2 files changed, 13 insertions(+), 9 deletions(-) di

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

2016-06-12 Thread Naveen N. Rao
On 2016/06/10 10:47PM, David Miller wrote: > From: "Naveen N. Rao" <naveen.n@linux.vnet.ibm.com> > Date: Tue, 7 Jun 2016 19:02:17 +0530 > > > Please note that patch [2] is a pre-requisite for this patchset, and is > > not yet upstream. &

[PATCH 1/2] perf annotate: generalize handling of ret instructions

2016-06-10 Thread Naveen N. Rao
Introduce helper to detect ret instructions and use the same in the tui. Cc: Arnaldo Carvalho de Melo <a...@kernel.org> Cc: Anton Blanchard <an...@ozlabs.org> Cc: Michael Ellerman <m...@ellerman.id.au> Cc: Ananth N Mavinakayanahalli <ana...@in.ibm.com> Signed-off-by:

Re: [PATCH 2/2] perf annotate: add powerpc support

2016-06-10 Thread Naveen N. Rao
On 2016/06/10 08:08PM, Naveen N. Rao wrote: > On 2016/06/10 10:36AM, Arnaldo Carvalho de Melo wrote: > > Em Fri, Jun 10, 2016 at 06:32:51PM +0530, Naveen N. Rao escreveu: > > > Convert ins__find() to a __weak function for generic functionality, > > > while adding a p

Re: [PATCH] powerpc: Define and use PPC_ELF_ABI_v2

2016-06-04 Thread Naveen N. Rao
On 2016/04/28 07:38PM, Michael Ellerman wrote: > We're approaching 20 locations where we need to check for ELF ABI v2. > That's fine, except the logic is a bit awkward, because we have to check > that _CALL_ELF is defined and then what its value is. > > So check it once in asm/types.h and define

Re: [PATCH 2/2] perf annotate: add powerpc support

2016-06-10 Thread Naveen N. Rao
On 2016/06/10 10:36AM, Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 10, 2016 at 06:32:51PM +0530, Naveen N. Rao escreveu: > > Convert ins__find() to a __weak function for generic functionality, > > while adding a powerpc-specific variant. We look at the function name > > fo

[PATCH 2/2] perf annotate: add powerpc support

2016-06-10 Thread Naveen N. Rao
: Arnaldo Carvalho de Melo <a...@kernel.org> Cc: Anton Blanchard <an...@ozlabs.org> Cc: Michael Ellerman <m...@ellerman.id.au> Cc: Ananth N Mavinakayanahalli <ana...@in.ibm.com> Reported-by: Anton Blanchard <an...@ozlabs.org> Signed-off-by: Naveen N. Rao <naveen.n..

Re: [PATCH 1/2] perf annotate: generalize handling of ret instructions

2016-06-10 Thread Naveen N. Rao
On 2016/06/10 10:30AM, Arnaldo Carvalho de Melo wrote: > Em Fri, Jun 10, 2016 at 06:32:50PM +0530, Naveen N. Rao escreveu: > > Introduce helper to detect ret instructions and use the same in the tui. Hi Arnaldo, Thanks for the review. > > Humm, I think this is simpler and equiv

[PATCHv2] powerpc: Define and use PPC64_ELF_ABI_v2

2016-06-04 Thread Naveen N. Rao
define PPC64_ELF_ABI_v2 when ELF ABI v2 is detected. We don't add explicit includes of asm/types.h because it's included basically everywhere via compiler.h. Signed-off-by: Michael Ellerman <m...@ellerman.id.au> [changed name to PPC64_ELF_ABI_v2, added check for __powerpc64__, fixes] Signed-off-by: N

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

2016-06-09 Thread Naveen N. Rao
On 2016/06/08 10:19PM, Nilay Vaish wrote: > Naveen, can you point out where in the patch you update the variable: > idx, a member of codegen_contex structure? Somehow I am unable to > figure it out. I can only see that we set it to 0 in the > bpf_int_jit_compile function. Since all your test

Re: [RFC PATCH v2 1/3] arch/powerpc : Add detour buffer support for optprobes

2016-05-30 Thread Naveen N. Rao
On 2016/05/24 03:45PM, Madhavan Srinivasan wrote: > > > On Thursday 19 May 2016 08:40 PM, Anju T wrote: > > Detour buffer contains instructions to create an in memory pt_regs. > > After the execution of prehandler a call is made for instruction emulation. > > The NIP is decided after the probed

Re: [PATCH] ppc: Fix BPF JIT for ABIv2

2016-06-22 Thread Naveen N. Rao
On 2016/06/22 12:42PM, Naveen N Rao wrote: > On 2016/06/21 11:47AM, Thadeu Lima de Souza Cascardo wrote: > > On Tue, Jun 21, 2016 at 09:15:48PM +1000, Michael Ellerman wrote: > > > On Tue, 2016-06-21 at 14:28 +0530, Naveen N. Rao wrote: > > > > On 2016/06/20 03:56PM,

Re: [PATCH] ppc: Fix BPF JIT for ABIv2

2016-06-21 Thread Naveen N. Rao
On 2016/06/20 03:56PM, Thadeu Lima de Souza Cascardo wrote: > On Sun, Jun 19, 2016 at 11:19:14PM +0530, Naveen N. Rao wrote: > > On 2016/06/17 10:00AM, Thadeu Lima de Souza Cascardo wrote: > > > > > > Hi, Michael and Naveen. > > > > > > I noticed i

Re: [PATCH] ppc: Fix BPF JIT for ABIv2

2016-06-22 Thread Naveen N. Rao
On 2016/06/21 11:47AM, Thadeu Lima de Souza Cascardo wrote: > On Tue, Jun 21, 2016 at 09:15:48PM +1000, Michael Ellerman wrote: > > On Tue, 2016-06-21 at 14:28 +0530, Naveen N. Rao wrote: > > > On 2016/06/20 03:56PM, Thadeu Lima de Souza Cascardo wrote: > > > > On S

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

2016-06-22 Thread Naveen N. Rao
On 2016/06/21 09:04PM, Michael Ellerman wrote: > On Tue, 2016-06-21 at 12:28 +0530, Naveen N. Rao wrote: > > On 2016/06/21 09:38AM, Michael Ellerman wrote: > > > On Sun, 2016-06-19 at 23:06 +0530, Naveen N. Rao wrote: > > > > > > > > #inc

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

2016-06-22 Thread Naveen N. Rao
On 2016/06/22 08:37PM, Michael Ellerman wrote: > On Tue, 2016-06-07 at 19:02 +0530, Naveen N. Rao wrote: > > > PPC64 eBPF JIT compiler. > > > > Enable with: > > echo 1 > /proc/sys/net/core/bpf_jit_enable > > or > > echo 2 > /proc/sys/net/core/bpf_

  1   2   3   4   5   6   7   8   9   10   >