[PATCH v2 13/14] powerpc/perf/{hv-gpci,hv-common}: generate requests with counters annotated

2014-08-15 Thread Sukadev Bhattiprolu
changes in naming). In exchange for this macro disaster, we get autogenerated event listing for GPCI in sysfs, build time field offset checking, and zero duplication of information about GPCI requests. CC: Haren Myneni CC: Cody P Schafer Signed-off-by: Cody P Schafer Signed-off-by: Sukadev

[PATCH v2 08/14] tools/perf: document parameterized events and note symbolically formed events

2014-08-15 Thread Sukadev Bhattiprolu
From: Cody P Schafer CC: Haren Myneni CC: Cody P Schafer Signed-off-by: Cody P Schafer Signed-off-by: Sukadev Bhattiprolu --- tools/perf/Documentation/perf-list.txt | 13 + tools/perf/Documentation/perf-record.txt | 5 + 2 files changed, 18 insertions(+) diff --git a

[PATCH v2 10/14] powerpc/perf/hv-24x7: parse catalog and populate sysfs with events

2014-08-15 Thread Sukadev Bhattiprolu
- Use kmem_cache_free() to free page allocated with kmem_cache_alloc(). CC: Haren Myneni CC: Cody P Schafer Signed-off-by: Cody P Schafer Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/hv-24x7-catalog.h | 25 ++ arch/powerpc/perf/hv-24x7-domains.h | 19 + arch/powerpc/perf/hv-24x7.c

[PATCH v2 12/14] perf: add PMU_EVENT_ATTR_STRING() helper

2014-08-15 Thread Sukadev Bhattiprolu
From: Cody P Schafer Helper for constructing static struct perf_pmu_events_attr s. CC: Haren Myneni CC: Cody P Schafer Signed-off-by: Cody P Schafer Signed-off-by: Sukadev Bhattiprolu --- include/linux/perf_event.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/linux

[PATCH v2 11/14] powerpc/perf/hv-24x7: Documentaion for new sysfs entries which expose descriptions

2014-08-15 Thread Sukadev Bhattiprolu
From: Cody P Schafer CC: Haren Myneni CC: Cody P Schafer Signed-off-by: Cody P Schafer Signed-off-by: Sukadev Bhattiprolu --- .../testing/sysfs-bus-event_source-devices-hv_24x7 | 22 ++ 1 file changed, 22 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-bus

[PATCH v2 05/14] tools/perf: annotate list_head with type info

2014-08-15 Thread Sukadev Bhattiprolu
From: Cody P Schafer CC: Haren Myneni CC: Cody P Schafer Signed-off-by: Cody P Schafer Signed-off-by: Sukadev Bhattiprolu --- tools/perf/util/pmu.c | 4 ++-- tools/perf/util/pmu.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/perf/util/pmu.c b/tools/perf

[PATCH v2 03/14] perf Documentation: sysfs events/ interfaces

2014-08-15 Thread Sukadev Bhattiprolu
From: Cody P Schafer Add documentation for the , .scale, and .unit files in sysfs. .scale and .unit were undocumented. was previously documented only for specific powerpc pmu events. CC: Haren Myneni CC: Cody P Schafer Signed-off-by: Cody P Schafer Signed-off-by: Sukadev Bhattiprolu

[PATCH] powerpc/perf: Explicitly include util/debug.h

2014-08-07 Thread Sukadev Bhattiprolu
[PATCH] powerpc/perf: Explicitly include util/debug.h Looks like util/debug.h was indirectly included before and is no longer included now. pr_debug is left undefined and the build of perf tool fails on Powerpc. Explicitly include util/debug.h. Signed-off-by: Sukadev Bhattiprolu --- tools

[PATCH] powerpc/perf: Implement get_cpu_str()

2014-08-05 Thread Sukadev Bhattiprolu
(), on Powerpc, we can skip the --events-file option and run: perf stat -e PM_CYC sleep 1 Signed-off-by: Sukadev Bhattiprolu --- Note: This patch is based on Andi Kleen's recent patchset https://lkml.org/lkml/2014/7/30/693 Changelog[v2]: [Michael Ellerman]: Use PVR in

Re: scheduler crash on Power

2014-08-01 Thread Sukadev Bhattiprolu
Dietmar Eggemann [dietmar.eggem...@arm.com] wrote: | > ltcbrazos2-lp07 login: [ 181.915974] [ cut here ] | > [ 181.915991] WARNING: at ../kernel/sched/core.c:5881 | | This warning indicates the problem. One of the struct sched_domains does | not have it's groups member se

scheduler crash on Power

2014-07-30 Thread Sukadev Bhattiprolu
I am getting this crash on a Powerpc system using 3.16.0-rc7 kernel plus some patches related to perf (24x7 counters) that Cody Schafer posted here: https://lkml.org/lkml/2014/5/27/768 I don't get the crash on an unpatched kernel though. I have been staring at the perf event patches, bu

[tip:perf/core] perf powerpc: Include util/ util.h and remove stringify macros

2014-07-28 Thread tip-bot for Sukadev Bhattiprolu
Commit-ID: c94b93cbca59435dfc0f2a838fea55bd632145d3 Gitweb: http://git.kernel.org/tip/c94b93cbca59435dfc0f2a838fea55bd632145d3 Author: Sukadev Bhattiprolu AuthorDate: Thu, 24 Jul 2014 00:47:18 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 24 Jul 2014 11:00:39 -0300 perf

