[PATCH 1/3] perf/powerpc:add ability to sample intr machine state in power

2015-10-19 Thread Anju T
From: Anju The enum definition assigns an 'id' to each register in power. The order of these values in the enum definition are based on the corresponding macros in arch/powerpc/include/uapi/asm/ptrace.h . Signed-off-by: Anju T --- arch/powerpc/include/uapi/asm/perf_r

[RFC][PATCH 2/3] tools/perf:Map the ID values with register names

2015-10-19 Thread Anju T
From: Anju The id values are mapped with the corresponding register names. This names are displayed while using a perf report/perf script command. Signed-off-by: Anju T --- tools/perf/arch/powerpc/include/perf_regs.h | 117 1 file changed, 117 insertions

[RFC][PATCH 3/3]perf/powerpc :add support for sampling intr machine state

2015-10-19 Thread Anju T
kernel uses the "PERF" register ids to find offset of the register in 'struct pt_regs'. CONFIG_HAVE_PERF_REGS will enable sampling of the interrupted machine state. Signed-off-by: Anju T --- arch/powerpc/Kconfig | 1 + arch/powerpc/perf/Makefile| 2 +

[RFC][PATCH 0/3]perf/powerpc:Add ability to sample intr machine state in powerpc

2015-10-19 Thread Anju T
From: Anju T This short patch series add the ability to sample the interrupted machine state for each hardware sample Anju (3): perf/powerpc:add ability to sample intr machine state in power tools/perf:Map the ID values with register names perf/powerpc:add support for sampling intr

[PATCH V2 0/3] perf/powerpc:Add ability to sample intr machine state in powerpc

2015-10-26 Thread Anju T
This short patch series add the ability to sample the interrupted machine state for each hardware sample Anju (3): perf/powerpc:add ability to sample intr machine state in power tools/perf:Map the ID values with register names perf/powerpc:add support for sampling intr machine state arch

[PATCH V2 2/3] tools/perf:Map the ID values with register names

2015-10-26 Thread Anju T
The id values are mapped with the corresponding register names. This names are displayed while using a perf report/perf script command. Signed-off-by: Anju T --- tools/perf/arch/powerpc/include/perf_regs.h | 118 1 file changed, 118 insertions(+) create mode 100644

[PATCH V2 3/3] perf/powerpc :add support for sampling intr machine state

2015-10-26 Thread Anju T
the "PERF" register ids to find offset of the register in 'struct pt_regs'. CONFIG_HAVE_PERF_REGS will enable sampling of the interrupted machine state. Signed-off-by: Anju T --- arch/powerpc/Kconfig | 1 + arch/powerpc/perf/Makefile| 1 + arch/powerpc/p

[PATCH V2 1/3] perf/powerpc:add ability to sample intr machine state in power

2015-10-26 Thread Anju T
The enum definition assigns an 'id' to each register in "struct pt_regs" of arch/powerpc.The order of these values in the enum definition are based on the corresponding macros in arch/powerpc/include/uapi/asm/ptrace.h . Signed-off-by: Anju T --- arch/powerpc/include/uapi/

Re: [RFC PATCH v2 2/3] arch/powerpc : optprobes for powerpc core

2016-05-23 Thread Anju T
Hi, On Friday 20 May 2016 06:07 PM, Masami Hiramatsu wrote: Hi Anju, Please see my comments below, On Thu, 19 May 2016 20:40:39 +0530 Anju T wrote: ppc_get_optinsn_slot() and ppc_free_optinsn_slot() are geared towards the allocation and freeing of memory from the area reserved for detour

[RFC PATCH 0/3] OPTPROBES for powerpc

2016-05-17 Thread Anju T
e only candidates for optimization. Kindly let me know your suggestions and comments. Thanks -Anju Anju T (3): arch/powerpc : Add detour buffer support for optprobes arch/powerpc : optprobes for powerpc core arch/powerpc : Enable optprobes support in powerpc .../features/debug/opt

[RFC PATCH 3/3] arch/powerpc : Enable optprobes support in powerpc

2016-05-17 Thread Anju T
Signed-off-by: Anju T --- Documentation/features/debug/optprobes/arch-support.txt | 2 +- arch/powerpc/Kconfig| 1 + arch/powerpc/kernel/Makefile| 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation

[RFC PATCH 2/3] arch/powerpc : optprobes for powerpc core

2016-05-17 Thread Anju T
Instruction slot for detour buffer is allocated from the reserved area. For the time being 64KB is reserved in memory for this purpose. ppc_get_optinsn_slot() and ppc_free_optinsn_slot() are geared towards the allocation and freeing of memory from this area. Signed-off-by: Anju T --- arch

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

2016-05-17 Thread Anju T
: Anju T --- arch/powerpc/include/asm/kprobes.h | 25 + arch/powerpc/kernel/optprobes_head.S | 104 +++ 2 files changed, 129 insertions(+) create mode 100644 arch/powerpc/kernel/optprobes_head.S diff --git a/arch/powerpc/include/asm/kprobes.h b/arch

