Re: [RFC][PATCH] perf: Add a few generic stalled-cycles events

2012-10-14 Thread Anshuman Khandual
On 10/12/2012 06:58 AM, Sukadev Bhattiprolu wrote: From 89cb6a25b9f714e55a379467a832ee015014ed11 Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Tue, 18 Sep 2012 10:59:01 -0700 Subject: [PATCH] perf: Add a few generic stalled-cycles events The existing

Re: [RFC][PATCH] perf: Add a few generic stalled-cycles events

2012-10-15 Thread Anshuman Khandual
On 10/15/2012 10:53 PM, Arun Sharma wrote: On 10/15/12 8:55 AM, Robert Richter wrote: [..] Perf tool works then out-of-the-box with: $ perf record -e cpu/stalled-cycles-fixed-point/ ... The event string can easily be reused by other architectures as a quasi standard. I like Robert's

[PATCH 3/5] powerpc, perf: Add new BHRB related generic functions, data and flags

2013-04-16 Thread Anshuman Khandual
Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/include/asm/perf_event_server.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/include/asm/perf_event_server.h b/arch/powerpc/include/asm/perf_event_server.h index 57b42da..3f0c15c 100644

[PATCH 4/5] powerpc, perf: Define BHRB generic functions, data and flags for POWER8

2013-04-16 Thread Anshuman Khandual
Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/power8-pmu.c | 57 +- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/perf/power8-pmu.c b/arch/powerpc/perf/power8-pmu.c index 106ae0b..153408c

[PATCH 5/5] powerpc, perf: Enable branch stack sampling framework support with BHRB

2013-04-16 Thread Anshuman Khandual
This patch provides basic enablement for perf branch stack sampling framework on POWER8 processor with a new PMU feature called BHRB (Branch History Rolling Buffer). Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/core-book3s.c | 96

[PATCH 2/5] powerpc, perf: Add basic assembly code to read BHRB entries on POWER8

2013-04-16 Thread Anshuman Khandual
Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/Makefile | 2 +- arch/powerpc/perf/bhrb.S | 34 ++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 arch/powerpc/perf/bhrb.S diff --git a/arch/powerpc/perf

[PATCH 1/5] powerpc, perf: Add new BHRB related instructions on POWER8

2013-04-16 Thread Anshuman Khandual
This patch adds new instructions support for reading various BHRB entries and also clearing the BHRB buffer. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/include/asm/ppc-opcode.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/include/asm

[PATCH 0/5] powerpc, perf: BHRB based branch stack enablement on POWER8

