[PATCH v4 10/10] powerpc/perf: Thread IMC PMU functions

2017-02-19 Thread Hemant Kumar
Cc: Anju T Sudhakar Signed-off-by: Hemant Kumar --- arch/powerpc/include/asm/imc-pmu.h | 4 + arch/powerpc/perf/imc-pmu.c| 161 - 2 files changed, 164 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/imc-pmu.h b/arch/powerpc/inclu

[PATCH v4 09/10] powerpc/powernv: Thread IMC events detection

2017-02-19 Thread Hemant Kumar
Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev Bhattiprolu Cc: Michael Neuling Cc: Stewart Smith Cc: Daniel Axtens Cc: Stephane Eranian Cc: Balbir Singh Cc: Anju T Sudhakar Signed-off-by: Hemant Kumar --- arch/powerpc/include/asm/imc-pmu.h| 2 ++ arch/powerpc/perf

[PATCH v4 08/10] powerpc/perf: PMU functions for Core IMC and hotplugging

2017-02-19 Thread Hemant Kumar
uling Cc: Stewart Smith Cc: Daniel Axtens Cc: Stephane Eranian Cc: Balbir Singh Cc: Anju T Sudhakar Signed-off-by: Hemant Kumar --- arch/powerpc/include/asm/imc-pmu.h | 1 + arch/powerpc/include/asm/opal-api.h| 10 +- arch/powerpc/include/asm/opal.h

[PATCH v4 07/10] powerpc/powernv: Core IMC events detection

2017-02-19 Thread Hemant Kumar
lerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev Bhattiprolu Cc: Michael Neuling Cc: Stewart Smith Cc: Daniel Axtens Cc: Stephane Eranian Cc: Balbir Singh Cc: Anju T Sudhakar Signed-off-by: Hemant Kumar --- arch/powerpc/include/asm/imc-pmu.h|

[PATCH v4 06/10] powerpc/perf: IMC pmu cpumask and cpu hotplug support

2017-02-19 Thread Hemant Kumar
: Daniel Axtens Cc: Stephane Eranian Cc: Balbir Singh Cc: Anju T Sudhakar Signed-off-by: Hemant Kumar --- arch/powerpc/include/asm/opal-api.h| 3 +- arch/powerpc/include/asm/opal.h| 3 + arch/powerpc/perf/imc-pmu.c| 163

[PATCH v4 05/10] powerpc/perf: Generic imc pmu event functions

2017-02-19 Thread Hemant Kumar
phane Eranian Cc: Balbir Singh Cc: Anju T Sudhakar Signed-off-by: Hemant Kumar --- arch/powerpc/include/asm/imc-pmu.h| 1 + arch/powerpc/perf/imc-pmu.c | 121 ++ arch/powerpc/platforms/powernv/opal-imc.c | 30 +++- 3 files changed

[PATCH v4 04/10] powerpc/perf: Add event attribute and group to IMC pmus

2017-02-19 Thread Hemant Kumar
: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev Bhattiprolu Cc: Michael Neuling Cc: Stewart Smith Cc: Daniel Axtens Cc: Stephane Eranian Cc: Balbir Singh Cc: Anju T Sudhakar Signed-off-by: Hemant Kumar --- arch/powerpc/perf/Makefile| 6 +- ar

[PATCH v4 03/10] powerpc/powernv: Detect supported IMC units and its events

2017-02-19 Thread Hemant Kumar
Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev Bhattiprolu Cc: Michael Neuling Cc: Stewart Smith Cc: Daniel Axtens Cc: Stephane Eranian Cc: Balbir Singh Signed-off-by: Hemant Kumar Signed-off-by: Anju T Sudhakar --- arch/powerpc/platforms/powernv/opal-imc.c | 385 +

[PATCH v4 02/10] powerpc/powernv: Autoload IMC device driver module

2017-02-19 Thread Hemant Kumar
u T Sudhakar Signed-off-by: Hemant Kumar --- arch/powerpc/platforms/powernv/Makefile | 2 +- arch/powerpc/platforms/powernv/opal-imc.c | 117 ++ arch/powerpc/platforms/powernv/opal.c | 13 3 files changed, 131 insertions(+), 1 deletion(-) create mode

[PATCH v4 01/10] powerpc/powernv: Data structure and macros definitions

2017-02-19 Thread Hemant Kumar
Cc: Daniel Axtens Cc: Stephane Eranian Cc: Balbir Singh Cc: Anju T Sudhakar Signed-off-by: Hemant Kumar --- arch/powerpc/include/asm/imc-pmu.h | 73 ++ 1 file changed, 73 insertions(+) create mode 100644 arch/powerpc/include/asm/imc-pmu.h diff --git a/ar

[PATCH v4 00/10] IMC Instrumentation Support

2017-02-19 Thread Hemant Kumar
Nest IMC PMUs to include a new state CPUHP_AP_PERF_POWERPC_NEST_ONLINE (Patch 6). v2 -> v3 : - Changed all references for IMA (In-Memory Accumulation) to IMC (In-Memory Collection). v1 -> v2 : - Account for the cases where a PMU can have a common scale and unit values for al

[PATCH v3 6/6] powerpc/perf: IMC pmu cpumask and cpu hotplug support

2016-12-19 Thread Hemant Kumar
designated as new cpu to read counters. Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev Bhattiprolu Cc: Michael Neuling Cc: Stewart Smith Cc: Daniel Axtens Cc: Stephane Eranian Signed-off-by: Hemant Kumar --- arch

[PATCH v3 5/6] powerpc/perf: Generic imc pmu event functions