Re: [RFC PATCH 2/3] arch/powerpc : optprobes for powerpc core

2016-05-19 Thread Anju T
Hi Masami, Thank you for reviewing the patch. On Wednesday 18 May 2016 08:43 PM, Masami Hiramatsu wrote: On Wed, 18 May 2016 02:09:37 +0530 Anju T wrote: Instruction slot for detour buffer is allocated from the reserved area. For the time being 64KB is reserved in memory for this purpose

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

2016-05-19 Thread Anju T
slot for detour buffer is allocated from the reserved area. For the time being 64KB is reserved in memory for this purpose. Signed-off-by: Anju T --- arch/powerpc/include/asm/kprobes.h | 25 arch/powerpc/kernel/optprobes_head.S | 108 +++ 2 files changed

[RFC PATCH v2 2/3] arch/powerpc : optprobes for powerpc core

2016-05-19 Thread Anju T
ppc_get_optinsn_slot() and ppc_free_optinsn_slot() are geared towards the allocation and freeing of memory from the area reserved for detour buffer. Signed-off-by: Anju T --- arch/powerpc/kernel/optprobes.c | 480 1 file changed, 480 insertions

[RFC PATCH v2 0/3] OPTPROBES for powerpc

2016-05-19 Thread Anju T
ressed. Kindly let me know your suggestions and comments. Thanks -Anju Anju T (3): arch/powerpc : Add detour buffer support for optprobes arch/powerpc : optprobes for powerpc core arch/powerpc : Enable optprobes support in powerpc .../features/debug/optprobes/arch-support.txt

[RFC PATCH v2 3/3] arch/powerpc : Enable optprobes support in powerpc

2016-05-19 Thread Anju T
Signed-off-by: Anju T --- Documentation/features/debug/optprobes/arch-support.txt | 2 +- arch/powerpc/Kconfig| 1 + arch/powerpc/kernel/Makefile| 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation

[PATCH V6 1/4] perf/powerpc: assign an id to each powerpc register

2015-12-13 Thread Anju T
The enum definition assigns an 'id' to each register in "struct pt_regs" of arch/powerpc. The order of these values in the enum definition are based on the corresponding macros in arch/powerpc/include/uapi/asm/ptrace.h. Signed-off-by: Anju T Reviewed-by : Madhavan Srinivasa

[PATCH V6 2/4] perf/powerpc: add support for sampling intr machine state

2015-12-13 Thread Anju T
enables sampling of the interrupted machine state. Signed-off-by: Anju T Reviewed-by : Madhavan Srinivasan --- arch/powerpc/Kconfig | 1 + arch/powerpc/perf/Makefile| 1 + arch/powerpc/perf/perf_regs.c | 85 +++ 3 files changed, 87 insertions

[PATCH V6 3/4] tools/perf: Map the ID values with register names

2015-12-13 Thread Anju T
(/boot/vmlinux) Signed-off-by: Anju T Reviewed-by : Madhavan Srinivasan --- tools/perf/arch/powerpc/include/perf_regs.h | 65 + tools/perf/config/Makefile | 5 +++ 2 files changed, 70 insertions(+) create mode 100644 tools/perf/arch/powerpc/include

[PATCH V6 0/4] perf/powerpc: Add ability to sample intr machine state in powerpc

2015-12-13 Thread Anju T
/perf/arch/powerpc/include/perf_regs.h - PERF_REGS_POWERPC_RESULT is removed. Changes from V1: - Solved the name missmatch issue in the from and signed-off field of the patch series. - Added necessary comments in the 3rd patch ie perf/powerpc ,as suggested by Maddy. Anju T (3): perf/powerpc: a

[PATCH V1 4/4] tool/perf: Add sample_reg_mask to include all perf_regs regs

2015-12-13 Thread Anju T
From: Madhavan Srinivasan Add sample_reg_mask array with pt_regs registers. This is needed for printing supported regs ( -I? option). Signed-off-by: Madhavan Srinivasan --- tools/perf/arch/powerpc/util/Build | 1 + tools/perf/arch/powerpc/util/perf_regs.c | 48 ++

Re: [PATCH V2 0/3] perf/powerpc:Add ability to sample intr machine state in powerpc

2015-10-27 Thread Anju T
Hi Denis, On Monday 26 October 2015 06:47 PM, Denis Kirjanov wrote: On 10/26/15, Anju T wrote: This short patch series add the ability to sample the interrupted machine state for each hardware sample Hi, how can we check your patch series without testing details? I have mentioned about the

Re: [PATCH V10 1/4] perf/powerpc: assign an id to each powerpc register

2016-01-21 Thread Anju T
On Wednesday 20 January 2016 04:08 PM, Michael Ellerman wrote: Hi Anju, On Mon, 2016-01-11 at 15:58 +0530, Anju T wrote: The enum definition assigns an 'id' to each register in "struct pt_regs" of arch/powerpc. The order of these values in the enum definition are based

Re: [PATCH v10 3/4] tools/perf: Map the ID values with register names