[RFC PATCH 2/2] powerpc/perf: Implement get_cpu_str()

2014-07-24 Thread Sukadev Bhattiprolu
perf tool would refer to the PMU events defined in ~/.cache/pmu-events/power8.json. Signed-off-by: Sukadev Bhattiprolu --- tools/perf/arch/powerpc/util/header.c | 69 + tools/perf/perf.c | 11 ++ tools/perf/perf.h |2

[RFC PATCH 1/2] powerpc/perf: include util/util.h and remove stringify macros

2014-07-24 Thread Sukadev Bhattiprolu
[RFC PATCH 1/2] powerpc/perf: include util/util.h and remove stringify macros The stringify macros are defined in tools/perf/util/util.h and don't need to be redfined specfiically for powerpc. Signed-off-by: Sukadev Bhattiprolu --- tools/perf/arch/powerpc/util/header.c |4 +--- 1

[RFC PATCH 0/2] powerpc/perf: Implement get_cpu_str()

2014-07-24 Thread Sukadev Bhattiprolu
These two patches implement get_cpu_str() for powerpc. get_cpu_str() will allow users to cache their perf event JSON files and skip having to specify the --events-file with each perf invocation. These patches are based on the commit commit 4a5e890 Author: Andi Kleen Dat

Re: [PATCH 4/9] perf, tools: Automatically look for event file name for cpu v3