2016-12-19 Thread Hemant Kumar
phane Eranian Signed-off-by: Hemant Kumar --- arch/powerpc/include/asm/imc-pmu.h| 1 + arch/powerpc/perf/imc-pmu.c | 122 ++ arch/powerpc/platforms/powernv/opal-imc.c | 29 ++- 3 files changed, 148 insertions(+), 4 deletions(-) diff --git a

[PATCH v3 4/6] powerpc/perf: Add event attribute and group to IMC pmus

2016-12-19 Thread Hemant Kumar
: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev Bhattiprolu Cc: Michael Neuling Cc: Stewart Smith Cc: Daniel Axtens Cc: Stephane Eranian Signed-off-by: Hemant Kumar --- arch/powerpc/perf/Makefile| 6 +- arch/powerpc/perf/imc-pmu.c

[PATCH v3 3/6] powerpc/powernv: Detect supported IMC units and its events

2016-12-19 Thread Hemant Kumar
c: Stewart Smith Cc: Daniel Axtens Cc: Stephane Eranian Signed-off-by: Hemant Kumar --- arch/powerpc/platforms/powernv/opal-imc.c | 332 ++ 1 file changed, 332 insertions(+) diff --git a/arch/powerpc/platforms/powernv/opal-imc.c b/arch/powerpc/platforms/powernv/opal

[PATCH v3 2/6] powerpc/powernv: Autoload IMC device driver module

2016-12-19 Thread Hemant Kumar
es). Right now, only Nest units are taken care of. Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev Bhattiprolu Cc: Michael Neuling Cc: Stewart Smith Cc: Daniel Axtens Cc: Stephane Eranian Signed-off-by: Hemant Kuma

[PATCH v3 1/6] powerpc/powernv: Data structure and macros definitions

2016-12-19 Thread Hemant Kumar
Cc: Daniel Axtens Cc: Stephane Eranian Signed-off-by: Hemant Kumar --- arch/powerpc/include/asm/imc-pmu.h | 73 ++ 1 file changed, 73 insertions(+) create mode 100644 arch/powerpc/include/asm/imc-pmu.h diff --git a/arch/powerpc/include/asm/imc-pmu.h b/arch/power

[PATCH v3 0/6] IMC Instrumentation Support

2016-12-19 Thread Hemant Kumar
all its supported events (Patch 3/6). - Fixed a Build error (for maple_defconfig) by enabling imc_pmu.o only for CONFIG_PPC_POWERNV=y (Patch 4/6) - Read from the "event-name" property instead of "name" for an event node (Patch 3/6). Cc: Madhavan Srinivasan Cc: Michael El

[PATCH v2 6/6] powerpc/perf: IMA pmu cpumask and cpu hotplug support

2016-11-20 Thread Hemant Kumar
designated as new cpu to read counters. Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev Bhattiprolu Cc: Michael Neuling Cc: Stewart Smith Cc: Stephane Eranian Signed-off-by: Hemant Kumar --- arch/powerpc/include/asm

[PATCH v2 5/6] powerpc/perf: Generic ima pmu event functions

2016-11-20 Thread Hemant Kumar
d-off-by: Hemant Kumar --- arch/powerpc/include/asm/ima-pmu.h| 2 + arch/powerpc/perf/ima-pmu.c | 122 ++ arch/powerpc/platforms/powernv/opal-ima.c | 37 +++-- 3 files changed, 154 insertions(+), 7 deletions(-) diff --git a/arch/powerpc/in

[PATCH v2 4/6] powerpc/perf: Add event attribute and group to IMA pmus

2016-11-20 Thread Hemant Kumar
: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev Bhattiprolu Cc: Michael Neuling Cc: Stewart Smith Cc: Stephane Eranian Signed-off-by: Hemant Kumar --- Changelog: v1 -> v2: - Changes to Makefile to only enable this feature for CONFIG_PPC_POWERNV=y arch

[PATCH v2 3/6] powerpc/powernv: Detect supported IMA units and its events

2016-11-20 Thread Hemant Kumar
c: Stewart Smith Cc: Stephane Eranian Signed-off-by: Hemant Kumar --- Changelog : v1 -> v2: - Read from the "event-name" property instead of "name" property for an event node. - Assign scale and unit values for events for a PMU which has a common unit and scale value.

[PATCH v2 2/6] powerpc/powernv: Autoload IMA device driver module

2016-11-20 Thread Hemant Kumar
es). Right now, only Nest units are taken care of. Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev Bhattiprolu Cc: Michael Neuling Cc: Stewart Smith Cc: Stephane Eranian Signed-off-by: Hemant Kumar --- arch/power

[PATCH v2 1/6] powerpc/powernv: Data structure and macros definitions

2016-11-20 Thread Hemant Kumar
: Stephane Eranian Signed-off-by: Hemant Kumar --- arch/powerpc/include/asm/ima-pmu.h | 73 ++ 1 file changed, 73 insertions(+) create mode 100644 arch/powerpc/include/asm/ima-pmu.h diff --git a/arch/powerpc/include/asm/ima-pmu.h b/arch/powerpc/include/asm/ima

[PATCH v2 0/6] IMA Instrumentation Support

2016-11-20 Thread Hemant Kumar
only for CONFIG_PPC_POWERNV=y (Patch 4/6) - Read from the "event-name" property instead of "name" for an event node (Patch 3/6). Cc: Madhavan Srinivasan Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Anton Blanchard Cc: Sukadev Bhattiprolu Cc: Mich

[PATCH v4] perf/probe: Search both .eh_frame and .debug_frame sections for probe location