2016-01-21 Thread Anju T
Hi mpe, On Wednesday 20 January 2016 04:16 PM, Michael Ellerman wrote: On Mon, 2016-01-11 at 15:58 +0530, Anju T wrote: diff --git a/tools/perf/arch/powerpc/include/perf_regs.h b/tools/perf/arch/powerpc/include/perf_regs.h new file mode 100644 index 000..93080f5 --- /dev/null +++ b/tools

Re: [PATCH V11 0/4]perf/powerpc: Add ability to sample intr machine state in powerpc

2016-04-18 Thread Anju T
On Saturday 20 February 2016 10:32 AM, Anju T wrote: This short patch series adds the ability to sample the interrupted machine state for each hardware sample. To test this patchset, Eg: $ perf record -I? # list supported registers output: available registers: r0 r1 r2 r3 r4 r5 r6 r7 r8

Re: [PATCH V3 0/3] perf/powerpc:Add ability to sample intr machine state in powerpc

2015-11-05 Thread Anju T
Hi Denis, On Wednesday 04 November 2015 02:26 PM, Denis Kirjanov wrote: On 11/3/15, Anju T wrote: This short patch series adds the ability to sample the interrupted machine state for each hardware sample. To test this patchset, Eg: $perf record -I ls // record machine state at interrupt

[PATCH V3 1/3] perf/powerpc:add ability to sample intr machine state in power

2015-11-02 Thread Anju T
The enum definition assigns an 'id' to each register in "struct pt_regs" of arch/powerpc.The order of these values in the enum definition are based on the corresponding macros in arch/powerpc/include/uapi/asm/ptrace.h . Signed-off-by: Anju T --- arch/powerpc/include/uapi/

[PATCH V3 2/3] perf/powerpc :add support for sampling intr machine state

2015-11-02 Thread Anju T
enables sampling of the interrupted machine state. Signed-off-by: Anju T --- arch/powerpc/Kconfig | 1 + arch/powerpc/perf/Makefile| 2 + arch/powerpc/perf/perf_regs.c | 92 +++ 3 files changed, 95 insertions(+) create mode 100644 arch/powerpc

[PATCH V3 0/3] perf/powerpc:Add ability to sample intr machine state in powerpc

2015-11-02 Thread Anju T
/config/Makefile is moved to the patch tools/perf. - The patchset is reordered. - perf_regs_load() function is used for the dwarf unwind test.Since it is not required here, it is removed from tools/perf/arch/powerpc/include/perf_regs.h - PERF_REGS_POWERPC_RESULT is removed. Anju T (3

[PATCH V3 3/3] tools/perf:Map the ID values with register names

2015-11-02 Thread Anju T
Map ID values with corresponding register names.These names are then displayed when user issues perf record with the -I option followed by perf report/script with -D option. Signed-off-by: Anju T --- tools/perf/arch/powerpc/include/perf_regs.h | 114 tools/perf

Re: [PATCH V3 2/3] perf/powerpc :add support for sampling intr machine state

2015-11-03 Thread Anju T
Hi Michael, On Tuesday 03 November 2015 02:46 PM, Michael Ellerman wrote: On Tue, 2015-11-03 at 11:40 +0530, Anju T wrote: The perf infrastructure uses a bit mask to find out valid registers to display. Define a register mask for supported registers defined in asm/perf_regs.h. The bit

[RFC PATCH v4 3/3] arch/powerpc : Enable optprobes support in powerpc

2016-05-31 Thread Anju T
Signed-off-by: Anju T --- Documentation/features/debug/optprobes/arch-support.txt | 2 +- arch/powerpc/Kconfig| 1 + arch/powerpc/kernel/Makefile| 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation

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

2016-05-31 Thread Anju T
slot for detour buffer is allocated from the reserved area. For the time being 64KB is reserved in memory for this purpose. Signed-off-by: Anju T --- arch/powerpc/include/asm/kprobes.h | 27 +++ arch/powerpc/kernel/optprobes_head.S | 136 +++ 2 files changed

[RFC PATCH v3 2/3] arch/powerpc : optprobes for powerpc core

2016-05-31 Thread Anju T
Instructions which can be emulated are suppliants for optimization. Before optimization ensure that the address range between the detour buffer allocated and the instruction being probed is within +/- 32MB. Signed-off-by: Anju T --- arch/powerpc/kernel/optprobes.c | 351

[RFC PATCH v3 0/3] OPTPROBES for powerpc

2016-05-31 Thread Anju T
w your suggestions and comments. Thanks -Anju Anju T (3): arch/powerpc : Add detour buffer support for optprobes arch/powerpc : optprobes for powerpc core arch/powerpc : Enable optprobes support in powerpc .../features/debug/optprobes/arch-support.txt | 2 +- arch/powerpc/K

Re: [PATCH V11 0/4]perf/powerpc: Add ability to sample intr machine state in powerpc

2016-03-07 Thread Anju T
Hi, Any updates on this? On Saturday 20 February 2016 10:32 AM, Anju T wrote: This short patch series adds the ability to sample the interrupted machine state for each hardware sample. To test this patchset, Eg: $ perf record -I? # list supported registers output: available registers

[PATCH V11 0/4]perf/powerpc: Add ability to sample intr machine state in powerpc

2016-02-19 Thread Anju T
ed here, it is removed from tools/perf/arch/powerpc/include/perf_regs.h - PERF_REGS_POWERPC_RESULT is removed. Changes from V1: - Solved the name missmatch issue in the from and signed-off field of the patch series. - Added necessary comments in the 3rd patch ie perf/powerpc ,as suggested by M

[PATCH V11 2/4] perf/powerpc: add support for sampling intr machine state

2016-02-19 Thread Anju T
enables sampling of the interrupted machine state. Signed-off-by: Anju T --- arch/powerpc/Kconfig | 1 + arch/powerpc/perf/Makefile| 1 + arch/powerpc/perf/perf_regs.c | 91 +++ 3 files changed, 93 insertions(+) create mode 100644 arch/powerpc

[PATCH V2 4/4] tool/perf: Add sample_reg_mask to include all perf_regs

2016-02-19 Thread Anju T
From: Madhavan Srinivasan Add sample_reg_mask array with pt_regs registers. This is needed for printing supported regs ( -I? option). Signed-off-by: Madhavan Srinivasan --- tools/perf/arch/powerpc/util/Build | 1 + tools/perf/arch/powerpc/util/perf_regs.c | 49 ++

[PATCH V11 1/4] perf/powerpc: assign an id to each powerpc register

2016-02-19 Thread Anju T
The enum definition assigns an 'id' to each register in "struct pt_regs" of arch/powerpc. The order of these values in the enum definition are based on the corresponding macros in arch/powerpc/include/uapi/asm/ptrace.h. Signed-off-by: Anju T --- arch/powerpc/include/uapi/

[PATCH V11 3/4] tools/perf: Map the ID values with register names

2016-02-19 Thread Anju T
/vmlinux) Signed-off-by: Anju T --- tools/perf/arch/powerpc/include/perf_regs.h | 69 + tools/perf/config/Makefile | 5 +++ 2 files changed, 74 insertions(+) create mode 100644 tools/perf/arch/powerpc/include/perf_regs.h diff --git a/tools/perf/arch