2014-07-08 Thread Sukadev Bhattiprolu
Andi Kleen [a...@firstfloor.org] wrote: | +static const char *json_default_name(void) | +{ | + char *cache; | + char *idstr = get_cpu_str(); | + char *res = NULL; | + char *home = NULL; | + char *emap; | + | + emap = getenv("EVENTMAP"); | + if (emap) { | + i

Re: perf: Add support for full Intel event lists v7

2014-07-08 Thread Sukadev Bhattiprolu
Andi Kleen [a...@firstfloor.org] wrote: | Works for me with your input file: | | % perf list --events-file t.json | ... | pm_cyc [Cycles completed] | pm_inst_cmpl [Instructions completed] Ah, lower case. | |

Re: perf: Add support for full Intel event lists v7

2014-07-08 Thread Sukadev Bhattiprolu
Andi Kleen [a...@firstfloor.org] wrote: | Should be ready for merge now. Please consider. Overall I think it is a cool feature. I was able to run some simple tests on Power8 (by explicitly specifying the JSON file). Have a couple of questions below. | | [v2: Review feedback addressed and some m

[tip:perf/core] perf tools powerpc: Adjust callchain based on DWARF debug info

2014-07-05 Thread tip-bot for Sukadev Bhattiprolu
Commit-ID: a60335ba32981db5bc057b35782644e9e2436407 Gitweb: http://git.kernel.org/tip/a60335ba32981db5bc057b35782644e9e2436407 Author: Sukadev Bhattiprolu AuthorDate: Wed, 25 Jun 2014 08:49:03 -0700 Committer: Jiri Olsa CommitDate: Fri, 27 Jun 2014 11:14:51 +0200 perf tools powerpc

Re: [PATCH v5 1/1] powerpc/perf: Adjust callchain based on DWARF debug info

2014-06-25 Thread Sukadev Bhattiprolu
dx() to be consistent with behavior. [Jiri Olsa] Add '__maybe_unused' tags for unused parameters. Changelog[v2]: Add missing dwfl_end() Fix merge conflicts due to some unwind code Reported-by: Maynard Johnson Tested-by: Maynard Johnson Signed-off-by: Sukadev Bha

[PATCH v5 1/1] powerpc/perf: Adjust callchain based on DWARF debug info

2014-06-24 Thread Sukadev Bhattiprolu
Blanchard. Thanks to valuable input on DWARF debug information from Ulrich Weigand. Reported-by: Maynard Johnson Tested-by: Maynard Johnson Signed-off-by: Sukadev Bhattiprolu --- Changelog[v5] [Jiri Olsa] Avoid the new external symbol PERF_CONTEXT_IGNORE; Revert back to previous

[PATCH v4 2/2]: powerpc/perf: Adjust callchain based on DWARF debug info

2014-06-05 Thread Sukadev Bhattiprolu
the CFA even without the .eh_frame section. Fix suggested by Anton Blanchard. Thanks to valuable input on DWARF debug information from Ulrich Weigand. Reported-by: Maynard Johnson Tested-by: Maynard Johnson Signed-off-by: Sukadev Bhattiprolu --- Changelog[v4] Move Powerpc

[PATCH v4 1/2]: Allow architectures to skip a callchain entry

2014-06-05 Thread Sukadev Bhattiprolu
nline interfaces: arch_skip_callchain_idx() next_callchain_ip() Reported-by: Maynard Johnson Tested-by: Maynard Johnson Signed-off-by: Sukadev Bhattiprolu --- Changelog[v4] Move Powerpc-specific code to separate patch [Jiri Olsa] Minimize performance impact to

Re: Fw: Re: [PATCH 1/1] powerpc/perf: Adjust callchain based on DWARF debug info

2014-06-04 Thread Sukadev Bhattiprolu
Jiri Olsa [jo...@redhat.com] wrote: | On Tue, Jun 03, 2014 at 12:47:10AM -0700, Sukadev Bhattiprolu wrote: | | SNIP | | > | | > | | > | could you please change this, so it's nop for arch != powerpc | > | via #ifdef I guess.. or some other smart way ;-) | > | > I was try

Re: Fw: Re: [PATCH 1/1] powerpc/perf: Adjust callchain based on DWARF debug info

2014-06-03 Thread Sukadev Bhattiprolu
Jiri Olsa [jo...@redhat.com] wrote: | On Fri, May 30, 2014 at 05:59:25PM +0200, Jiri Olsa wrote: | > On Fri, May 30, 2014 at 08:50:19AM -0700, Sukadev Bhattiprolu wrote: | > > Jiri Olsa [jo...@redhat.com] wrote: | > > | On Fri, May 16, 2014 at 02:03:33PM -0700, Sukadev Bh

[PATCH 1/1][v3] powerpc/perf: Adjust callchain based on DWARF debug info

2014-05-22 Thread Sukadev Bhattiprolu
. Thanks to valuable input on DWARF debug information from Ulrich Weigand. Reported-by: Maynard Johnson Tested-by: Maynard Johnson Signed-off-by: Sukadev Bhattiprolu --- Changelog[v3] [Jiri Olsa] Rename function to arch_skip_callchain_idx() to be consistent with behavior

Re: [PATCH 1/1] powerpc/perf: Adjust callchain based on DWARF debug

2014-05-22 Thread Sukadev Bhattiprolu
Jiri Olsa [jo...@redhat.com] wrote: | | yep, that sounds more clear to me.. something like below? | | calling callchain_dup from within arch_adjust_callchain in case | you want to change it and returning != 0 in this case, so | we could free the new callchain Agree. | | but it might be to much

[PATCH 1/1] powerpc/perf: Adjust callchain based on DWARF debug

2014-05-20 Thread Sukadev Bhattiprolu
. Thanks to valuable input on DWARF debug information from Ulrich Weigand. Reported-by: Maynard Johnson Tested-by: Maynard Johnson Signed-off-by: Sukadev Bhattiprolu Acked-by: Maynard Johnson --- Changelog[v2]: - Add missing dwfl_end() - Fix merge conflicts due to some unwind code

Re: [PATCH 1/1] powerpc/perf: Adjust callchain based on DWARF debug info

2014-05-13 Thread Sukadev Bhattiprolu
Maynard Johnson [mpj...@us.ibm.com] wrote: | > [PATCH 1/1] powerpc/perf: Adjust callchain based on DWARF debug info | | Acked-by: Maynard Johnson | | Reviewed and tested. Thanks, Suka. Thanks Maynard. This updated patch also fixes whitespace damage. From: Sukadev Bhattiprolu Date: Fri

[PATCH 1/1] powerpc/perf: Adjust callchain based on DWARF debug info

2014-05-09 Thread Sukadev Bhattiprolu
.eh_frame and .debug_info sections are available. We should be able to determin the CFA even without the .eh_frame section. Thanks to Ulrich Weigand for help with DWARF debug information. Fix suggested by Anton Blanchard. Reported-by: Maynard Johnson Signed-off-by: Sukadev Bhattiprolu

[RFC][PATCH] perf: Add 'merge-recursive' callchain option

2014-03-21 Thread Sukadev Bhattiprolu
>From 9ad9432dab2bf4d1c8e6ff9201e88d5ae9f3994a Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu Date: Wed, 19 Mar 2014 20:24:22 -0500 Subject: [PATCH 1/1] perf: Add 'merge-recursive' callchain option Powerpc saves the link register (LR) with each sample to help resolve callchains

[PATCH 3/3] perf: Use 64-bit value when comparing sample_regs

2014-03-05 Thread Sukadev Bhattiprolu
When checking whether a bit representing a register is set in sample_regs, a 64-bit mask, use 64-bit value (1LL). Signed-off-by: Sukadev Bhattiprolu --- tools/perf/util/unwind.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/unwind.c b/tools/perf/util

[PATCH 0/3] powerpc/perf: Enable linking with libunwind

2014-03-05 Thread Sukadev Bhattiprolu
1: bl work bdnz1b li 0,1 /* sys_exit */ sc work: mflr30 bl work2 mtlr30 blr work2: blr Sukadev Bhattiprolu (3): po

[RFC][PATCH 2/3] power: perf tool: Add libunwind support for Power

2014-03-05 Thread Sukadev Bhattiprolu
with libunwind and libunwind-devel libdwarf packages installed. TODO: - Not sure if we need to list all the Power registers or restrict to only those that libunwind needs. - Check about perf_reg_abi() - Build for 32-bit Signed-off-by: Sukadev Bhattiprolu

[RFC][PATCH 1/3] power: perf: Enable saving the user stack in a sample.

2014-03-05 Thread Sukadev Bhattiprolu
perf.data file). But we save the user-stack only when user explicitly requests it: perf record --call-graph=dwarf,8192 Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/Kconfig |2 + arch/powerpc/include/uapi/asm/perf_regs.h | 70 +++ arch/po

Re: [PATCH V3 06/11] perf record: Add an option to force per-cpu mmaps

2013-11-12 Thread Sukadev Bhattiprolu
Ingo Molnar [mi...@kernel.org] wrote: | | * Peter Zijlstra wrote: | | > On Tue, Nov 05, 2013 at 02:31:52PM -0300, Arnaldo Carvalho de Melo wrote: | > > PeterZ, | > > | > > Can I have your Acked-by for this one? I guess now the goal is | > > achieved, no? Being able to profile children with t

[RFC][PATCH] Fix inhert with perf record --pid

2013-11-08 Thread Sukadev Bhattiprolu
A gently tested RFC patch... --- >From 38554891fc41082b767f24ce3293658f7329a691 Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu Date: Fri, 8 Nov 2013 17:14:06 -0800 Subject: [PATCH] Fix inhert with perf record --pid If a target process is identified by its pid: perf record --

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

2013-10-17 Thread Sukadev Bhattiprolu
Michael Ellerman and comments from Tom Musta. Signed-off-by: Sukadev Bhattiprolu --- Changelog[v6] - [David Laight, Anshuman Khandual] Add a comment in function header to help better understand which instructions are selected by the instr_is_load_st

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

2013-10-16 Thread Sukadev Bhattiprolu
Anshuman Khandual [khand...@linux.vnet.ibm.com] wrote: | 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 Architectur

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

2013-10-16 Thread Sukadev Bhattiprolu
David Laight [david.lai...@aculab.com] wrote: | | I can't help feeling the code could do with some comments about | which actual instructions are selected where. At a high level, only the load and store instructions are selected. I added a reference to the Appendix F (Opcode maps) in the functio

[PATCH 01/10][v6] powerpc: Rename branch_opcode() to instr_opcode()

2013-10-15 Thread Sukadev Bhattiprolu
The logic used in branch_opcode() to extract the opcode for an instruction applies to non branch instructions also. So rename to instr_opcode(). Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/lib/code-patching.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a

[PATCH 00/10][v6] powerpc/perf: Export memory hierarchy level in Power7/8.

2013-10-15 Thread Sukadev Bhattiprolu
Khandual. Sukadev Bhattiprolu (10): powerpc: Rename branch_opcode() to instr_opcode() powerpc/Power7: detect load/store instructions tools/perf: silence compiler warnings tools/perf: Remove local byteorder.h. powerpc/perf: Remove PME_ prefix for power7 events powerpc/perf: Export Power8

[PATCH 03/10][v6] tools/perf: silence compiler warnings

2013-10-15 Thread Sukadev Bhattiprolu
The uninitialized variables cause warnings which are treated as errors during build (without WERROR=0). Signed-off-by: Sukadev Bhattiprolu --- tools/perf/util/srcline.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/srcline.c b/tools/perf/util

[PATCH 04/10][v6] tools/perf: Remove local byteorder.h.

2013-10-15 Thread Sukadev Bhattiprolu
-off-by: Sukadev Bhattiprolu --- tools/perf/Makefile |1 - tools/perf/util/include/asm/byteorder.h |2 -- tools/perf/util/include/linux/types.h | 20 3 files changed, 20 insertions(+), 3 deletions(-) delete mode 100644 tools/perf/util/include

[PATCH 05/10][v6] powerpc/perf: Remove PME_ prefix for power7 events

2013-10-15 Thread Sukadev Bhattiprolu
Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/include/asm/perf_event_server.h |2 +- arch/powerpc/perf/power7-pmu.c | 18 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/include/asm/perf_event_server.h b/arch/powerpc

[PATCH 06/10][v6] powerpc/perf: Export Power8 generic events in sysfs

2013-10-15 Thread Sukadev Bhattiprolu
Export generic perf events for Power8 in sysfs. Signed-off-by: Sukadev Bhattiprolu --- Changelog[v6]: [Michael Ellerman] Drop PME_ prefix in macros arch/powerpc/perf/power8-events-list.h | 20 +++ arch/powerpc/perf/power8-pmu.c | 44

[PATCH 08/10][v6] powerpc/perf: Define big-endian version of perf_mem_data_src

2013-10-15 Thread Sukadev Bhattiprolu
perf_mem_data_src is an union that is initialized via the ->val field and accessed via the bitmap fields. For this to work on big endian platforms, we also need a big-endian represenation of perf_mem_data_src. Cc: Stephane Eranian Cc: Michael Ellerman Signed-off-by: Sukadev Bhattipr

[PATCH 10/10][v6] powerpc/perf: Export Power7 memory hierarchy info to user space.

2013-10-15 Thread Sukadev Bhattiprolu
, Michael Ellerman and Michael Neuling. Cc: Stephane Eranian Cc: Michael Ellerman Signed-off-by: Sukadev Bhattiprolu --- Changelog[v4]: Drop support for 'perf mem' for Power (use perf-record and perf-report directly) Changelog[v3]: [Michael Ellerman] If newe

[PATCH 07/10][v6] powerpc/perf: Add Power8 event PM_MRK_GRP_CMPL to sysfs.

2013-10-15 Thread Sukadev Bhattiprolu
The perf event PM_MRK_GRP_CMPL is useful in analyzing memory hierarchy of applications. Signed-off-by: Sukadev Bhattiprolu --- Changelog[v6]: - [Michael Ellerman]: Drop redundant PME_ prefix from event name. arch/powerpc/perf/power8-events-list.h |1 + 1 file changed, 1 insertion

[PATCH 09/10][v6] powerpc/perf: Export Power8 memory hierarchy info to user space.

2013-10-15 Thread Sukadev Bhattiprolu
t be implemented on Power, we don't implement 'perf mem' on Power for now. Thanks to input from Stephane Eranian, Michael Ellerman and Michael Neuling. Cc: Stephane Eranian Cc: Michael Ellerman Signed-off-by: Sukadev Bhattiprolu --- Changelog[v2]: Drop support fo

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

2013-10-15 Thread Sukadev Bhattiprolu
a Power7 system. (Power8 systems set some bits in the SIER to identify load/store operations and hence don't need a similar functionality). Based on optimized code from Michael Ellerman and comments from Tom Musta. Signed-off-by: Sukadev Bhattiprolu --- Changelog[v6] - [Michael Ell

Re: [PATCH 5/9][v5] powerpc: implement is_instr_load_store().

2013-10-08 Thread Sukadev Bhattiprolu
Michael Ellerman [mich...@ellerman.id.au] wrote: | bool is_load_store(int ext_opcode) | { | upper = ext_opcode >> 5; | lower = ext_opcode & 0x1f; | | /* Short circuit as many misses as we can */ | if (lower < 3 || lower > 23) | return false; I see some

Re: [PATCH 6/9][v5] powerpc/perf: Define big-endian version of perf_mem_data_src

2013-10-04 Thread Sukadev Bhattiprolu
Michael Ellerman [mich...@ellerman.id.au] wrote: | On Tue, Oct 01, 2013 at 05:15:07PM -0700, Sukadev Bhattiprolu wrote: | > perf_mem_data_src is an union that is initialized via the ->val field | > and accessed via the bitmap fields. For this to work on big endian | > platforms, we als

Re: [PATCH 5/9][v5] powerpc: implement is_instr_load_store().

2013-10-03 Thread Sukadev Bhattiprolu
Michael Ellerman [mich...@ellerman.id.au] wrote: | On Tue, Oct 01, 2013 at 05:15:06PM -0700, Sukadev Bhattiprolu wrote: | > Implement is_instr_load_store() to detect whether a given instruction | > is one of the fixed-point or floating-point load/store instructions. | > This function wil

Re: [PATCH 2/9][v5] powerpc/perf: Export Power8 generic events in sysfs

2013-10-03 Thread Sukadev Bhattiprolu
Michael Ellerman [mich...@ellerman.id.au] wrote: | On Tue, Oct 01, 2013 at 05:15:03PM -0700, Sukadev Bhattiprolu wrote: | > Export generic perf events for Power8 in sysfs. | > | > Signed-off-by: Sukadev Bhattiprolu | > Reviewed-by: Anshuman Khandual | > --- | > arch/powerpc

Re: [PATCH 6/9][v5] powerpc/perf: Define big-endian version of perf_mem_data_src

2013-10-03 Thread Sukadev Bhattiprolu
Michael Ellerman [mich...@ellerman.id.au] wrote: | On Tue, Oct 01, 2013 at 05:15:07PM -0700, Sukadev Bhattiprolu wrote: | > perf_mem_data_src is an union that is initialized via the ->val field | > and accessed via the bitmap fields. For this to work on big endian | > platforms, we als

Re: [PATCH 6/9][v5] powerpc/perf: Define big-endian version of perf_mem_data_src

2013-10-02 Thread Sukadev Bhattiprolu
Michael Ellerman [mich...@ellerman.id.au] wrote: | On Tue, Oct 01, 2013 at 05:15:07PM -0700, Sukadev Bhattiprolu wrote: | > perf_mem_data_src is an union that is initialized via the ->val field | > and accessed via the bitmap fields. For this to work on big endian | > platforms, we als

[PATCH 5/9][v5] powerpc: implement is_instr_load_store().

2013-10-01 Thread Sukadev Bhattiprolu
Implement is_instr_load_store() to detect whether a given instruction is one of the fixed-point or floating-point load/store instructions. This function will be used in a follow-on patch to save memory hierarchy information of the load/store. Signed-off-by: Sukadev Bhattiprolu Reviewed-by

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

2013-10-01 Thread Sukadev Bhattiprolu
, Michael Ellerman and Michael Neuling. Cc: Stephane Eranian Cc: Michael Ellerman Signed-off-by: Sukadev Bhattiprolu Reviewed-by: Anshuman Khandual --- Changelog[v4]: Drop support for 'perf mem' for Power (use perf-record and perf-report directly) Changelog[v3]:

[PATCH 6/9][v5] powerpc/perf: Define big-endian version of perf_mem_data_src

2013-10-01 Thread Sukadev Bhattiprolu
perf_mem_data_src is an union that is initialized via the ->val field and accessed via the bitmap fields. For this to work on big endian platforms, we also need a big-endian represenation of perf_mem_data_src. Cc: Stephane Eranian Cc: Michael Ellerman Signed-off-by: Sukadev Bhattipr

[PATCH 9/9][v5] powerpc/perf: Update perf-mem man page for Power

2013-10-01 Thread Sukadev Bhattiprolu
Add a few lines to the perf-mem man page to indicate: - its dependence on the mem-loads and mem-stores events - how to use the feature on Power architecture. Signed-off-by: Sukadev Bhattiprolu --- tools/perf/Documentation/perf-mem.txt | 11 +++ 1 file changed, 11

[PATCH 2/9][v5] powerpc/perf: Export Power8 generic events in sysfs

2013-10-01 Thread Sukadev Bhattiprolu
Export generic perf events for Power8 in sysfs. Signed-off-by: Sukadev Bhattiprolu Reviewed-by: Anshuman Khandual --- arch/powerpc/perf/power8-pmu.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/arch/powerpc/perf/power8-pmu.c b/arch/powerpc/perf/power8-pmu.c

[PATCH 1/9][v5] powerpc/perf: Rename Power8 macros to start with PME

2013-10-01 Thread Sukadev Bhattiprolu
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. Signed-off-by: Sukadev Bhattiprolu Reviewed-by: Anshuman Khandual --- arch/powerpc/perf/power8-pmu.c | 24

[PATCH 3/9][v5] powerpc/perf: Add Power8 event PM_MRK_GRP_CMPL to sysfs.

2013-10-01 Thread Sukadev Bhattiprolu
The perf event PM_MRK_GRP_CMPL is useful in analyzing memory hierarchy of applications. Signed-off-by: Sukadev Bhattiprolu Reviewed-by: Anshuman Khandual --- arch/powerpc/perf/power8-pmu.c |5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/perf/power8-pmu.c b/arch/powerpc

[PATCH 7/9][v5] powerpc/perf: Export Power8 memory hierarchy info to user space.

2013-10-01 Thread Sukadev Bhattiprolu
t be implemented on Power, we don't implement 'perf mem' on Power for now. Thanks to input from Stephane Eranian, Michael Ellerman and Michael Neuling. Cc: Stephane Eranian Cc: Michael Ellerman Signed-off-by: Sukadev Bhattiprolu Reviewed-by: Anshuman Khandual --- Changelog[v2]:

[no subject]

2013-10-01 Thread Sukadev Bhattiprolu
. Thanks to input from Stephane Eranian, Michael Ellerman, Michael Neuling and Anshuman Khandual. Sukadev Bhattiprolu (9): powerpc/perf: Rename Power8 macros to start with PME powerpc/perf: Export Power8 generic events in sysfs powerpc/perf: Add Power8 event PM_MRK_GRP_CMPL to sysfs. powerpc

[PATCH 4/9][v5] powerpc: Rename branch_opcode() to instr_opcode()

2013-10-01 Thread Sukadev Bhattiprolu
The logic used in branch_opcode() to extract the opcode for an instruction applies to non branch instructions also. So rename to instr_opcode(). Signed-off-by: Sukadev Bhattiprolu Reviewed-by: Anshuman Khandual --- arch/powerpc/lib/code-patching.c |6 +++--- 1 file changed, 3 insertions

Re: [PATCH 08/21] perf: Add new 'paused' attribute

2013-09-25 Thread Sukadev Bhattiprolu
Jiri Olsa [jo...@redhat.com] wrote: | Adding new 'paused' perf_event_attr attribute bit. It sets | the initial event state as paused, so it wont get started | until it's triggered by toggling mechanism. There is a attr->disabled field which also leaves the event off by default. Some comments dist

Re: [PATCH 05/21] perf: Add event toggle sys_perf_event_open interface

2013-09-25 Thread Sukadev Bhattiprolu
Jiri Olsa [jo...@redhat.com] wrote: | Adding perf interface that allows to create 'toggle' events, | which can enable or disable another event. Whenever the toggle | event is triggered (has overflow), it toggles another event | state and either starts or stops it. Nice idea. It would be very usefu

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

2013-09-24 Thread Sukadev Bhattiprolu
Anshuman Khandual [khand...@linux.vnet.ibm.com] wrote: | 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->

[PATCH 0/8][v4] powerpc/perf: Export memory hierarchy level in Power7/8.

2013-09-13 Thread Sukadev Bhattiprolu
Power7 and Power8 processors save the memory hierarchy level (eg: L2, L3) from which a load or store instruction was satisfied. Export this hierarchy information to the user via the perf_mem_data_src object. Thanks to input from Stephane Eranian, Michael Ellerman, Michael Neuling. Sukadev

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

2013-09-13 Thread Sukadev Bhattiprolu
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. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/power8-pmu.c | 24 1 file changed

[PATCH 3/8][v4] powerpc/perf: Add PM_MRK_GRP_CMPL event to sysfs.

2013-09-13 Thread Sukadev Bhattiprolu
The perf event PM_MRK_GRP_CMPL is useful in analyzing memory hierarchy of applications. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/power8-pmu.c |5 + 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/perf/power8-pmu.c b/arch/powerpc/perf/power8-pmu.c index ff98fb8

[PATCH 7/8][v4] power: implement is_instr_load_store().

2013-09-13 Thread Sukadev Bhattiprolu
Implement is_instr_load_store() to detect whether a given instruction is one of the fixed-point or floating-point load/store instructions. This function will be used in a follow-on patch to save memory hierarchy information of the load/store. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc

[PATCH 6/8][v4] powerpc: Rename branch_opcode() to instr_opcode()

2013-09-13 Thread Sukadev Bhattiprolu
The logic used in branch_opcode() to extract the opcode for an instruction applies to non branch instructions also. So rename to instr_opcode(). Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/lib/code-patching.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a

[PATCH 4/8][v4] powerpc/perf: Define big-endian version of perf_mem_data_src

2013-09-13 Thread Sukadev Bhattiprolu
perf_mem_data_src is an union that is initialized via the ->val field and accessed via the bitmap fields. For this to work on big endian platforms, we also need a big-endian represenation of perf_mem_data_src. Cc: Stephane Eranian Cc: Michael Ellerman Signed-off-by: Sukadev Bhattipr

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

2013-09-13 Thread Sukadev Bhattiprolu
, Michael Ellerman and Michael Neuling. Cc: Stephane Eranian Cc: Michael Ellerman Signed-off-by: Sukadev Bhattiprolu --- Changelog[v4]: Drop support for 'perf mem' for Power (use perf-record and perf-report directly) Changelog[v3]: [Michael Ellerman] If newe

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

2013-09-13 Thread Sukadev Bhattiprolu
t be implemented on Power, we don't implement 'perf mem' on Power for now. Thanks to input from Stephane Eranian, Michael Ellerman and Michael Neuling. Cc: Stephane Eranian Cc: Michael Ellerman Signed-off-by: Sukadev Bhattiprolu --- Changelog[v4]: Drop support fo

[PATCH 2/8][v4] powerpc/perf: Export Power8 generic events in sysfs

2013-09-13 Thread Sukadev Bhattiprolu
Export generic perf events for Power8 in sysfs. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/power8-pmu.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/arch/powerpc/perf/power8-pmu.c b/arch/powerpc/perf/power8-pmu.c index 30c6b12..ff98fb8 100644

Re: [PATCH] perf mem: add priv level filtering support

2013-09-05 Thread Sukadev Bhattiprolu
Arnaldo Carvalho de Melo [a...@redhat.com] wrote: | Em Wed, Aug 28, 2013 at 03:38:28PM +0200, Stephane Eranian escreveu: | > On Wed, Aug 28, 2013 at 3:27 PM, Arnaldo Carvalho de Melo wrote: | > > So perhaps we should change both to (and add this to 'report' as well): | > > | > > -U, --hide_ke

Re: [PATCH 5/7] powerpc/perf: Define big-endian version of perf_mem_data_src

2013-08-11 Thread Sukadev Bhattiprolu
Vince Weaver [vi...@deater.net] wrote: | On Sat, 10 Aug 2013, Sukadev Bhattiprolu wrote: | | > | > include/uapi/linux/perf_event.h | 55 +++ | > 1 files changed, 55 insertions(+), 0 deletions(-) | | > +#define __PERF_LE 1234 | > +#define

[PATCH 6/7] powerpc/perf: Export Power8 memory hierarchy info to user space

2013-08-10 Thread Sukadev Bhattiprolu
AD, MEM_LVL_HIT, MEM_LVL_L2 (i.e load hit L2). Cc: Stephane Eranian Cc: Paul Mckerras Cc: Michael Ellerman Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/include/asm/perf_event_server.h |2 + arch/powerpc/perf/core-book3s.c | 11 + arch/powerp

[PATCH 7/7] powerpc/perf: Export Power7 memory hierarchy info to user space

2013-08-10 Thread Sukadev Bhattiprolu
Stephane Eranian Cc: Michael Ellerman Signed-off-by: Sukadev Bhattiprolu --- Thanks to input from Stephane Eranian and Michael Ellerman. Changelog[v3]: [Michael Ellerman] If newer levels that we defined in [v2] are not needed for Power8, ignore the new levels for Power7 also, and

[PATCH 5/7] powerpc/perf: Define big-endian version of perf_mem_data_src

2013-08-10 Thread Sukadev Bhattiprolu
ane Eranian Cc: Paul Mckerras Cc: Michael Ellerman Signed-off-by: Sukadev Bhattiprolu --- Thanks to input from Stephane Eranian and Michael Ellerman. include/uapi/linux/perf_event.h | 55 +++ 1 files changed, 55 insertions(+), 0 deletions(-) diff --gi

[PATCH 0/7]: Enable 'perf mem' command for Power

2013-08-10 Thread Sukadev Bhattiprolu
t I am unable to verify the build on few other configs due to a problem unrleated to this patchset. That is being discussed in a separate thread. I would like some feedback on this patchset in the meanwhile. Sukadev Bhattiprolu (7): powerpc/perf: Rename Power8 macros to start with PME po

[PATCH 2/7] powerpc/perf: Export Power8 generic events in sysfs

2013-08-10 Thread Sukadev Bhattiprolu
[PATCH 2/7] powerpc/perf: Export Power8 generic events in sysfs Export existing Power8 generic events in sysfs. Cc: Paul Mckerras Cc: Michael Ellerman Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/power8-pmu.c | 23 +++ 1 files changed, 23 insertions(+), 0

[PATCH 3/7] powerpc/perf: Create mem-loads/mem-stores events for Power8

2013-08-10 Thread Sukadev Bhattiprolu
M_MRK_GRP_CMPL is strictly not restricted to loads and stores, that seems to be a close/resonable match. Cc: Stephane Eranian Cc: Paul Mckerras Cc: Michael Ellerman Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/power8-pmu.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-)

[PATCH 4/7] powerpc/perf: Create mem-loads/mem-stores events for Power7

2013-08-10 Thread Sukadev Bhattiprolu
M_MRK_GRP_CMPL is strictly not restricted to loads and stores, that seems to be a close/resonable match. Cc: Stephane Eranian Cc: Paul Mckerras Cc: Michael Ellerman Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/power7-pmu.c | 16 1 files changed, 16 insertions(+), 0 d

[PATCH 1/7] powerpc/perf: Rename Power8 macros to start with PME

2013-08-10 Thread Sukadev Bhattiprolu
: Sukadev Bhattiprolu --- arch/powerpc/perf/power8-pmu.c | 24 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/arch/powerpc/perf/power8-pmu.c b/arch/powerpc/perf/power8-pmu.c index 96a64d6..30c6b12 100644 --- a/arch/powerpc/perf/power8-pmu.c +++ b/arch

[tip:perf/core] perf tools: Rename cpu_map__all() to cpu_map__empty()

2013-07-19 Thread tip-bot for Sukadev Bhattiprolu
Commit-ID: ec1e7e437ac47ecf7b4e07241036b1e1c3366012 Gitweb: http://git.kernel.org/tip/ec1e7e437ac47ecf7b4e07241036b1e1c3366012 Author: Sukadev Bhattiprolu AuthorDate: Wed, 22 May 2013 17:42:38 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 12 Jul 2013 13:45:44 -0300 perf

[tip:perf/core] perf top: Add --objdump option

2013-07-19 Thread tip-bot for Sukadev Bhattiprolu
Commit-ID: 0d3942dbcf7f7e8955ba89deed4749b0ad64d721 Gitweb: http://git.kernel.org/tip/0d3942dbcf7f7e8955ba89deed4749b0ad64d721 Author: Sukadev Bhattiprolu AuthorDate: Tue, 14 May 2013 22:56:51 -0700 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 12 Jul 2013 13:45:46 -0300 perf

Re: [PATCH 1/3] perf record: support duration option to run during specified time

2013-06-28 Thread Sukadev Bhattiprolu
Joonsoo Kim [iamjoonsoo@lge.com] wrote: | Currently, there is no method to quit at specified time later. | We are used to using 'sleep N' as command argument if we need it, | but explicitly supporting this feature maybe makes sense. | | Cc: Namhyung Kim | Signed-off-by: Joonsoo Kim | | diff

Re: [PATCH] perf: ARM: Record the user-mode PC in the call chain.

2013-06-28 Thread Sukadev Bhattiprolu
Will Deacon [will.dea...@arm.com] wrote: | On Thu, Jun 20, 2013 at 04:17:06AM +0100, Jed Davis wrote: | > On Tue, Jun 18, 2013 at 02:13:19PM +0100, Will Deacon wrote: | > > On Fri, Jun 14, 2013 at 12:21:11AM +0100, Jed Davis wrote: | > > > With this change, we no longer lose the innermost entry in

[RFC][PATCH 2/3][v2] perf/Power7: Export MDTLB_SRC fields to userspace

2013-06-26 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu Date: Tue, 25 Jun 2013 15:50:18 -0700 Subject: [RFC][PATCH 2/3][v2] perf/Power7: Export MDTLB_SRC fields to userspace Power7 saves the "perf-event vector" information in the mmcra register. Included in this event vector is a "marked-data-TLB source&quo

[RFC][PATCH 3/3] perf/Power7: Export DCACHE_SRC field to userspace

2013-06-26 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu Date: Tue, 25 Jun 2013 17:12:02 -0700 Subject: [RFC][PATCH 3/3] perf/Power7: Export DCACHE_SRC field to userspace On Power7, the DCACHE_SRC field (bits 9..12), in the MMCRA register identify the source from which a data-cache-miss for a marked instruction was

[RFC][PATCH 1/3][v2] perf: Move PERF_MEM*SHIFT macros up the block

2013-06-26 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu Date: Fri, 21 Jun 2013 14:03:01 -0700 Subject: [RFC][PATCH 1/3][v2] perf: Move PERF_MEM*SHIFT macros up the block Values for the PERF_MEM_*SHIFT macros depend on the block before them, so it would be more readable if they are in the beginning of the block. Signed-off

Re: [PATCH 1/2] perf tools: fix a typo of a Power7 event name

2013-06-19 Thread Sukadev Bhattiprolu
Michael Ellerman [mich...@ellerman.id.au] wrote: | On Wed, 2013-06-19 at 17:15 +0800, Runzhen Wang wrote: | > In the Power7 PMU guide: | > https://www.power.org/documentation/commonly-used-metrics-for-performance-analysis/ | > PM_BRU_MPRED is referred to as PM_BR_MPRED. | > | > This patch fix the

Re: [PATCH 2/2] perf tools: Make Power7 events available for perf

2013-06-19 Thread Sukadev Bhattiprolu
31112 0 45563b1fb arch/powerpc/perf/power7-pmu.o | | Signed-off-by: Runzhen Wang Reviewed-by: Sukadev Bhattiprolu -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at ht

Re: [PATCH 1/2] perf tools: fix a typo of a Power7 event name

2013-06-19 Thread Sukadev Bhattiprolu
| documentation accordingly. | | Signed-off-by: Runzhen Wang Reviewed-by: Sukadev Bhattiprolu -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Pleas

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

2013-06-18 Thread Sukadev Bhattiprolu
Michael Neuling [mi...@neuling.org] wrote: | Suka, | | One of these two patches breaks pmac32_defconfig and I suspect all other | 32 bit configs (against mainline) | | arch/powerpc/perf/core-book3s.c: In function 'record_and_restart': | arch/powerpc/perf/core-book3s.c:1632:4: error: passing argum

<    3   4   5   6   7   8   9   >