2016-02-02 Thread Hemant Kumar
e sections (.eh_frame and .debug_frame), which is done in this patch. Note that, we can always force everything into both .eh_frame and .debug_frame by : $ gcc bin.c -fasynchronous-unwind-tables -fno-dwarf2-cfi-asm -g -o bin Acked-by: Masami Hiramatsu Signed-off-by: Hemant Kumar --- Changes s

[PATCH v11 4/4] perf,kvm/powerpc: Add support for HCALL reasons

2016-01-27 Thread Hemant Kumar
1.70us 0.58us ( +- 4.77% ) H_RTAS 6 0.48% 0.85% 1.10us 9.25us 2.70us ( +- 48.57% ) H_PERFMON 4 0.32% 0.12% 0.41us 0.96us 0.59us ( +- 20.92% ) Total Samples:1244, Total events handled time:1916.69us. Signed-

[PATCH v11 3/4] perf,kvm/powerpc: Port perf kvm stat to powerpc

2016-01-27 Thread Hemant Kumar
.42us. Signed-off-by: Srikar Dronamraju Signed-off-by: Hemant Kumar --- Changelog: v10 to v11: - Fixed a bug related to tracepoint_error when rebasing to v4.5-rc1. v8 to v9: - Moved the book3s specific setup into one function. - Removed the macros (which were being used only once). - Formatting ch

[PATCH v11 2/4] perf,kvm/{x86,s390}: Remove const from kvm_events_tp

2016-01-27 Thread Hemant Kumar
This patch removes the "const" qualifier from kvm_events_tp declaration to account for the fact that some architectures may need to update this variable dynamically. For instance, powerpc will need to update this variable dynamically depending on the machine type. Signed-off-by: He

[PATCH v11 1/4] perf, kvm/{x86, s390}: Remove dependency on uapi/kvm_perf.h

2016-01-27 Thread Hemant Kumar
Its better to remove the dependency on uapi/kvm_perf.h to allow dynamic discovery of kvm events (if its needed). To do this, some extern variables have been introduced with which we can keep the generic functions generic. Signed-off-by: Hemant Kumar Acked-by: Alexander Yarygin --- Changelog

Re: [PATCH v2] perf/probe: Search both .eh_frame and .debug_frame sections for probe location

2016-01-13 Thread Hemant Kumar
On 01/12/2016 04:34 PM, 平松雅巳 / HIRAMATU,MASAMI wrote: Hi Hemant, From: Hemant Kumar [mailto:hem...@linux.vnet.ibm.com] perf probe through debuginfo__find_probes() in util/probe-finder.c checks for the functions' frame descriptions in either .eh_frame section of an ELF or the .debug_

[PATCH v3] perf/probe: Search both .eh_frame and .debug_frame sections for probe location

2016-01-13 Thread Hemant Kumar
e sections (.eh_frame and .debug_frame), which is done in this patch. Note that, we can always force everything into both .eh_frame and .debug_frame by : $ gcc bin.c -fasynchronous-unwind-tables -fno-dwarf2-cfi-asm -g -o bin Signed-off-by: Hemant Kumar --- Changes since v2: - Fixed an issue re

[PATCH v2] perf/probe: Search both .eh_frame and .debug_frame sections for probe location

2016-01-04 Thread Hemant Kumar
e sections (.eh_frame and .debug_frame), which is done in this patch. Note that, we can always force everything into both .eh_frame and .debug_frame by : $ gcc bin.c -fasynchronous-unwind-tables -fno-dwarf2-cfi-asm -g -o bin Signed-off-by: Hemant Kumar --- Changes since v1: - pf->cfi is now c

[PATCH v10 3/4] perf,kvm/powerpc: Port perf kvm stat to powerpc

2016-01-03 Thread Hemant Kumar
.42us. Signed-off-by: Srikar Dronamraju Signed-off-by: Hemant Kumar --- Changelog: v8 to v9: - Moved the book3s specific setup into one function. - Removed the macros (which were being used only once). - Formatting changes. v7 to v8: - Fixed a perf kvm stat live bug. v6 to v7: - Removed dependency

[PATCH v9 4/4] perf,kvm/powerpc: Add support for HCALL reasons

2016-01-03 Thread Hemant Kumar
1.70us 0.58us ( +- 4.77% ) H_RTAS 6 0.48% 0.85% 1.10us 9.25us 2.70us ( +- 48.57% ) H_PERFMON 4 0.32% 0.12% 0.41us 0.96us 0.59us ( +- 20.92% ) Total Samples:1244, Total events handled time:1916.69us. Signed-

[PATCH v10 2/4] perf,kvm/{x86,s390}: Remove const from kvm_events_tp

2016-01-03 Thread Hemant Kumar
This patch removes the "const" qualifier from kvm_events_tp declaration to account for the fact that some architectures may need to update this variable dynamically. For instance, powerpc will need to update this variable dynamically depending on the machine type. Signed-off-by: He

[PATCH v10 1/4] perf, kvm/{x86, s390}: Remove dependency on uapi/kvm_perf.h

2016-01-03 Thread Hemant Kumar
Its better to remove the dependency on uapi/kvm_perf.h to allow dynamic discovery of kvm events (if its needed). To do this, some extern variables have been introduced with which we can keep the generic functions generic. Signed-off-by: Hemant Kumar Acked-by: Alexander Yarygin --- Changelog: v9

Re: [PATCH v9 1/4] perf, kvm/{x86, s390}: Remove dependency on uapi/kvm_perf.h