[PATCH V7 1/4] perf/powerpc: assign an id to each powerpc register

2016-01-06 Thread Anju T
The enum definition assigns an 'id' to each register in "struct pt_regs" of arch/powerpc. The order of these values in the enum definition are based on the corresponding macros in arch/powerpc/include/uapi/asm/ptrace.h. Signed-off-by: Anju T Reviewed-by : Madhavan Srinivasa

[PATCH V1 4/4] tool/perf: Add sample_reg_mask to include all perf_regs regs

2016-01-06 Thread Anju T
From: Madhavan Srinivasan Add sample_reg_mask array with pt_regs registers. This is needed for printing supported regs ( -I? option). Signed-off-by: Madhavan Srinivasan --- tools/perf/arch/powerpc/util/Build | 1 + tools/perf/arch/powerpc/util/perf_regs.c | 48 ++

[PATCH V7 2/4] perf/powerpc: add support for sampling intr machine state

2016-01-06 Thread Anju T
enables sampling of the interrupted machine state. Signed-off-by: Anju T Reviewed-by : Madhavan Srinivasan --- arch/powerpc/Kconfig | 1 + arch/powerpc/perf/Makefile| 1 + arch/powerpc/perf/perf_regs.c | 85 +++ 3 files changed, 87 insertions

[PATCH V7 0/4] perf/powerpc: Add ability to sample intr machine state in powerpc

2016-01-06 Thread Anju T
om V1: - Solved the name missmatch issue in the from and signed-off field of the patch series. - Added necessary comments in the 3rd patch ie perf/powerpc ,as suggested by Maddy. Anju T (3): perf/powerpc: assign an id to each powerpc register perf/powerpc: add support for sampling intr machine

[PATCH V7 3/4] tools/perf: Map the ID values with register names

2016-01-06 Thread Anju T
(/boot/vmlinux) Signed-off-by: Anju T Reviewed-by : Madhavan Srinivasan --- tools/perf/arch/powerpc/include/perf_regs.h | 65 + tools/perf/config/Makefile | 5 +++ 2 files changed, 70 insertions(+) create mode 100644 tools/perf/arch/powerpc/include

[PATCH 2/3] arch/powerpc : optprobes for powerpc core

2016-09-07 Thread Anju T Sudhakar
Instructions which can be emulated are suppliants for optimization. Before optimization ensure that the address range between the detour buffer allocated and the instruction being probed is within ?? 32MB. Signed-off-by: Anju T Sudhakar --- arch/powerpc/include/asm/sstep.h | 1 + arch/powerpc

[PATCH 0/3] OPTPROBES for powerpc

2016-09-07 Thread Anju T Sudhakar
rbe(in case of branch instructions) is limited to unconditional branch instructions only, since the conditional branches are to be assessed carefully in SMP systems. - create_return_branch() is omitted. - Comments by Masami are addressed. Anju T Sudhakar (3): arch/powerpc : Add detour buffer s