2013-04-16 Thread Anshuman Khandual
% top libc-2.11.2.so[k] vfprintf libc-2.11.2.so[k] vfprintf 0.92% top top [k] _init [unknown] [k] 0x0fe037f4 Anshuman Khandual (5

[PATCH V2 0/5] powerpc, perf: BHRB based branch stack enablement on POWER8

2013-04-16 Thread Anshuman Khandual
% top top [k] _init [unknown] [k] 0x0fe037f4 Changes in V2 -- - Added copyright messages to the newly created files - Modified couple of commit messages Anshuman Khandual (5): powerpc, perf: Add new BHRB related

[PATCH V2 5/5] powerpc, perf: Enable branch stack sampling framework support with BHRB

2013-04-16 Thread Anshuman Khandual
This patch provides basic enablement for perf branch stack sampling framework on POWER8 processor with a new PMU feature called BHRB (Branch History Rolling Buffer). Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/core-book3s.c | 96

[PATCH V2 1/5] powerpc, perf: Add new BHRB related instructions on POWER8

2013-04-16 Thread Anshuman Khandual
This patch adds new instructions support for reading various BHRB entries and also clearing the BHRB buffer. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/include/asm/ppc-opcode.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/powerpc/include/asm

[PATCH V2 4/5] powerpc, perf: Define BHRB generic functions, data and flags for POWER8

2013-04-16 Thread Anshuman Khandual
Defines BHRB functions, data and flags for POWER8 Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/power8-pmu.c | 57 +- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/perf/power8-pmu.c b/arch

[PATCH V2 2/5] powerpc, perf: Add basic assembly code to read BHRB entries on POWER8

2013-04-16 Thread Anshuman Khandual
This patch adds the basic assembly code to read BHRB entries Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/Makefile | 2 +- arch/powerpc/perf/bhrb.S | 44 2 files changed, 45 insertions(+), 1 deletion(-) create

[PATCH V2 3/5] powerpc, perf: Add new BHRB related generic functions, data and flags

2013-04-16 Thread Anshuman Khandual
This patch adds some new BHRB related generic functions, data and flags Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/include/asm/perf_event_server.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/include/asm/perf_event_server.h b/arch

Re: [PATCH V2 2/5] powerpc, perf: Add basic assembly code to read BHRB entries on POWER8

2013-04-16 Thread Anshuman Khandual
On 04/16/2013 10:53 PM, Segher Boessenkool wrote: +/* r3 = n (where n = [0-1023]) + * The maximum number of BHRB entries supported with PPC_MFBHRBE instruction + * is 1024. We have limited number of table entries here as POWER8 implements + * 32 BHRB entries. + */ + +/* .global read_bhrb

Re: [PATCH V2 5/5] powerpc, perf: Enable branch stack sampling framework support with BHRB

2013-04-17 Thread Anshuman Khandual
On 04/17/2013 12:38 PM, Michael Ellerman wrote: On Tue, Apr 16, 2013 at 09:24:10PM +0530, Anshuman Khandual wrote: This patch provides basic enablement for perf branch stack sampling framework on POWER8 processor with a new PMU feature called BHRB (Branch History Rolling Buffer). Signed

Re: [PATCH V2 5/5] powerpc, perf: Enable branch stack sampling framework support with BHRB

2013-04-17 Thread Anshuman Khandual
On 04/17/2013 05:37 PM, Anshuman Khandual wrote: On 04/17/2013 12:38 PM, Michael Ellerman wrote: On Tue, Apr 16, 2013 at 09:24:10PM +0530, Anshuman Khandual wrote: This patch provides basic enablement for perf branch stack sampling framework on POWER8 processor with a new PMU feature called

[PATCH V3 3/5] powerpc, perf: Add new BHRB related generic functions, data and flags

2013-04-18 Thread Anshuman Khandual
This patch adds couple of generic functions to power_pmu structure which would configure the BHRB and it's filters. It also adds representation of the number of BHRB entries present on the PMU. A new PMU flag PPMU_BHRB would indicate presence of BHRB feature. Signed-off-by: Anshuman Khandual

[PATCH V3 1/5] powerpc, perf: Add new BHRB related instructions for POWER8

2013-04-18 Thread Anshuman Khandual
This patch adds new POWER8 instruction encoding for reading the BHRB buffer entries and also clearing it. Encoding for clrbhrb instruction is straight forward. But mfbhrbe encoding involves reading a certain index of BHRB buffer into a particular GPR register. Signed-off-by: Anshuman Khandual

[PATCH V3 5/5] powerpc, perf: Enable branch stack sampling framework

2013-04-18 Thread Anshuman Khandual
passing to the user space. This also enables processing of BHRB data and converts them into generic perf branch stack data format. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/include/asm/perf_event_server.h | 1 + arch/powerpc/perf/core-book3s.c

[PATCH V3 0/5] powerpc, perf: BHRB based branch stack enablement on POWER8

2013-04-18 Thread Anshuman Khandual
from perf_event_bhrb.c into core-book3s.c - Improved documentation for the patchset Anshuman Khandual (5): powerpc, perf: Add new BHRB related instructions for POWER8 powerpc, perf: Add basic assembly code to read BHRB entries on POWER8 powerpc, perf: Add new BHRB related generic functions

[PATCH V3 4/5] powerpc, perf: Define BHRB generic functions, data and flags for POWER8

2013-04-18 Thread Anshuman Khandual
This patch populates BHRB specific data for power_pmu structure. It also implements POWER8 specific BHRB filter and configuration functions. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/power8-pmu.c | 57 +- 1 file

[PATCH V3 2/5] powerpc, perf: Add basic assembly code to read BHRB entries on POWER8

2013-04-18 Thread Anshuman Khandual
-deterministic results. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/Makefile | 2 +- arch/powerpc/perf/bhrb.S | 44 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 arch/powerpc/perf/bhrb.S diff

Re: [PATCH V3 1/5] powerpc, perf: Add new BHRB related instructions for POWER8

2013-04-22 Thread Anshuman Khandual
On 04/22/2013 05:11 AM, Michael Ellerman wrote: On Thu, Apr 18, 2013 at 05:56:12PM +0530, Anshuman Khandual wrote: This patch adds new POWER8 instruction encoding for reading the BHRB buffer entries and also clearing it. Encoding for clrbhrb instruction is straight forward. Which is clear

Re: [PATCH V3 1/5] powerpc, perf: Add new BHRB related instructions for POWER8

2013-04-22 Thread Anshuman Khandual
On 04/22/2013 08:20 AM, Michael Neuling wrote: Michael Ellerman mich...@ellerman.id.au wrote: On Mon, Apr 22, 2013 at 11:13:43AM +1000, Michael Neuling wrote: Michael Ellerman mich...@ellerman.id.au wrote: On Thu, Apr 18, 2013 at 05:56:12PM +0530, Anshuman Khandual wrote: This patch adds

Re: [PATCH V3 1/5] powerpc, perf: Add new BHRB related instructions for POWER8

2013-04-22 Thread Anshuman Khandual
On 04/22/2013 08:20 AM, Michael Neuling wrote: Michael Ellerman mich...@ellerman.id.au wrote: On Mon, Apr 22, 2013 at 11:13:43AM +1000, Michael Neuling wrote: Michael Ellerman mich...@ellerman.id.au wrote: On Thu, Apr 18, 2013 at 05:56:12PM +0530, Anshuman Khandual wrote: This patch adds

Re: how to implement platform specific per process parameter?

2012-08-06 Thread Anshuman Khandual
There are 4 options: 1. [not a kernel interface] use ptrace to execute the register changing command inside the specified pid. The next context switch saves the new value in the thread_struct. Dirty hack. 2. Add a new syscall which would receive pid + register value and do the job. A bit

[PATCH] powerpc, perf: Change PMU flag values representation from decimal to hex

2012-11-16 Thread Anshuman Khandual
Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/include/asm/perf_event_server.h | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/perf_event_server.h b/arch/powerpc/include/asm/perf_event_server.h

Re: [PATCH] powerpc, perf: Change PMU flag values representation from decimal to hex

2012-11-18 Thread Anshuman Khandual
On 11/16/2012 05:12 PM, Paul Mackerras wrote: On Fri, Nov 16, 2012 at 02:29:04PM +0530, Anshuman Khandual wrote: Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com That's not a sufficient description of why you are making this change. In particular, what is the motivation

Re: [PATCH V2 0/6] perf: New conditional branch filter

2013-09-09 Thread Anshuman Khandual
On 09/10/2013 07:36 AM, Michael Ellerman wrote: On Fri, 2013-08-30 at 09:54 +0530, Anshuman Khandual wrote: This patchset is the re-spin of the original branch stack sampling patchset which introduced new PERF_SAMPLE_BRANCH_COND filter. This patchset also enables SW based branch filtering

Re: [PATCH 1/8][v4] powerpc/perf: Rename Power8 macros to start with PME

2013-09-17 Thread Anshuman Khandual
On 09/14/2013 06:19 AM, Sukadev Bhattiprolu wrote: We use helpers like GENERIC_EVENT_ATTR() to list the generic events in sysfs. To avoid name collisions, GENERIC_EVENT_ATTR() requires the perf event macros to start with PME. We got all the raw event codes covered for P7 with the help of

Re: [PATCH 8/8][v4] powerpc/perf: Export Power7 memory hierarchy info to user space.

2013-09-18 Thread Anshuman Khandual
On 09/14/2013 06:19 AM, Sukadev Bhattiprolu wrote: On Power7, the DCACHE_SRC field in MMCRA register identifies the memory hierarchy level (eg: L2, L3 etc) from which a data-cache miss for a marked instruction was satisfied. Use the 'perf_mem_data_src' object to export this hierarchy level

Re: [PATCH 8/8][v4] powerpc/perf: Export Power7 memory hierarchy info to user space.

2013-09-19 Thread Anshuman Khandual
On 09/14/2013 06:19 AM, Sukadev Bhattiprolu wrote: +static void power7_get_mem_data_src(union perf_mem_data_src *dsrc, + struct pt_regs *regs) +{ + u64 idx; + u64 mmcra = regs-dsisr; + u64 addr; + int ret; + unsigned int instr; + + if (mmcra

[V3 04/10] x86, perf: Add conditional branch filtering support

2013-10-16 Thread Anshuman Khandual
This patch adds conditional branch filtering support, enabling it for PERF_SAMPLE_BRANCH_COND in perf branch stack sampling framework by utilizing an available software filter X86_BR_JCC. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Reviewed-by: Stephane Eranian eran...@google.com

[V3 07/10] powerpc, lib: Add new branch instruction analysis support functions

2013-10-16 Thread Anshuman Khandual
where. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/include/asm/code-patching.h | 30 ++ arch/powerpc/lib/code-patching.c | 54 ++-- 2 files changed, 82 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include

[V3 02/10] powerpc, perf: Enable conditional branch filter for POWER8

2013-10-16 Thread Anshuman Khandual
Enables conditional branch filter support for POWER8 utilizing MMCRA register based filter and also invalidates a BHRB branch filter combination involving conditional branches. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/power8-pmu.c | 10 ++ 1 file

[V3 01/10] perf: New conditional branch filter criteria in branch stack sampling

2013-10-16 Thread Anshuman Khandual
of instructions. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Reviewed-by: Stephane Eranian eran...@google.com --- include/uapi/linux/perf_event.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index

[V3 10/10] powerpc, perf: Cleanup SW branch filter list look up

2013-10-16 Thread Anshuman Khandual
This patch adds enumeration for all available SW branch filters in powerpc book3s code and also streamlines the look for the SW branch filter entries while trying to figure out which all branch filters can be supported in SW. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch

[V3 05/10] perf, documentation: Description for conditional branch filter

2013-10-16 Thread Anshuman Khandual
Adding documentation support for conditional branch filter. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Reviewed-by: Stephane Eranian eran...@google.com --- tools/perf/Documentation/perf-record.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf

[V3 00/10] perf: New conditional branch filter

2013-10-16 Thread Anshuman Khandual
This patchset is the re-spin of the original branch stack sampling patchset which introduced new PERF_SAMPLE_BRANCH_COND branch filter. This patchset also enables SW based branch filtering support for book3s powerpc platforms which have PMU HW backed branch stack sampling

[V3 09/10] power8, perf: Change BHRB branch filter configuration

2013-10-16 Thread Anshuman Khandual
combinations PMU will pass it on to the SW. Also the combination of PERF_SAMPLE_BRANCH_ANY_CALL and PERF_SAMPLE_BRANCH_COND can now be handled in SW, hence we dont error them out anymore. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/power8-pmu.c | 73

[V3 06/10] powerpc, perf: Change the name of HW PMU branch filter tracking variable

2013-10-16 Thread Anshuman Khandual
This patch simply changes the name of the variable from bhrb_filter to bhrb_hw_filter in order to add one more variable which will track SW filters in generic powerpc book3s code which will be implemented in the subsequent patch. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com

[V3 03/10] perf, tool: Conditional branch filter 'cond' added to perf record

2013-10-16 Thread Anshuman Khandual
Adding perf record support for new branch stack filter criteria PERF_SAMPLE_BRANCH_COND. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Reviewed-by: Stephane Eranian eran...@google.com --- tools/perf/builtin-record.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf

[V3 08/10] powerpc, perf: Enable SW filtering in branch stack sampling framework

2013-10-16 Thread Anshuman Khandual
all. Its the PMU code's responsibility to uphold this protocol to be able to conform to the overall OR semantic of perf branch stack sampling framework. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/include/asm/perf_event_server.h | 6 +- arch/powerpc

Re: [PATCH 02/10][v6] powerpc/Power7: detect load/store instructions

2013-10-16 Thread Anshuman Khandual
On 10/16/2013 01:55 PM, David Laight wrote: Implement instr_is_load_store_2_06() to detect whether a given instruction is one of the fixed-point or floating-point load/store instructions in the POWER Instruction Set Architecture v2.06. ... The op code encoding is dependent on the ISA version

Re: [V3 01/10] perf: New conditional branch filter criteria in branch stack sampling

2013-11-26 Thread Anshuman Khandual
On 11/26/2013 11:36 AM, m...@ellerman.id.au wrote: Ideally your commit subject would contain a verb, preferably in the present tense. I think simply perf: Add PERF_SAMPLE_BRANCH_COND would be clearer. Sure, will change it. On Wed, 2013-16-10 at 06:56:48 UTC, Anshuman Khandual wrote

Re: [V3 02/10] powerpc, perf: Enable conditional branch filter for POWER8

2013-11-26 Thread Anshuman Khandual
On 11/26/2013 11:36 AM, m...@ellerman.id.au wrote: On Wed, 2013-16-10 at 06:56:49 UTC, Anshuman Khandual wrote: Enables conditional branch filter support for POWER8 utilizing MMCRA register based filter and also invalidates a BHRB branch filter combination involving conditional branches

Re: [V3 01/10] perf: New conditional branch filter criteria in branch stack sampling

2013-12-03 Thread Anshuman Khandual
On 11/26/2013 03:45 PM, Anshuman Khandual wrote: On 11/26/2013 11:36 AM, m...@ellerman.id.au wrote: Ideally your commit subject would contain a verb, preferably in the present tense. I think simply perf: Add PERF_SAMPLE_BRANCH_COND would be clearer. Sure, will change it. On Wed, 2013

[PATCH V4 05/10] perf, documentation: Description for conditional branch filter

2013-12-04 Thread Anshuman Khandual
Adding documentation support for conditional branch filter. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Reviewed-by: Stephane Eranian eran...@google.com --- tools/perf/Documentation/perf-record.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf

[PATCH V4 01/10] perf: Add PERF_SAMPLE_BRANCH_COND

2013-12-04 Thread Anshuman Khandual
of instructions. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Reviewed-by: Stephane Eranian eran...@google.com --- include/uapi/linux/perf_event.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index

[PATCH V4 10/10] powerpc, perf: Cleanup SW branch filter list look up

2013-12-04 Thread Anshuman Khandual
This patch adds enumeration for all available SW branch filters in powerpc book3s code and also streamlines the look for the SW branch filter entries while trying to figure out which all branch filters can be supported in SW. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch

[PATCH V4 00/10] perf: New conditional branch filter

2013-12-04 Thread Anshuman Khandual
This patchset is the re-spin of the original branch stack sampling patchset which introduced new PERF_SAMPLE_BRANCH_COND branch filter. This patchset also enables SW based branch filtering support for book3s powerpc platforms which have PMU HW backed branch stack sampling

[PATCH V4 08/10] powerpc, perf: Enable SW filtering in branch stack sampling framework

2013-12-04 Thread Anshuman Khandual
all. Its the PMU code's responsibility to uphold this protocol to be able to conform to the overall OR semantic of perf branch stack sampling framework. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/include/asm/perf_event_server.h | 6 +- arch/powerpc

[PATCH V4 09/10] power8, perf: Change BHRB branch filter configuration

2013-12-04 Thread Anshuman Khandual
combinations PMU will pass it on to the SW. Also the combination of PERF_SAMPLE_BRANCH_ANY_CALL and PERF_SAMPLE_BRANCH_COND can now be handled in SW, hence we dont error them out anymore. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/power8-pmu.c | 73

[PATCH V4 06/10] powerpc, perf: Change the name of HW PMU branch filter tracking variable

2013-12-04 Thread Anshuman Khandual
This patch simply changes the name of the variable from bhrb_filter to bhrb_hw_filter in order to add one more variable which will track SW filters in generic powerpc book3s code which will be implemented in the subsequent patch. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com

[PATCH V4 07/10] powerpc, lib: Add new branch instruction analysis support functions

2013-12-04 Thread Anshuman Khandual
where. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/include/asm/code-patching.h | 30 ++ arch/powerpc/lib/code-patching.c | 54 ++-- 2 files changed, 82 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include

[PATCH V4 02/10] powerpc, perf: Enable conditional branch filter for POWER8

2013-12-04 Thread Anshuman Khandual
Enables conditional branch filter support for POWER8 utilizing MMCRA register based filter and also invalidates any BHRB branch filter combination. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/power8-pmu.c | 10 ++ 1 file changed, 10 insertions

[PATCH V4 03/10] perf, tool: Conditional branch filter 'cond' added to perf record

2013-12-04 Thread Anshuman Khandual
Adding perf record support for new branch stack filter criteria PERF_SAMPLE_BRANCH_COND. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Reviewed-by: Stephane Eranian eran...@google.com --- tools/perf/builtin-record.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf

[PATCH V4 04/10] x86, perf: Add conditional branch filtering support

2013-12-04 Thread Anshuman Khandual
This patch adds conditional branch filtering support, enabling it for PERF_SAMPLE_BRANCH_COND in perf branch stack sampling framework by utilizing an available software filter X86_BR_JCC. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Reviewed-by: Stephane Eranian eran...@google.com

Re: [PATCH RFC/RFT v3 6/9] powerpc: move cacheinfo sysfs to generic cacheinfo infrastructure

2014-03-06 Thread Anshuman Khandual
On 02/19/2014 09:36 PM, Sudeep Holla wrote: From: Sudeep Holla sudeep.ho...@arm.com This patch removes the redundant sysfs cacheinfo code by making use of the newly introduced generic cacheinfo infrastructure. Signed-off-by: Sudeep Holla sudeep.ho...@arm.com Cc: Benjamin Herrenschmidt

Re: [PATCH RFC/RFT v3 6/9] powerpc: move cacheinfo sysfs to generic cacheinfo infrastructure

2014-03-06 Thread Anshuman Khandual
On 03/07/2014 09:36 AM, Anshuman Khandual wrote: On 02/19/2014 09:36 PM, Sudeep Holla wrote: From: Sudeep Holla sudeep.ho...@arm.com This patch removes the redundant sysfs cacheinfo code by making use of the newly introduced generic cacheinfo infrastructure. Signed-off-by: Sudeep Holla

[V5 2/4] perf, tool: Conditional branch filter 'cond' added to perf record

2014-03-07 Thread Anshuman Khandual
Adding perf record support for new branch stack filter criteria PERF_SAMPLE_BRANCH_COND. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Reviewed-by: Stephane Eranian eran...@google.com --- tools/perf/builtin-record.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf

[V5 1/4] perf: Add PERF_SAMPLE_BRANCH_COND

2014-03-07 Thread Anshuman Khandual
This patch introduces new branch filter PERF_SAMPLE_BRANCH_COND which will extend the existing perf ABI. Various architectures can provide this functionality with either with HW filtering support (if present) or with SW filtering of captured branch instructions. Signed-off-by: Anshuman Khandual

[V5 0/4] perf: New conditional branch filter

2014-03-07 Thread Anshuman Khandual
...@kernel.crashing.org Cc: Michael Ellerman mich...@ellerman.id.au Cc: Peter Zijlstra a.p.zijls...@chello.nl Anshuman Khandual (4): perf: Add PERF_SAMPLE_BRANCH_COND perf, tool: Conditional branch filter 'cond' added to perf record x86, perf: Add conditional branch filtering support perf

[V5 4/4] perf, documentation: Description for conditional branch filter

2014-03-07 Thread Anshuman Khandual
Adding documentation support for conditional branch filter. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Reviewed-by: Stephane Eranian eran...@google.com --- tools/perf/Documentation/perf-record.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf

[V5 3/4] x86, perf: Add conditional branch filtering support

2014-03-07 Thread Anshuman Khandual
This patch adds conditional branch filtering support, enabling it for PERF_SAMPLE_BRANCH_COND in perf branch stack sampling framework by utilizing an available software filter X86_BR_JCC. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Reviewed-by: Stephane Eranian eran...@google.com

Re: [PATCH RFC/RFT v3 6/9] powerpc: move cacheinfo sysfs to generic cacheinfo infrastructure

2014-03-20 Thread Anshuman Khandual
On 03/10/2014 04:42 PM, Sudeep Holla wrote: Hi Anshuman, On 07/03/14 06:14, Anshuman Khandual wrote: On 03/07/2014 09:36 AM, Anshuman Khandual wrote: On 02/19/2014 09:36 PM, Sudeep Holla wrote: From: Sudeep Holla sudeep.ho...@arm.com This patch removes the redundant sysfs cacheinfo code

Re: [PATCH] powerpc, perf: Fix processing conditions for invalid BHRB entries

2013-05-06 Thread Anshuman Khandual
On 05/06/2013 04:41 PM, Michael Neuling wrote: Anshuman Khandual khand...@linux.vnet.ibm.com wrote: Fixing some conditions during BHRB entry processing. I think we can simplify this a lot more... something like the below. I feel that the conditional handling of the invalid BHRB entries

Re: [PATCH 1/2] perf/Power7: Save dcache_src fields in sample record.

2013-06-10 Thread Anshuman Khandual
AFAICT, Power7 supports one extra level in the cache-hierarchy, so we propose to add a new cache level, REM_CCE3 shown above. To maintain consistency in terminology (i.e 2-hops = remote, 3-hops = distant), I propose leaving the REM_MEM1 unused and adding another level, REM_MEM3.

[PATCH] powerpc, perf: Fix processing conditions for invalid BHRB entries

2013-05-06 Thread Anshuman Khandual
Fixing some conditions during BHRB entry processing. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/core-book3s.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c

[PATCH] powerpc, perf: Clear out branch entries to avoid any previous stale values

2013-05-06 Thread Anshuman Khandual
The 'to' field inside branch entries might contain stale values from previous PMU interrupt instances which had indirect branches. So clear all the values before reading a fresh set of BHRB entries after a PMU interrupt. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch

[PATCH V4 3/5] powerpc, perf: Add new BHRB related generic functions, data and flags

2013-04-22 Thread Anshuman Khandual
This patch adds couple of generic functions to power_pmu structure which would configure the BHRB and it's filters. It also adds representation of the number of BHRB entries present on the PMU. A new PMU flag PPMU_BHRB would indicate presence of BHRB feature. Signed-off-by: Anshuman Khandual

[PATCH V4 4/5] powerpc, perf: Define BHRB generic functions, data and flags for POWER8

2013-04-22 Thread Anshuman Khandual
This patch populates BHRB specific data for power_pmu structure. It also implements POWER8 specific BHRB filter and configuration functions. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/power8-pmu.c | 57 +- 1 file

[PATCH V4 2/5] powerpc, perf: Add basic assembly code to read BHRB entries on POWER8

2013-04-22 Thread Anshuman Khandual
-deterministic results. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/Makefile | 2 +- arch/powerpc/perf/bhrb.S | 44 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 arch/powerpc/perf/bhrb.S diff

[PATCH V4 5/5] powerpc, perf: Enable branch stack sampling framework

2013-04-22 Thread Anshuman Khandual
passing to the user space. This also enables processing of BHRB data and converts them into generic perf branch stack data format. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/include/asm/perf_event_server.h | 1 + arch/powerpc/perf/core-book3s.c

[PATCH V4 1/5] powerpc, perf: Add new BHRB related instructions for POWER8

2013-04-22 Thread Anshuman Khandual
the value which was read from the buffer entry. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/include/asm/ppc-opcode.h | 8 1 file changed, 8 insertions(+) diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h index 8752bc8

[PATCH V4 0/5] powerpc, perf: BHRB based branch stack enablement on POWER8

2013-04-22 Thread Anshuman Khandual
from perf_event_bhrb.c into core-book3s.c - Improved documentation for the patchset Changes in V4 - - Incorporated review comments on V3 regarding new instruction encoding Anshuman Khandual (5): powerpc, perf: Add new BHRB related instructions for POWER8 powerpc, perf: Add basic

[PATCH 1/2] powerpc, perf: Ignore separate BHRB privilege state filter request

2013-05-21 Thread Anshuman Khandual
Completely ignore BHRB privilege state filter request as we are already configuring MMCRA register with privilege state filtering attribute for the accompanying PMU event. This would help achieve cleaner user space interaction for BHRB. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com

[PATCH 0/2] Improvement and fixes for BHRB

2013-05-21 Thread Anshuman Khandual
-ring [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.002 MB perf.data (~102 samples) ] (2) The second patch fixes context migration for BHRB filter configuration Anshuman Khandual (2): powerpc, perf: Ignore separate BHRB privilege state filter request

[PATCH 2/2] powerpc, perf: BHRB filter configuration should follow the task

2013-05-21 Thread Anshuman Khandual
When the task moves around the system, the corresponding cpuhw per cpu strcuture should be popullated with the BHRB filter request value so that PMU could be configured appropriately with that during the next call into power_pmu_enable(). Signed-off-by: Anshuman Khandual khand

[PATCH 1/5] perf: New conditional branch filter criteria in branch stack sampling

2013-05-22 Thread Anshuman Khandual
of instructions. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- include/uapi/linux/perf_event.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index fb104e5..cb0de86 100644 --- a/include/uapi/linux

[PATCH 5/5] perf, documentation: Description for conditional branch filter

2013-05-22 Thread Anshuman Khandual
Adding documentation support for conditional branch filter. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- tools/perf/Documentation/perf-record.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf

[PATCH 2/5] powerpc, perf: Enable conditional branch filter for POWER8

2013-05-22 Thread Anshuman Khandual
Enables conditional branch filter support for POWER8 utilizing MMCRA register based filter and also invalidates a BHRB branch filter combination involving conditional branches. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/power8-pmu.c | 10 ++ 1 file

[PATCH 4/5] x86, perf: Add conditional branch filtering support

2013-05-22 Thread Anshuman Khandual
-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/x86/kernel/cpu/perf_event_intel_lbr.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/kernel/cpu/perf_event_intel_lbr.c b/arch/x86/kernel/cpu/perf_event_intel_lbr.c index d978353..a0d6387 100644 --- a/arch/x86/kernel/cpu

[PATCH 3/5] perf, tool: Conditional branch filter 'cond' added to perf record

2013-05-22 Thread Anshuman Khandual
Adding perf record support for new branch stack filter criteria PERF_SAMPLE_BRANCH_COND. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- tools/perf/builtin-record.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c

[PATCH 0/5] perf: Introducing new conditional branch filter

2013-05-22 Thread Anshuman Khandual
This patchset introduces conditional branch filter in perf branch stack sampling framework incorporating review comments from Michael Neuling, Peter Zijlstra and Stephane Eranian. Anshuman Khandual (5): perf: New conditional branch filter criteria in branch stack sampling powerpc, perf

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-22 Thread Anshuman Khandual
On 05/21/2013 07:25 PM, Stephane Eranian wrote: On Thu, May 16, 2013 at 12:15 PM, Michael Neuling mi...@neuling.org wrote: Peter Zijlstra pet...@infradead.org wrote: On Wed, May 15, 2013 at 03:37:22PM +0200, Stephane Eranian wrote: On Fri, May 3, 2013 at 2:11 PM, Peter Zijlstra

Re: [PATCH 1/2] powerpc, perf: Ignore separate BHRB privilege state filter request

2013-05-22 Thread Anshuman Khandual
Your description from patch 0 should be here. Sure, will bring it here. diff --git a/arch/powerpc/perf/power8-pmu.c b/arch/powerpc/perf/power8-pmu.c index f7d1c4f..8ed323d 100644 --- a/arch/powerpc/perf/power8-pmu.c +++ b/arch/powerpc/perf/power8-pmu.c @@ -525,16 +525,17 @@ static u64

Re: [PATCH 3/3] perf, x86, lbr: Demand proper privileges for PERF_SAMPLE_BRANCH_KERNEL

2013-05-22 Thread Anshuman Khandual
On 05/22/2013 05:53 PM, Stephane Eranian wrote: Hi, On Wed, May 22, 2013 at 8:43 AM, Anshuman Khandual khand...@linux.vnet.ibm.com wrote: On 05/21/2013 07:25 PM, Stephane Eranian wrote: On Thu, May 16, 2013 at 12:15 PM, Michael Neuling mi...@neuling.org wrote: Peter Zijlstra pet

Re: [PATCH 1/2] powerpc, perf: Ignore separate BHRB privilege state filter request

2013-05-27 Thread Anshuman Khandual
On 05/22/2013 02:29 PM, Anshuman Khandual wrote: Your description from patch 0 should be here. Does it sound better ? - if ((br_privilege != 7) (br_privilege != 0)) - return -1; + + if (br_privilege) + pr_info(BHRB privilege state filter request %llx ignored\n

Re: [PATCH V2 0/6] perf: New conditional branch filter

2013-10-09 Thread Anshuman Khandual
On 09/26/2013 04:44 PM, Stephane Eranian wrote: So you are saying that the HW filter is exclusive. That seems odd. But I think it is because of the choices is ANY. ANY covers all the types of branches. Therefore it does not make a difference whether you add COND or not. And vice-versa, if you

[PATCH V2 0/6] perf: New conditional branch filter

2013-08-29 Thread Anshuman Khandual
# PERF_SAMPLE_BRANCH_ANY_RET Changes in V2 -- (1) Enabled PPC64 SW branch filtering support (2) Incorporated changes required for all previous comments Anshuman Khandual (6

[PATCH V2 5/6] perf, documentation: Description for conditional branch filter

2013-08-29 Thread Anshuman Khandual
Adding documentation support for conditional branch filter. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Reviewed-by: Stephane Eranian eran...@google.com --- tools/perf/Documentation/perf-record.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf

[PATCH V2 4/6] x86, perf: Add conditional branch filtering support

2013-08-29 Thread Anshuman Khandual
This patch adds conditional branch filtering support, enabling it for PERF_SAMPLE_BRANCH_COND in perf branch stack sampling framework by utilizing an available software filter X86_BR_JCC. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Reviewed-by: Stephane Eranian eran...@google.com

[PATCH V2 6/6] powerpc, perf: Enable SW filtering in branch stack sampling framework

2013-08-29 Thread Anshuman Khandual
) bctarl Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/include/asm/perf_event_server.h | 2 +- arch/powerpc/perf/core-book3s.c | 200 +-- arch/powerpc/perf/power8-pmu.c | 19 ++- 3 files changed, 198 insertions

[PATCH V2 1/6] perf: New conditional branch filter criteria in branch stack sampling

2013-08-29 Thread Anshuman Khandual
of instructions. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com Reviewed-by: Stephane Eranian eran...@google.com --- include/uapi/linux/perf_event.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h index

[PATCH V2 3/6] perf, tool: Conditional branch filter 'cond' added to perf record

2013-08-29 Thread Anshuman Khandual
Adding perf record support for new branch stack filter criteria PERF_SAMPLE_BRANCH_COND. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- tools/perf/builtin-record.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c

[PATCH V2 2/6] powerpc, perf: Enable conditional branch filter for POWER8

2013-08-29 Thread Anshuman Khandual
Enables conditional branch filter support for POWER8 utilizing MMCRA register based filter and also invalidates a BHRB branch filter combination involving conditional branches. Signed-off-by: Anshuman Khandual khand...@linux.vnet.ibm.com --- arch/powerpc/perf/power8-pmu.c | 10 ++ 1 file

Re: [PATCH V2 0/6] perf: New conditional branch filter

2013-09-01 Thread Anshuman Khandual
On 08/30/2013 05:18 PM, Stephane Eranian wrote: 2013/8/30 Anshuman Khandual khand...@linux.vnet.ibm.com This patchset is the re-spin of the original branch stack sampling patchset which introduced new PERF_SAMPLE_BRANCH_COND filter. This patchset also enables SW based branch

Re: [PATCH V2 0/6] perf: New conditional branch filter

2013-09-21 Thread Anshuman Khandual
On 08/30/2013 05:18 PM, Stephane Eranian wrote: 2013/8/30 Anshuman Khandual khand...@linux.vnet.ibm.com This patchset is the re-spin of the original branch stack sampling patchset which introduced new PERF_SAMPLE_BRANCH_COND filter. This patchset also enables SW based branch

  1   2   3   4   5   6   7   8   9   10   >