2015-10-29 Thread Hemant Kumar
On 10/29/2015 02:17 AM, Alexander Yarygin wrote: Hemant Kumar writes: Hi David, On 10/07/2015 09:41 PM, David Ahern wrote: On 10/6/15 8:25 PM, Hemant Kumar wrote: @@ -358,7 +357,12 @@ static bool handle_end_event(struct perf_kvm_stat *kvm, time_diff = sample->time - time_be

Re: [PATCH v9 1/4] perf, kvm/{x86, s390}: Remove dependency on uapi/kvm_perf.h

2015-10-26 Thread Hemant Kumar
Hi Arnaldo, Could you please take a look at this series and pull it? --- Thanks, Hemant On 10/07/2015 07:55 AM, Hemant Kumar wrote: Its better to remove the dependency on uapi/kvm_perf.h to allow dynamic discovery of kvm events (if its needed). To do this, some extern variables have been

Re: [PATCH v9 1/4] perf, kvm/{x86, s390}: Remove dependency on uapi/kvm_perf.h

2015-10-08 Thread Hemant Kumar
Hi David, On 10/07/2015 09:41 PM, David Ahern wrote: On 10/6/15 8:25 PM, Hemant Kumar wrote: @@ -358,7 +357,12 @@ static bool handle_end_event(struct perf_kvm_stat *kvm, time_diff = sample->time - time_begin; if (kvm->duration && time_diff > kvm->duration) {

[PATCH v9 4/4] perf,kvm/powerpc: Add support for HCALL reasons

2015-10-06 Thread Hemant Kumar
1.70us 0.58us ( +- 4.77% ) H_RTAS 6 0.48% 0.85% 1.10us 9.25us 2.70us ( +- 48.57% ) H_PERFMON 4 0.32% 0.12% 0.41us 0.96us 0.59us ( +- 20.92% ) Total Samples:1244, Total events handled time:1916.69us. Signed-

[PATCH v9 3/4] perf,kvm/powerpc: Port perf kvm stat to powerpc

2015-10-06 Thread Hemant Kumar
.42us. Signed-off-by: Srikar Dronamraju Signed-off-by: Hemant Kumar --- Changelog: v8 to v9: - Moved the book3s specific setup into one function. - Removed the macros (which were being used only once). - Formatting changes. v7 to v8: - Fixed a perf kvm stat live bug. v6 to v7: - Removed dependency

[PATCH v9 2/4] perf,kvm/{x86,s390}: Remove const from kvm_events_tp

2015-10-06 Thread Hemant Kumar
This patch removes the "const" qualifier from kvm_events_tp declaration to account for the fact that some architectures may need to update this variable dynamically. For instance, powerpc will need to update this variable dynamically depending on the machine type. Signed-off-by: He

[PATCH v9 1/4] perf, kvm/{x86, s390}: Remove dependency on uapi/kvm_perf.h

2015-10-06 Thread Hemant Kumar
Its better to remove the dependency on uapi/kvm_perf.h to allow dynamic discovery of kvm events (if its needed). To do this, some extern variables have been introduced with which we can keep the generic functions generic. Signed-off-by: Hemant Kumar --- Changelog: v8 to v9: - Removed the macro

Re: [PATCH v8 1/4] perf, kvm/{x86, s390}: Remove dependency on uapi/kvm_perf.h

2015-09-30 Thread Hemant Kumar
untime definition then change KVM_ENTRY_TRACE to const char *kvm_entry_trace and s390 and other arches can have code to set kvm_{entry,exit}_trace at runtime. Yeah, will change them to kvm_{entry,exit}_trace, instead. -- Thanks, Hemant Kumar ___ Linux

Re: [PATCH v8 1/4] perf, kvm/{x86, s390}: Remove dependency on uapi/kvm_perf.h

2015-09-30 Thread Hemant Kumar
Hi, Thanks for the review. On 09/28/2015 06:30 PM, Alexander Yarygin wrote: Hemant Kumar writes: Its better to remove the dependency on uapi/kvm_perf.h to allow dynamic discovery of kvm events (if its needed). To do this, some extern variables have been introduced with which we can keep the

[PATCH v8 4/4] perf,kvm/powerpc: Add support for HCALL reasons

2015-09-24 Thread Hemant Kumar
1.70us 0.58us ( +- 4.77% ) H_RTAS 6 0.48% 0.85% 1.10us 9.25us 2.70us ( +- 48.57% ) H_PERFMON 4 0.32% 0.12% 0.41us 0.96us 0.59us ( +- 20.92% ) Total Samples:1244, Total events handled time:1916.69us. Signed-

[PATCH v8 3/4] perf,kvm/powerpc: Port perf kvm stat to powerpc

2015-09-24 Thread Hemant Kumar
.42us. Signed-off-by: Srikar Dronamraju Signed-off-by: Hemant Kumar --- Changes since v7: - Fixed a kvm stat live bug for ppc. tools/perf/arch/powerpc/Makefile | 2 + tools/perf/arch/powerpc/util/Build | 1 + tools/perf/arch/powerpc/util/book3s_hv_exits.h | 33 ++

[PATCH v8 1/4] perf, kvm/{x86, s390}: Remove dependency on uapi/kvm_perf.h

2015-09-24 Thread Hemant Kumar
Its better to remove the dependency on uapi/kvm_perf.h to allow dynamic discovery of kvm events (if its needed). To do this, some extern variables have been introduced with which we can keep the generic functions generic. Signed-off-by: Hemant Kumar --- Changes since v7: - Removed __maybe_unused

[PATCH v8 2/4] perf,kvm/{x86,s390}: Remove const from kvm_events_tp

2015-09-24 Thread Hemant Kumar
This patch removes the "const" qualifier from kvm_events_tp declaration to account for the fact that powerpc will need to update this variable dynamically depending on the machine type. Signed-off-by: Hemant Kumar --- tools/perf/arch/s390/util/kvm-stat.c | 2 +- tools/perf/arch/x8

[PATCH 4/4] perf,kvm/powerpc: Add support for HCALL reasons

2015-09-24 Thread Hemant Kumar
1.70us 0.58us ( +- 4.77% ) H_RTAS 6 0.48% 0.85% 1.10us 9.25us 2.70us ( +- 48.57% ) H_PERFMON 4 0.32% 0.12% 0.41us 0.96us 0.59us ( +- 20.92% ) Total Samples:1244, Total events handled time:1916.69us. Signed-

[PATCH v7 3/4] perf,kvm/powerpc: Port perf kvm stat to powerpc

2015-09-24 Thread Hemant Kumar
.42us. Signed-off-by: Srikar Dronamraju Signed-off-by: Hemant Kumar --- Changes : - Remooved dependency on arch/uapi tools/perf/arch/powerpc/Makefile | 2 + tools/perf/arch/powerpc/util/Build | 1 + tools/perf/arch/powerpc/util/book3s_hv_exits.h | 33

[PATCH v7 2/4] perf,kvm/{x86,s390}: Remove const from kvm_events_tp

2015-09-24 Thread Hemant Kumar
This patch removes the "const" qualifier from kvm_events_tp declaration to account for the fact that powerpc will need to update this variable dynamically depending on the machine type. Signed-off-by: Hemant Kumar --- tools/perf/arch/s390/util/kvm-stat.c | 2 +- tools/perf/arch/x8

[PATCH v7 1/4] perf, kvm/{x86, s390}: Remove dependency on uapi/kvm_perf.h

2015-09-24 Thread Hemant Kumar
Its better to remove the dependency on uapi/kvm_perf.h to allow dynamic discovery of kvm events (if its needed). To do this, some extern variables have been introduced with which we can keep the generic functions generic. Signed-off-by: Hemant Kumar --- tools/perf/arch/s390/util/kvm-stat.c | 10

[PATCH] perf/probe: Search both .eh_frame and .debug_frame sections for probe location

2015-09-23 Thread Hemant Kumar
events. To avoid this issue, we need to check both the sections (.eh_frame and .debug_frame), which is done in this patch. Note that, we can always force everything into both .eh_frame and .debug_frame by : $ gcc bin.c -fasynchronous-unwind-tables -fno-dwarf2-cfi-asm

Re: [PATCH v6 1/2] perf,kvm/powerpc: Add kvm_perf.h for powerpc

2015-09-07 Thread Hemant Kumar
On 09/07/2015 10:40 AM, Michael Ellerman wrote: On Fri, 2015-09-04 at 17:51 -0300, Arnaldo Carvalho de Melo wrote: Em Tue, Sep 01, 2015 at 12:18:47PM +0530, Hemant Kumar escreveu: Should I try to process the 5 together, applying thest two first? Yes, this patchset needs to be applied

Re: [PATCH v6 1/2] perf,kvm/powerpc: Add kvm_perf.h for powerpc

2015-08-31 Thread Hemant Kumar
(cc'ing Michael Ellerman with this reply) Hi Arnaldo, On 09/01/2015 01:43 AM, Arnaldo Carvalho de Melo wrote: Em Mon, Aug 31, 2015 at 12:18:00PM +0530, Hemant Kumar escreveu: To analyze the exit events with perf, we need to export the related tracepoints through kvm_perf.h. kvm_perf.h

[PATCH v6 3/3] perf,kvm/powerpc: Add support for HCALL reasons

2015-08-30 Thread Hemant Kumar
0.58us ( +- 4.77% ) H_RTAS 6 0.48% 0.85% 1.10us 9.25us 2.70us ( +- 48.57% ) H_PERFMON 4 0.32% 0.12% 0.41us 0.96us 0.59us ( +- 20.92% ) Total Samples:1244, Total events handled time:1916.69us. Signed-off-by: He

[PATCH v6 2/3] perf,kvm/powerpc: Port perf kvm stat to powerpc

2015-08-30 Thread Hemant Kumar
1.53us 124240.15us 3486.52us ( +- 16.81% ) H_INST_STORAGE 5 0.03% 0.00% 1.88us 3.73us 2.39us ( +- 14.20% ) Total Samples:14357, Total events handled time:1203918.42us. Signed-off-by: Srikar Dronamraju Signed-off-by: Hemant Kumar --- This patch has a direct depende

[PATCH v6 1/3] perf,kvm/powerpc: Remove const from kvm_events_tp

2015-08-30 Thread Hemant Kumar
This patch removes the "const" qualifier from kvm_events_tp declaration to account for the fact that powerpc will need to update this variable dynamically depending on the machine type. Signed-off-by: Hemant Kumar --- tools/perf/arch/s390/util/kvm-stat.c | 2 +- tools/perf/arch/x8

[PATCH v6 1/2] perf,kvm/powerpc: Add kvm_perf.h for powerpc

2015-08-30 Thread Hemant Kumar
_HV has been added to the tracepoint macros. Additionally, we also need to define the generic macros (albeit, with null strings) suffix, because the preprocessor looks for them in the generic code in builtin-kvm.c. Signed-off-by: Hemant Kumar --- Changes since v5: - Moved back the tracepoint

[PATCH v6 2/2] perf, kvm/powerpc: Add hcall related info to kvm_perf.h

2015-08-30 Thread Hemant Kumar
;perf kvm stat record" is invoked to collect guest hcall statistics. Signed-off-by: Hemant Kumar --- arch/powerpc/include/uapi/asm/kvm_perf.h | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/include/uapi/asm/kvm_perf.h b/arch/powerpc/include/uapi/asm/kvm_perf.h index 68f1

Re: [PATCH v5 1/2] perf,kvm/ppc: Add kvm_perf.h for powerpc

2015-07-31 Thread Hemant Kumar
On 07/30/2015 03:52 AM, Scott Wood wrote: On Wed, 2015-07-29 at 16:07 +0530, Hemant Kumar wrote: Hi Scott, On 07/17/2015 01:40 AM, Scott Wood wrote: On Thu, 2015-07-16 at 21:18 +0530, Hemant Kumar wrote: To analyze the exit events with perf, we need kvm_perf.h to be added in the arch

Re: [PATCH v5 1/2] perf,kvm/ppc: Add kvm_perf.h for powerpc

2015-07-29 Thread Hemant Kumar
Hi Scott, On 07/17/2015 01:40 AM, Scott Wood wrote: On Thu, 2015-07-16 at 21:18 +0530, Hemant Kumar wrote: To analyze the exit events with perf, we need kvm_perf.h to be added in the arch/powerpc directory, where the kvm tracepoints needed to trace the KVM exit events are defined. This patch

[PATCH v5 2/2] perf/kvm: Support HCALL events

2015-07-16 Thread Hemant Kumar
H_EOI 20 0.74% 2.19% 2.22us 4.72us 3.17us ( +- 5.96% ) Total Samples:2690, Total events handled time:2896.94us. Signed-off-by: Hemant Kumar --- This patch has a direct dependency on : http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg91605.html Change

[PATCH v5 1/2] perf/kvm: Port perf kvm stat to powerpc

2015-07-16 Thread Hemant Kumar
events handled time:49264158.30us. Signed-off-by: Srikar Dronamraju Signed-off-by: Hemant Kumar --- This patch has a direct dependency on: http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg91603.html Changes : - Added exit reasons definitions(unlikely to change) in the

[PATCH v5 2/2] perf,kvm/ppc: Add hcall related info to kvm_perf.h

2015-07-16 Thread Hemant Kumar
quot;perf kvm stat record" to collect guest hcall statistics. Signed-off-by: Hemant Kumar --- Changes: - Not exporting the hcall related codes and names through uapi compared to previous patch. arch/powerpc/include/uapi/asm/kvm_perf_book3s.h | 4 1 file changed, 4 insertions(+) dif

[PATCH v5 1/2] perf,kvm/ppc: Add kvm_perf.h for powerpc

2015-07-16 Thread Hemant Kumar
erf.h" then can just include "kvm_perf_book3s.h". Signed-off-by: Hemant Kumar --- Changes: - Not exporting the exit reasons compared to previous patchset (suggested by Paul) arch/powerpc/include/uapi/asm/kvm_perf.h| 6 ++ arch/powerpc/include/uapi/asm/kvm_perf_book3s.

Re: [RFC PATCH] perf/kvm: Guest Symbol Resolution for powerpc

2015-06-17 Thread Hemant Kumar
Hi Arnaldo, On 06/16/2015 09:08 PM, Arnaldo Carvalho de Melo wrote: Em Tue, Jun 16, 2015 at 08:20:53AM +0530, Hemant Kumar escreveu: "perf kvm {record|report}" is used to record and report the performance profile of any workload on a guest. From the host, we can collect guest kernel

Re: [RFC PATCH] perf/kvm: Guest Symbol Resolution for powerpc

2015-06-16 Thread Hemant Kumar
Hi David, Thanks for the review. On 06/16/2015 08:23 PM, David Ahern wrote: On 6/15/15 8:50 PM, Hemant Kumar wrote: +/* + * Get the instruction pointer from the tracepoint data + */ +u64 arch__get_ip(struct perf_evsel *evsel, struct perf_sample *data) +{ +u64 tp_ip = data->ip; +

Re: [PATCH RESEND v4 1/3] kvm/powerpc: Export kvm exit reasons

2015-06-15 Thread Hemant Kumar
Hi Paul, On 06/15/2015 11:09 AM, Paul Mackerras wrote: On Mon, Jun 15, 2015 at 10:26:07AM +0530, Hemant Kumar wrote: To analyze the kvm exits with perf, we will need to map the exit codes with the exit reasons. Such a mapping exists today in trace_book3s.h. Currently its not exported to perf

[RFC PATCH] perf/kvm: Guest Symbol Resolution for powerpc

2015-06-15 Thread Hemant Kumar
tions/comments as to whether the approach is right or is there any way better than this (like using a different event to profile for, etc) to profile the guest from the host. Thank You. Signed-off-by: Hemant Kumar --- tools/perf/arch/powerpc/Makefile| 1 + tools/perf/arch/powerpc/util

[PATCH RESEND v4 2/2] perf/kvm: Support HCALL events

2015-06-14 Thread Hemant Kumar
690, Total events handled time:2896.94us. Signed-off-by: Hemant Kumar --- Changes: - Moved the uapi related changes to arch/powerpc side patchset. This patch has a dependency on : http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg90507.html which export hcall reasons through uapi. to

[PATCH RESEND v4 1/2] perf/kvm: Port perf kvm to powerpc

2015-06-14 Thread Hemant Kumar
Samples:14182, Total events handled time:49264158.30us. Signed-off-by: Srikar Dronamraju Signed-off-by: Hemant Kumar --- Patch Resend : - Added few more people to cc list. - Rebased it to current tip. Changes : - Moved the uapi related changes to arch/powerpc patchset. This patch has a dependency on :

[PATCH RESEND v4 2/3] kvm/powerpc: Add exit reason for return code 0x0

2015-06-14 Thread Hemant Kumar
This patch adds an exit reason "RETURN_TO_HOST" for the return code 0x0. Note that this is not related to any interrupt vector address, but this is added just to make sure that perf doesn't complain if and when a kvm exit happens with a trap code as 0x0. Signed-off-by: Hemant K

[PATCH RESEND v4 3/3] kvm/powerpc: Export HCALL reason codes

2015-06-14 Thread Hemant Kumar
/powerpc/kvm/trace_hv.h to arch/powerpc/include/uapi/asm/trace_hcall_pseries.h. Signed-off-by: Hemant Kumar --- Changes : - Made name space changes to indicate changes related to pseries (Suggested by Scott Wood) arch/powerpc/include/asm/hvcall.h | 120

[PATCH RESEND v4 1/3] kvm/powerpc: Export kvm exit reasons

2015-06-14 Thread Hemant Kumar
specific. Generic "kvm_perf.h" then can just include "kvm_perf_book3s.h". Signed-off-by: Hemant Kumar --- Resend : - Rebased to the latest tip. - Added few people to cc list. Changes : - Moved the uapi related changes from the perf side patchset to this patchset. - Ma

Re: [PATCH v3 1/2] perf/kvm: Port perf kvm to powerpc

2015-05-20 Thread Hemant Kumar
Hi Scott, On 05/13/2015 08:52 AM, Scott Wood wrote: On Tue, 2015-05-12 at 21:34 +0530, Hemant Kumar wrote: Hi Scott, On 05/12/2015 03:38 AM, Scott Wood wrote: On Fri, 2015-05-08 at 06:37 +0530, Hemant Kumar wrote: diff --git a/arch/powerpc/include/uapi/asm/kvm_perf.h b/arch/powerpc/include

[PATCH v4 2/2] perf/kvm: Support HCALL events

2015-05-20 Thread Hemant Kumar
690, Total events handled time:2896.94us. Signed-off-by: Hemant Kumar --- Changes: - Moved the uapi related changes to arch/powerpc side patchset. This patch has a dependency on : http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg89487.html which export hcall reasons through uapi. to

[PATCH v4 1/2] perf/kvm: Port perf kvm to powerpc

2015-05-20 Thread Hemant Kumar
Samples:14182, Total events handled time:49264158.30us. Signed-off-by: Srikar Dronamraju Signed-off-by: Hemant Kumar --- Changes : - Moved the uapi related changes to arch/powerpc patchset. This patch has a dependency on : http://www.mail-archive.com/linuxppc-dev@lists.ozlabs.org/msg89485.html which ex

[PATCH v4 3/3] kvm/powerpc: Export HCALL reason codes

2015-05-20 Thread Hemant Kumar
/powerpc/kvm/trace_hv.h to arch/powerpc/include/uapi/asm/trace_hcall_pseries.h. Signed-off-by: Hemant Kumar --- Changes : - Made name space changes to indicate changes related to pseries (Suggested by Scott Wood) arch/powerpc/include/asm/hvcall.h | 120

[PATCH v4 2/3] kvm/powerpc: Add exit reason for return code 0x0

2015-05-20 Thread Hemant Kumar
This patch adds an exit reason "RETURN_TO_HOST" for the return code 0x0. Note that this is not related to any interrupt vector address, but this is added just to make sure that perf doesn't complain if and when a kvm exit happens with a trap code as 0x0. Signed-off-by: Hemant K

[PATCH v4 1/3] kvm/powerpc: Export kvm exit reasons

2015-05-20 Thread Hemant Kumar
specific. Generic "kvm_perf.h" then can just include "kvm_perf_book3s.h". Signed-off-by: Hemant Kumar --- Changes : - Moved the uapi related changes from the perf side patchset to this patchset. - Made name space changes to indicate changes specific to book3s (Suggest

[RFC PATCH 1/1] perf/script: Script to display the ganged exits count on powerpc

2015-05-14 Thread Hemant Kumar
d exits for process 13988 : 25314 ======= Signed-off-by: Hemant Kumar --- tools/perf/scripts/python/gang_exits.py | 65 + 1 file changed, 65 insertions(+) create mode 100644 tools/perf/scripts/python/gang_exits.py diff --git a/

[RFC PATCH 0/1] perf/script: Ganged exits and VM topology

2015-05-14 Thread Hemant Kumar
at the patch and let me know your feedback. Thanks, --- Hemant Kumar (1): perf/script: Python script to display the ganged exits count on powerpc tools/perf/scripts/python/gang_exits.py | 65 + 1 file changed, 65 insertions(+) create mode 100644 tools

Re: [PATCH v3 3/3] kvm/powerpc: Export HCALL reason codes

2015-05-12 Thread Hemant Kumar
On 05/12/2015 03:44 AM, Scott Wood wrote: On Fri, 2015-05-08 at 06:23 +0530, Hemant Kumar wrote: For perf to analyze the KVM events like hcalls, we need the hypervisor calls and their codes to be exported through uapi. This patch moves most of the pSeries hcall codes from arch/powerpc/include

Re: [PATCH v3 1/2] perf/kvm: Port perf kvm to powerpc

2015-05-12 Thread Hemant Kumar
Hi Scott, On 05/12/2015 03:38 AM, Scott Wood wrote: On Fri, 2015-05-08 at 06:37 +0530, Hemant Kumar wrote: From: Srikar Dronamraju perf kvm can be used to analyze guest exit reasons. This support already exists in x86. Hence, porting it to powerpc. - To trace KVM events : perf kvm stat

Re: [PATCH v3 1/2] perf/kvm: Port perf kvm to powerpc

2015-05-07 Thread Hemant Kumar
On 05/08/2015 09:58 AM, Ingo Molnar wrote: * Hemant Kumar wrote: # perf kvm stat report -p 60515 Analyze events for pid(s) 60515, all VCPUs: VM-EXITSamples Samples% Time%Min Time Max Time Avg time H_DATA_STORAGE 500635.30% 0.13

[PATCH v3 2/2] perf/kvm: Support HCALL events

2015-05-07 Thread Hemant Kumar
690, Total events handled time:2896.94us. Signed-off-by: Hemant Kumar --- Patch has a dependency on https://patchwork.ozlabs.org/patch/469841/ which exports the HCALL reason codes to perf. arch/powerpc/include/uapi/asm/kvm_perf.h | 4 +++ tools/perf/arch/powerpc/util/kvm-stat.c | 61 +++

[PATCH v3 1/2] perf/kvm: Port perf kvm to powerpc

2015-05-07 Thread Hemant Kumar
Samples:14182, Total events handled time:49264158.30us. Signed-off-by: Srikar Dronamraju Signed-off-by: Hemant Kumar --- Patch has a dependency on : https://patchwork.ozlabs.org/patch/469839/ which exports the exit reasons to perf through uapi. Changes: - Original series split into two patchse

[PATCH v3 3/3] kvm/powerpc: Export HCALL reason codes

2015-05-07 Thread Hemant Kumar
/powerpc/kvm/trace_hv.h to arch/powerpc/include/uapi/asm/trace_hcall.h. Signed-off-by: Hemant Kumar --- arch/powerpc/include/asm/hvcall.h | 120 +-- arch/powerpc/include/uapi/asm/hcall_codes.h | 123 arch/powerpc/include/uapi/asm

[PATCH v3 2/3] kvm/powerpc: Add exit reason for return code 0x0

2015-05-07 Thread Hemant Kumar
This patch adds an exit reason "RETURN_TO_HOST" for the return code 0x0. Signed-off-by: Hemant Kumar --- arch/powerpc/include/uapi/asm/trace_book3s.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/include/uapi/asm/trace_book3s.h b/arch/powerpc/include/uapi/asm/trac

[PATCH v3 1/3] kvm/powerpc: Export kvm exit reasons

2015-05-07 Thread Hemant Kumar
ot;arch/powerpc/include/uapi/asm/trace_book3s.h". Accordingly change the include files in "trace_hv.h" and "trace_pr.h". Signed-off-by: Hemant Kumar --- Changes : - Original patchset split into 2 patchsets now: for perf and powerpc side changes. arch/powe

[PATCH v2 5/5] perf/kvm: HCALL events analysis

2015-04-20 Thread Hemant Kumar
0 0.74% 2.19% 2.22us 4.72us 3.17us ( +- 5.96% ) Total Samples:2690, Total events handled time:2896.94us. Signed-off-by: Hemant Kumar --- arch/powerpc/include/uapi/asm/kvm_perf.h | 4 +++ tools/perf/arch/powerpc/util/kvm-stat.c | 61

[PATCH v2 4/5] kvm/powerpc: Move HCALL reason codes to uapi

2015-04-20 Thread Hemant Kumar
from arch/powerpc/kvm/trace_hv.h to arch/powerpc/include/uapi/asm/trace_hcall.h. Signed-off-by: Hemant Kumar --- arch/powerpc/include/asm/hvcall.h | 120 +-- arch/powerpc/include/uapi/asm/hcall_codes.h | 123 arch/powerpc/include/uapi

[PATCH v2 3/5] perf/kvm: KVM exit events analysis

2015-04-20 Thread Hemant Kumar
240 1.69% 0.00%0.69us 10.67us 1.33us ( +- 5.34% ) Total Samples:14182, Total events handled time:49264158.30us. Signed-off-by: Srikar Dronamraju Signed-off-by: Hemant Kumar --- arch/powerpc/include/uapi/asm/kvm_perf.h | 15 +++ tools/perf/arch

[PATCH v2 2/5] kvm/powerpc: Add exit reason for return code 0x0

2015-04-20 Thread Hemant Kumar
This patch adds an exit reason "RETURN_TO_HOST" for the return code 0x0. Signed-off-by: Hemant Kumar --- arch/powerpc/include/uapi/asm/trace_book3s.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/include/uapi/asm/trace_book3s.h b/arch/powerpc/include/uapi/asm/trac

[PATCH v2 1/5] kvm/powerpc: Export exit reasons as uapi

2015-04-20 Thread Hemant Kumar
ot;arch/powerpc/include/uapi/asm/trace_book3s.h". We will also need to change the path of "trace_book3s.h" included in files "trace_hv.h" and "trace_pr.h". Signed-off-by: Hemant Kumar --- arch/powerpc/include/uapi/asm/trace_book3s.h | 32 +++

[PATCH v2 0/5] KVM events analysis on powerpc with perf

2015-04-20 Thread Hemant Kumar
quot;perf kvm stat report" does all the post processing of parsing the events captured and classifying them according to their exit reasons (which are already availabe in "trace_book3s.h"). Similar method is used with hcall analysis. Thanks, Hemant Kumar

Re: [PATCH v1 0/2] perf/kvm: perf-kvm-stat on powerpc

2015-03-23 Thread Hemant Kumar
nts, use: # perf kvm stat report or # perf kvm stat report --event=vmexit This should show the exit events along with the exit reasons. The second patch in this series adds support to show the hcall events too with: # perf kvm stat report --event=syscall --- Hemant Kumar (1): perf/kvm: perf-

  1   2   >