[PATCH 3/3] arch/powerpc : Enable optprobes support in powerpc

2016-09-07 Thread Anju T Sudhakar
Mark optprobe 'ok' for powerpc Signed-off-by: Anju T Sudhakar --- Documentation/features/debug/optprobes/arch-support.txt | 2 +- arch/powerpc/Kconfig| 1 + arch/powerpc/kernel/Makefile| 1 + 3 files changed, 3 insert

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

2016-09-07 Thread Anju T Sudhakar
slot for detour buffer is allocated from the reserved area. For the time being 64KB is reserved in memory for this purpose. Signed-off-by: Anju T Sudhakar --- arch/powerpc/include/asm/kprobes.h | 24 +++ arch/powerpc/kernel/optprobes_head.S | 119 +++ 2 files

[PATCH v2] powerpc/kernel/sysfs: Export ldbar spr to sysfs

2017-10-31 Thread Anju T Sudhakar
Add ldbar spr to sysfs. The spr will hold thread level In-Memory Collection (IMC) counter configuration data. Signed-off-by: Anju T Sudhakar --- arch/powerpc/kernel/sysfs.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c

Re: [PATCH] powerpc/perf: Fix core-imc hotplug callback failure during imc initialization

2017-11-02 Thread Anju T Sudhakar
Hi, On Wednesday 01 November 2017 06:22 AM, Michael Ellerman wrote: Anju T Sudhakar writes: Call trace observed during boot: What's the actual oops? The actual oops is: [0.750749] PCI: CLS 0 bytes, default 128 [0.750855] Unpacking initramfs... [1.570445] Freeing i

[PATCH v2] powerpc/perf: Fix core-imc hotplug callback failure during imc initialization

2017-11-02 Thread Anju T Sudhakar
re-imc counters are not even initialized. Thus creating the above stack dump. Add a check to see if core-imc counters are enabled or not in the cpuhotplug offline path before migrating the context to handle this failing scenario. Signed-off-by: Madhavan Srinivasan Signed-off-by: Anju T Sudhakar ---

[PATCH] powerpc/perf: Add debugfs interface for imc run-mode and run-status

2017-11-12 Thread Anju T Sudhakar
root@:/sys/kernel/debug/imc# ls imc_cmd_0 imc_cmd_8 imc_mode_0 imc_mode_8 Signed-off-by: Anju T Sudhakar --- arch/powerpc/

Re: [PATCH] powerpc/perf: Add debugfs interface for imc run-mode and run-status

2017-11-12 Thread Anju T Sudhakar
Hi, Kindly ignore this version Thanks, Anju On Monday 13 November 2017 11:06 AM, Anju T Sudhakar wrote: In memory Collection (IMC) counter pmu driver controls the ucode's execution state. At the system boot, IMC perf driver pause the ucode. Ucode state is changed to "running"

[PATCH] powerpc/perf: Add debugfs interface for imc-mode and imc-command

2017-11-12 Thread Anju T Sudhakar
root@:/sys/kernel/debug/imc# ls imc_cmd_0 imc_cmd_8 imc_mode_0 imc_mode_8 Signed-off-by: Anju T Sudhakar --- arch/powerpc/

[PATCH] powerpc/kernel/sysfs: Export ldbar spr to sysfs

2017-10-27 Thread Anju T Sudhakar
Add ldbar spr to sysfs. The spr will hold thread level In-Memory Collection (IMC) counter configuration data. Signed-off-by: Anju T Sudhakar Acked-by: Madhavan Srinivasan --- arch/powerpc/kernel/sysfs.c | 8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/kernel/sysfs.c b

[PATCH] powerpc/perf: Fix core-imc hotplug callback failure during imc initialization

2017-10-31 Thread Anju T Sudhakar
: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c index 8812624..08139f9 100644 --- a/arch/powerpc/perf/imc-pmu.c +++ b/arch/powerpc/perf/imc-pmu.c @@ -30,6 +30,7 @@ static

[PATCH] powerpc/perf: Change the data type for the variable 'ncpu' in IMC code

2017-10-31 Thread Anju T Sudhakar
Change the data type for the variable 'ncpu' in ppc_core_imc_cpu_offline(), since cpumask_any_but() returns an 'int' value. Signed-off-by: Anju T Sudhakar Reported-by: David Binderman --- arch/powerpc/perf/imc-pmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-

[PATCH] powerpc/perf: Clean up IMC code with some code refactoring

2017-10-31 Thread Anju T Sudhakar
Factor out memory freeing part for attribute elements from imc_common_mem_free(), also handle the memory leak for pmu->events in update_events_in_group(). Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 24 1 file changed, 16 insertions(+)

Re: [PATCH v3] powerpc/kernel/sysfs: Export ldbar spr to sysfs

2018-03-12 Thread Anju T Sudhakar
Hi, On Tuesday 06 March 2018 04:35 PM, Michael Ellerman wrote: Anju T Sudhakar writes: diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 4437c70..caefb64 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c @@ -757,6 +759,9 @@ static int

[PATCH v2 0/5] powerpc/perf: IMC trace-mode support

2018-12-14 Thread Anju T Sudhakar
03 803803803803803 1306803 803 Performance monitoring interrupts The PMI interrupts count remains the same. Changelog: >From v1 -> v2 -- * Added priv

[PATCH v2 5/5] powerpc/perf: Trace imc PMU functions

2018-12-14 Thread Anju T Sudhakar
Add PMU functions to support trace-imc. Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 175 1 file changed, 175 insertions(+) diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c index 1f09265c8fb0..32ff0e449fca 100644

[PATCH v2 2/5] powerpc/perf: Rearrange setting of ldbar for thread-imc

2018-12-14 Thread Anju T Sudhakar
'. So to accommodate trace-mode of IMC, reposition setting of ldbar for thread-imc to thread_imc_event_add(). Also reset ldbar at thread_imc_event_del(). Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 28 +--- 1 file changed, 17 insertions(+), 11

[PATCH v2 1/5] powerpc/include: Add data structures and macros for IMC trace mode

2018-12-14 Thread Anju T Sudhakar
Add the macros needed for IMC (In-Memory Collection Counters) trace-mode and data structure to hold the trace-imc record data. Also, add the new type "OPAL_IMC_COUNTERS_TRACE" in 'opal-api.h', since there is a new switch case added in the opal-calls for IMC. Signed-off

[PATCH v2 4/5] powerpc/perf: Trace imc events detection and cpuhotplug

2018-12-14 Thread Anju T Sudhakar
Patch detects trace-imc events, does memory initilizations for each online cpu, and registers cpuhotplug call-backs. Signed-off-by: Anju T Sudhakar --- arch/powerpc/perf/imc-pmu.c | 91 +++ arch/powerpc/platforms/powernv/opal-imc.c | 3 + include/linux

[PATCH v2 3/5] powerpc/perf: Add privileged access check for thread_imc

2018-12-14 Thread Anju T Sudhakar
From: Madhavan Srinivasan Add code to restrict user access to thread_imc pmu since some event report privilege level information. Fixes: f74c89bd80fb3 ('powerpc/perf: Add thread IMC PMU support') Signed-off-by: Madhavan Srinivasan Signed-off-by: Anju T Sudhakar --- arch/powerp

Re: [PATCH v4 0/5] powerpc/perf: IMC trace-mode support

2019-04-16 Thread Anju T Sudhakar
On 4/16/19 3:14 PM, Anju T Sudhakar wrote: Hi, Kindly ignore this series, since patch 5/5 in this series doesn't incorporate the event-format change that I've done in v4 of this series. Apologies for the inconvenience. I will post the updated v5 soon. s/v5/v4 Thanks, Anj

[PATCH v3 1/5] powerpc/include: Add data structures and macros for IMC trace mode

2019-02-06 Thread Anju T Sudhakar
Add the macros needed for IMC (In-Memory Collection Counters) trace-mode and data structure to hold the trace-imc record data. Also, add the new type "OPAL_IMC_COUNTERS_TRACE" in 'opal-api.h', since there is a new switch case added in the opal-calls for IMC. Signed-off

[PATCH v3 4/5] powerpc/perf: Trace imc events detection and cpuhotplug

2019-02-06 Thread Anju T Sudhakar
Patch detects trace-imc events, does memory initilizations for each online cpu, and registers cpuhotplug call-backs. Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan --- arch/powerpc/perf/imc-pmu.c | 91 +++ arch/powerpc/platforms/powernv/opal

[PATCH v3 2/5] powerpc/perf: Rearrange setting of ldbar for thread-imc

2019-02-06 Thread Anju T Sudhakar
'. So to accommodate trace-mode of IMC, reposition setting of ldbar for thread-imc to thread_imc_event_add(). Also reset ldbar at thread_imc_event_del(). Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan --- arch/powerpc/perf/imc-pmu.c | 28 +--- 1 fi

[PATCH v3 5/5] powerpc/perf: Trace imc PMU functions

2019-02-06 Thread Anju T Sudhakar
Add PMU functions to support trace-imc and define the format for trace-imc events. Signed-off-by: Anju T Sudhakar Reviewed-by: Madhavan Srinivasan --- arch/powerpc/perf/imc-pmu.c | 197 +++- 1 file changed, 196 insertions(+), 1 deletion(-) diff --git a/arch

[PATCH v3 3/5] powerpc/perf: Add privileged access check for thread_imc

2019-02-06 Thread Anju T Sudhakar
From: Madhavan Srinivasan Add code to restrict user access to thread_imc pmu since some event report privilege level information. Fixes: f74c89bd80fb3 ('powerpc/perf: Add thread IMC PMU support') Signed-off-by: Madhavan Srinivasan Signed-off-by: Anju T Sudhakar --- arch/powerp

[PATCH v3 0/5] powerpc/perf: IMC trace-mode support

2019-02-06 Thread Anju T Sudhakar
03 803803803803803 1306803 803 Performance monitoring interrupts The PMI interrupts count remains the same. Changelog: >From v2 -> v3 -- * Redefined

[PATCH] iomap: Fix the write_count in iomap_add_to_ioend().

2020-08-19 Thread Anju T Sudhakar
/0x1c0 system_call_common+0xf0/0x278 Reported-by: Shivaprasad G Bhat Signed-off-by: Ritesh Harjani Signed-off-by: Anju T Sudhakar --- fs/iomap/buffered-io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index bcfc28

[PATCH v2 2/3] tools/perf: Add arch neutral function to choose event for perf kvm record

2019-07-18 Thread Anju T Sudhakar
host. Patch adds a function to pick an arch specific event for 'perf kvm record', instead of selecting 'cycles' as a default event for all architectures. For powerpc this function checks for any user specified event, and if there isn't any it returns invalid instead of proceedin

[PATCH v2 1/3] tools/perf: Move kvm-stat header file from conditional inclusion to common include section

2019-07-18 Thread Anju T Sudhakar
. Signed-off-by: Anju T Sudhakar --- tools/perf/builtin-kvm.c | 2 +- tools/perf/util/kvm-stat.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index b33c83489120..5d2b34d290a3 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools

[PATCH v2 3/3] tools/perf: Set 'trace_cycles' as defaultevent for perf kvm record in powerpc

2019-07-18 Thread Anju T Sudhakar
Use 'trace_imc/trace_cycles' as the default event for 'perf kvm record' in powerpc. Signed-off-by: Anju T Sudhakar --- tools/perf/arch/powerpc/util/kvm-stat.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/powerpc/util

[PATCH 1/2] tools/perf: set no_auxtrace for powerpc

2020-04-28 Thread Anju T Sudhakar
. Currently powerpc architecture is not having support for auxtrace. So as a workaround for this issue, set NO_AUXTRACE for powerpc. Signed-off-by: Anju T Sudhakar --- tools/perf/arch/powerpc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/arch/powerpc/Makefile b/tools/perf/arch

[PATCH 0/2] powerpc/perf: Add support for perf extended regs in powerpc

2020-04-28 Thread Anju T Sudhakar
for this issue, patch 1/2 set NO_AUXTRACE for powerpc. (Any other solutions are welcome.) Patch 2/2 also add extended regs to sample_reg_mask in the tool side to use with `-I?` option. Anju T Sudhakar (2): tools/perf: set no_auxtrace for powerpc powerpc/perf: Add support for outputting extended

[PATCH 2/2] powerpc/perf: Add support for outputting extended regs in perf intr_regs

2020-04-28 Thread Anju T Sudhakar
: Anju T Sudhakar --- arch/powerpc/include/asm/perf_event_server.h | 5 +++ arch/powerpc/include/uapi/asm/perf_regs.h | 13 +++- arch/powerpc/perf/core-book3s.c | 1 + arch/powerpc/perf/perf_regs.c | 29 ++-- arch/powerpc/perf/power9-pmu.c

[PATCH 2/2] tools/perf: Set 'trace_cycles' as defaultevent for perf kvm record in powerpc

2019-05-24 Thread Anju T Sudhakar
Use 'trace_imc/trace_cycles' as the default event for 'perf kvm record' in powerpc. Signed-off-by: Anju T Sudhakar --- tools/perf/arch/powerpc/util/kvm-stat.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/powerpc/util

[PATCH 1/2] tools/perf: Add arch neutral function to choose event for perf kvm record

2019-05-24 Thread Anju T Sudhakar
host. Patch adds a function to pick an arch specific event for 'perf kvm record', instead of selecting 'cycles' as a default event for all architectures. For powerpc this function checks for any user specified event, and if there isn't any it returns invalid instead of proceedin

[PATCH RESEND 2/2] tools/perf: Set 'trace_cycles' as defaultevent for perf kvm record in powerpc

2019-06-09 Thread Anju T Sudhakar
Use 'trace_imc/trace_cycles' as the default event for 'perf kvm record' in powerpc. Signed-off-by: Anju T Sudhakar --- tools/perf/arch/powerpc/util/kvm-stat.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/tools/perf/arch/powerpc/util

[PATCH RESEND 1/2] tools/perf: Add arch neutral function to choose event for perf kvm record

2019-06-09 Thread Anju T Sudhakar
host. Patch adds a function to pick an arch specific event for 'perf kvm record', instead of selecting 'cycles' as a default event for all architectures. For powerpc this function checks for any user specified event, and if there isn't any it returns invalid instead of proceedin

Re: power9 NUMA crash while reading debugfs imc_cmd

2019-06-28 Thread Anju T Sudhakar
On 6/28/19 9:04 AM, Qian Cai wrote: On Jun 27, 2019, at 11:12 PM, Michael Ellerman wrote: Qian Cai writes: Read of debugfs imc_cmd file for a memory-less node will trigger a crash below on this power9 machine which has the following NUMA layout. What type of machine is it? description:

[PATCH V2 0/4] OPTPROBES for powerpc

2016-12-14 Thread Anju T Sudhakar
in V1 into a single patch. - Comments by Masami are addressed. - Some helper functions are implemented in separate patches. - Optimization for kprobe placed on the kretprobe_trampoline during boot time is implemented. Kindly let me know your suggestions and comments. Thanks, -Anju Anju T Su

[PATCH V2 4/4] arch/powerpc: Optimize kprobe in kretprobe_trampoline

2016-12-14 Thread Anju T Sudhakar
Kprobe placed on the kretprobe_trampoline during boot time can be optimized, since the instruction at probe point is a 'nop'. Signed-off-by: Anju T Sudhakar --- arch/powerpc/kernel/kprobes.c | 8 arch/powerpc/kernel/optprobes.c | 7 +++ 2 files changed, 11 insert

[PATCH V2 2/4] powerpc: add helper to check if offset is within rel branch range

2016-12-14 Thread Anju T Sudhakar
From: "Naveen N. Rao" Signed-off-by: Naveen N. Rao Signed-off-by: Anju T Sudhakar --- arch/powerpc/include/asm/code-patching.h | 1 + arch/powerpc/lib/code-patching.c | 24 +++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/arch/power

[PATCH V2 3/4] arch/powerpc: Implement Optprobes

2016-12-14 Thread Anju T Sudhakar
buffer allocated and the instruction being probed is within ?? 32MB. Signed-off-by: Anju T Sudhakar Signed-off-by: Naveen N. Rao --- .../features/debug/optprobes/arch-support.txt | 2 +- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/kprobes.h

[PATCH V2 1/4] powerpc: asm/ppc-opcode.h: introduce __PPC_SH64()

2016-12-14 Thread Anju T Sudhakar
From: "Naveen N. Rao" Introduce __PPC_SH64() as a 64-bit variant to encode shift field in some of the shift and rotate instructions operating on double-words. Convert some of the BPF instruction macros to use the same. Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/ppc-opcode.h | 1

Re: [PATCH V2 2/4] powerpc: add helper to check if offset is within rel branch range

2016-12-16 Thread Anju T Sudhakar
Hi Masami, Thank you for reviewing the patch set. On Friday 16 December 2016 05:22 PM, Masami Hiramatsu wrote: On Wed, 14 Dec 2016 21:48:30 +0530 Anju T Sudhakar wrote: From: "Naveen N. Rao" The coding is OK to me. Please add a description for this patch here, e.g. what is do

Re: [PATCH V2 3/4] arch/powerpc: Implement Optprobes

2016-12-16 Thread Anju T Sudhakar
Hi Masami, On Friday 16 December 2016 07:32 PM, Masami Hiramatsu wrote: On Wed, 14 Dec 2016 21:48:27 +0530 Anju T Sudhakar wrote: Detour buffer contains instructions to create an in memory pt_regs. After the execution of the pre-handler, a call is made for instruction emulation. The NIP

[PATCH V3 3/4] arch/powerpc: Implement Optprobes

2016-12-19 Thread Anju T Sudhakar
buffer allocated and the instruction being probed is within ?? 32MB. Signed-off-by: Anju T Sudhakar Signed-off-by: Naveen N. Rao --- .../features/debug/optprobes/arch-support.txt | 2 +- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/kprobes.h

[PATCH V3 4/4] arch/powerpc: Optimize kprobe in kretprobe_trampoline

2016-12-19 Thread Anju T Sudhakar
Kprobe placed on the kretprobe_trampoline during boot time can be optimized, since the instruction at probe point is a 'nop'. Signed-off-by: Anju T Sudhakar Acked-by: Masami Hiramatsu --- arch/powerpc/kernel/kprobes.c | 8 arch/powerpc/kernel/optprobes.c | 7 +++---

[PATCH V3 0/4] OPTPROBES for powerpc

2016-12-19 Thread Anju T Sudhakar
ressed. - Description in the cover letter is modified a bit. Kindly let me know your suggestions and comments. Thanks, -Anju Anju T Sudhakar (2): arch/powerpc: Implement Optprobes arch/powerpc: Optimize kprobe in kretprobe_trampoline Naveen N. Rao (2): powerpc: asm/ppc-opcode.h: introduce __PP

[PATCH V3 2/4] powerpc: add helper to check if offset is within rel branch range

2016-12-19 Thread Anju T Sudhakar
he current instruction. This patch verifies whether the target address is within +/- 32MB range or not. Signed-off-by: Naveen N. Rao Signed-off-by: Anju T Sudhakar --- arch/powerpc/include/asm/code-patching.h | 1 + arch/powerpc/lib/code-patching.c | 24 +++- 2 files c

[PATCH V3 1/4] powerpc: asm/ppc-opcode.h: introduce __PPC_SH64()

2016-12-19 Thread Anju T Sudhakar
From: "Naveen N. Rao" Introduce __PPC_SH64() as a 64-bit variant to encode shift field in some of the shift and rotate instructions operating on double-words. Convert some of the BPF instruction macros to use the same. Signed-off-by: Naveen N. Rao --- arch/powerpc/include/asm/ppc-opcode.h | 1

  1   2   >