[[PATCH v6 03/10] perf: Split perf_event_read() and perf_event_count()

2015-09-03 Thread Sukadev Bhattiprolu
implement the ability to read a group of events using the transaction interface, we would need the two pieces done independently. Break up perf_event_read() and have it just read/update the counter and have the callers compute the total count if necessary. Signed-off-by: Sukadev Bhattiprolu <s

[[PATCH v6 05/10] perf: Add group reads to perf_event_read()

2015-09-03 Thread Sukadev Bhattiprolu
From: Peter Zijlstra <pet...@infradead.org> Enable perf_event_read() to update entire groups at once, this will be useful for read transactions. Cc: Ingo Molnar <mi...@redhat.com> Cc: Arnaldo Carvalho de Melo <a...@kernel.org> Cc: Michael Ellerman <m...@ellerman.id.au>

[[PATCH v6 10/10] perf: Drop PERF_EVENT_TXN

2015-09-03 Thread Sukadev Bhattiprolu
d x86 architectures. Signed-off-by: Sukadev Bhattiprolu <suka...@linux.vnet.ibm.com> --- arch/powerpc/perf/core-book3s.c |6 +- arch/s390/kernel/perf_cpum_cf.c |5 + arch/sparc/kernel/perf_event.c |6 +- arch/x86/kernel/cpu/perf_event.c |7 ++- arch/x8

Re: [PATCH v5 1/8] perf: Add a flags parameter to pmu txn interfaces

2015-09-01 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | | when looking at this (I almost pressed A for apply) it occurred to me | that we now keep double state, cpuhw->txn_flags and cpuhw->group_flag | are basically the same thing. | | Would not something like the below avoid this duplication? Yes, it

Re: [PATCH v16 00/16] perf, tools: Add support for PMU events in JSON format

2015-08-31 Thread Sukadev Bhattiprolu
Sukadev Bhattiprolu [suka...@linux.vnet.ibm.com] wrote: | CPUs support a large number of performance monitoring events (PMU events) | and often these events are very specific to an architecture/model of the | CPU. To use most of these PMU events with perf, we currently have to identify | them

[PATCH v16 04/16] perf, tools: Support CPU ID matching for Powerpc

2015-08-26 Thread Sukadev Bhattiprolu
Implement code that returns the generic CPU ID string for Powerpc. This will be used to identify the specific table of PMU events to parse/compare user specified events against. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- Changelog[v14

[PATCH v16 07/16] perf, tools: Query terminal width and use in perf list

2015-08-26 Thread Sukadev Bhattiprolu
a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Namhyung Kim namhy...@kernel.org Acked-by: Jiri Olsa jo...@redhat.com --- tools/perf/util/cache.h |1 + tools/perf/util/pager.c | 15 +++ tools/perf/util/pmu.c |3 ++- 3 files changed, 18 insertions

[PATCH v16 08/16] perf, tools: Add a --no-desc flag to perf list

2015-08-26 Thread Sukadev Bhattiprolu
. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- v2: Rename --quiet to --no-desc. Add option to man page. --- tools/perf/Documentation/perf-list.txt |8 +++- tools/perf/builtin-list.c

[PATCH v16 09/16] perf, tools: Add override support for event list CPUID

2015-08-26 Thread Sukadev Bhattiprolu
From: Andi Kleen a...@linux.intel.com Add a PERF_CPUID variable to override the CPUID of the current CPU (within the current architecture). This is useful for testing, so that all event lists can be tested on a single system. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev

[PATCH v16 00/16] perf, tools: Add support for PMU events in JSON format

2015-08-26 Thread Sukadev Bhattiprolu
CPUID perf, tools: Add support for event list topics perf, tools: Handle header line in mapfile Sukadev Bhattiprolu (7): perf, tools: Use pmu_events table to create aliases perf, tools: Support CPU ID matching for Powerpc perf, tools, jevents: Add support for long descriptions perf

[PATCH v16 13/16] perf, tools, jevents: Add support for event topics

2015-08-26 Thread Sukadev Bhattiprolu
Allow assigning categories Topics field to the PMU events i.e. process the topic field from the JSON file and add a corresponding topic field to the generated C events tables. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked

[PATCH v16 10/16] perf, tools, jevents: Add support for long descriptions

2015-08-26 Thread Sukadev Bhattiprolu
Implement support in jevents to parse long descriptions for events that may have them in the JSON files. A follow on patch will make this long description available to user through the 'perf list' command. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka

[PATCH v16 03/16] perf, tools: Use pmu_events table to create aliases

2015-08-26 Thread Sukadev Bhattiprolu
to specify events using their aliases rather than raw event codes. Based on input and some earlier patches from Andi Kleen, Jiri Olsa. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- Changelog[v4] - Split off unrelated code into separate

[PATCH v16 11/16] perf, tools: Add alias support for long descriptions

2015-08-26 Thread Sukadev Bhattiprolu
-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- Changelog[v14] - [Jiri Olsa] Break up independent parts of the patch into separate patches. --- tools/perf/util/parse-events.c |5 +++-- tools/perf/util/parse-events.h |3 ++- tools

[PATCH v16 12/16] perf, tools: Support long descriptions with perf list

2015-08-26 Thread Sukadev Bhattiprolu
of baclears for any type of branch] Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- Changelog[v15] - [Jir Olsa, Andi Kleen] Fix usage strings; update man page. Changelog[v14] - [Jiri

[PATCH v16 06/16] perf, tools: Support alias descriptions

2015-08-26 Thread Sukadev Bhattiprolu
output: % perf list ... arith.fpu_div [Divide operations executed] arith.fpu_div_active [Cycles when divider is busy executing divide operations] Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo

[PATCH v16 16/16] perf, tools: Add README for info on parsing JSON/map files

2015-08-26 Thread Sukadev Bhattiprolu
Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- tools/perf/pmu-events/README | 122 ++ 1 file changed, 122 insertions(+) create mode 100644 tools/perf/pmu-events/README diff --git a/tools/perf/pmu

[PATCH v16 05/16] perf, tools: Support CPU id matching for x86 v2

2015-08-26 Thread Sukadev Bhattiprolu
Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- v2: Update to new get_cpuid_str() interface --- tools/perf/arch/x86/util/header.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff

[PATCH v16 14/16] perf, tools: Add support for event list topics

2015-08-26 Thread Sukadev Bhattiprolu
a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- Changelog[v14] - [Jiri Olsa] Move jevents support for Topic to a separate patch. --- tools/perf/util/pmu.c | 37 +++-- tools/perf/util/pmu.h

[PATCH v16 15/16] perf, tools: Handle header line in mapfile

2015-08-26 Thread Sukadev Bhattiprolu
From: Andi Kleen a...@linux.intel.com To work with existing mapfiles, assume that the first line in 'mapfile.csv' is a header line and skip over it. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com

[PATCH v16 02/16] perf, tools, jevents: Program to convert JSON file to C style file

2015-08-26 Thread Sukadev Bhattiprolu
. To avoid any conflicts I marked those files as BSD licenced too. As part of perf they become GPLv2. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- v2: Address review feedback. Rename option

[PATCH v16 01/16] perf, tools: Add jsmn `jasmine' JSON parser

2015-08-26 Thread Sukadev Bhattiprolu
Bhattiprolu suka...@linux.vnet.ibm.com --- v2: Address review feedback. v3: Minor checkpatch fixes. v4 (by Sukadev Bhattiprolu) - Rebase to 4.0 and fix minor conflicts in tools/perf/Makefile.perf - Report error if specified events file is invalid. v5 (Sukadev Bhattiprolu

[PATCH v5 1/8] perf: Add a flags parameter to pmu txn interfaces

2015-08-14 Thread Sukadev Bhattiprolu
' parameter and use this parameter to ignore any transactions that are not of type PERF_PMU_TXN_ADD. Thanks to Peter Zijlstra for his input. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- Changelog[v4] - [Peter Zijlstra] Fix an copy-paste error in power_pmu_cancel_txn

[PATCH v5 0/8] perf: Implement group-read of events using txn interface

2015-08-14 Thread Sukadev Bhattiprolu
perf_read_group() loops Peter Zijlstra (Intel) (1): perf: Rename perf_event_read_{one,group}, perf_read_hw Sukadev Bhattiprolu (5): perf: Add a flags parameter to pmu txn interfaces perf: Split perf_event_read() and perf_event_count() perf: Add return value for perf_event_read(). Define

[PATCH v5 2/8] perf: Split perf_event_read() and perf_event_count()

2015-08-14 Thread Sukadev Bhattiprolu
implement the ability to read a group of events using the transaction interface, we would need the two pieces done independently. Break up perf_event_read() and have it just read/update the counter and have the callers compute the total count if necessary. Signed-off-by: Sukadev Bhattiprolu suka

[PATCH v5 3/8] perf: Rename perf_event_read_{one, group}, perf_read_hw

2015-08-14 Thread Sukadev Bhattiprolu
From: Peter Zijlstra (Intel) pet...@infradead.org In order to free up the perf_event_read_group() name: s/perf_event_read_\(one\|group\)/perf_read_\1/g s/perf_read_hw/__perf_read/g Signed-off-by: Peter Zijlstra (Intel) pet...@infradead.org --- kernel/events/core.c | 14 +++--- 1

[PATCH v5 6/8] perf: Add return value for perf_event_read().

2015-08-14 Thread Sukadev Bhattiprolu
value when 'group' parameter is false. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- kernel/events/core.c | 45 ++--- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index 2221ebe

[PATCH v5 8/8] powerpc/perf/hv-24x7: Use PERF_PMU_TXN_READ interface

2015-08-14 Thread Sukadev Bhattiprolu
submitting a new -read() request to the PMU. Thanks to input from Peter Zijlstra. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- Changelog[v3] - [Peter Zijlstra] Save the transaction state in -start_txn() and remove the flags parameter from -commit_txn

[PATCH v5 4/8] perf: Add group reads to perf_event_read()

2015-08-14 Thread Sukadev Bhattiprolu
From: Peter Zijlstra pet...@infradead.org Enable perf_event_read() to update entire groups at once, this will be useful for read transactions. Cc: Ingo Molnar mi...@redhat.com Cc: Arnaldo Carvalho de Melo a...@kernel.org Cc: Michael Ellerman m...@ellerman.id.au Cc: Sukadev Bhattiprolu suka

[PATCH v5 7/8] Define PERF_PMU_TXN_READ interface

2015-08-14 Thread Sukadev Bhattiprolu
-start_txn() and -commit_txn() and continue to read counters one at a time. Thanks to input from Peter Zijlstra. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- Changelog[v4] - [Peter Zijlstra] Add lockdep_assert_held() in perf_event_read_group(). Make sure

[PATCH v5 5/8] perf: Invert perf_read_group() loops

2015-08-14 Thread Sukadev Bhattiprolu
each group for each child. Signed-off-by: Peter Zijlstra (Intel) pet...@infradead.org Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- Changes to Peter's patch: - Add GFP_KERNEL to kzalloc(). - Pass in address of counter to atomic_read(). - Return event-size

Re: [PATCH 09/10] Define PERF_PMU_TXN_READ interface

2015-08-13 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | On Tue, Aug 11, 2015 at 09:14:00PM -0700, Sukadev Bhattiprolu wrote: | | +static void __perf_read_group_add(struct perf_event *leader, u64 read_format, u64 *values) | | { | | + struct perf_event *sub; | | + int n = 1; /* skip @nr

Re: [PATCH V15 00/19] perf, tools: Add support for PMU events in JSON format

2015-08-11 Thread Sukadev Bhattiprolu
Sukadev Bhattiprolu [suka...@linux.vnet.ibm.com] wrote: | CPUs support a large number of performance monitoring events (PMU events) | and often these events are very specific to an architecture/model of the | CPU. To use most of these PMU events with perf, we currently have to identify | them

Re: [PATCH 09/10] Define PERF_PMU_TXN_READ interface

2015-08-11 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | On Sun, Jul 26, 2015 at 10:40:37PM -0700, Sukadev Bhattiprolu wrote: | @@ -3743,7 +3762,13 @@ static u64 perf_event_aggregate(struct perf_event *event, u64 *enabled, | lockdep_assert_held(event-child_mutex); | | list_for_each_entry

[PATCH v4 0/10] Implement group-read of events using txn interface

2015-07-26 Thread Sukadev Bhattiprolu
ignore the -start_txn() and -commit_txn() calls. Peter Zijlstra (Intel) (1): perf: Rename perf_event_read_{one,group}, perf_read_hw Sukadev Bhattiprolu (9): perf: Add a flags parameter to pmu txn interfaces perf: Split perf_event_read() and perf_event_count() perf: Define

[PATCH 03/10] perf: Define perf_event_aggregate()

2015-07-26 Thread Sukadev Bhattiprolu
Move the part of perf_event_read_value() that aggregates the event counts and event times into a new function, perf_event_aggregate(). This would allow us to call perf_event_aggregate() independently. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- Changelog[v4] [Peter

[PATCH 06/10] perf: Add return value for perf_event_read().

2015-07-26 Thread Sukadev Bhattiprolu
Add a return value to perf_event_read(). The return value will be needed later in perf_read_group() implements ability to read several counters in a PERF_PMU_TXN_READ transaction. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- kernel/events/core.c | 19 +-- 1

[PATCH 05/10] perf: Unroll perf_event_read_value() in perf_read_group()

2015-07-26 Thread Sukadev Bhattiprolu
Unroll the calls to perf_event_read_value() in perf_read_group() so we can later optimize out parts we don't need for group events. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- kernel/events/core.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions

[PATCH 09/10] Define PERF_PMU_TXN_READ interface

2015-07-26 Thread Sukadev Bhattiprolu
-start_txn() and -commit_txn() and continue to read counters one at a time. Thanks to input from Peter Zijlstra. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- Changelog[v4] [Peter Zijlstra] Add lockdep_assert_held() in perf_event_read_group(). Make sure

[PATCH 01/10] perf: Add a flags parameter to pmu txn interfaces

2015-07-26 Thread Sukadev Bhattiprolu
' parameter and use this parameter to ignore any transactions that are not of type PERF_PMU_TXN_ADD. Thanks to Peter Zijlstra for his input. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- Changelog[v4] - [Peter Zijlstra] Fix an copy-paste error in power_pmu_cancel_txn

[PATCH 02/10] perf: Split perf_event_read() and perf_event_count()

2015-07-26 Thread Sukadev Bhattiprolu
implement the ability to read a group of events using the transaction interface, we would need the two pieces done independently. Break up perf_event_read() and have it just read/update the counter and have the callers compute the total count if necessary. Signed-off-by: Sukadev Bhattiprolu suka

[PATCH 04/10] perf: Rename perf_event_read_{one,group}, perf_read_hw

2015-07-26 Thread Sukadev Bhattiprolu
From: Peter Zijlstra (Intel) pet...@infradead.org In order to free up the perf_event_read_group() name: s/perf_event_read_\(one\|group\)/perf_read_\1/g s/perf_read_hw/__perf_read/g Signed-off-by: Peter Zijlstra (Intel) pet...@infradead.org --- kernel/events/core.c | 14 +++--- 1

[PATCH 08/10] perf: Add return value to __perf_event_read()

2015-07-26 Thread Sukadev Bhattiprolu
Add a return value to __perf_event_read(). The return value will be needed later in perf_read_group() implements ability to read several counters in a PERF_PMU_TXN_READ transaction. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- kernel/events/core.c | 22

[PATCH 07/10] perf: Add group parameter to perf_event_read()

2015-07-26 Thread Sukadev Bhattiprolu
Add a 'group' parameter to perf_event_read(). It will be used (set to true) in a follow-on patch to update event times of the group. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- kernel/events/core.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions

[PATCH 10/10] powerpc/perf/hv-24x7: Use PMU_TXN_READ interface

2015-07-26 Thread Sukadev Bhattiprolu
submitting a new -read() request to the PMU. Thanks to input from Peter Zijlstra. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- Changelog[v3] [Peter Zijlstra] Save the transaction state in -start_txn() and remove the flags parameter from -commit_txn

Re: [PATCH v3 5/8] perf: Split perf_event_read_value()

2015-07-26 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | On Tue, Jul 14, 2015 at 08:01:52PM -0700, Sukadev Bhattiprolu wrote: | Move the part of perf_event_read_value() that computes the event | counts and event times into a new function, perf_event_compute(). | | This would allow us to call

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-23 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | On Wed, Jul 22, 2015 at 04:19:16PM -0700, Sukadev Bhattiprolu wrote: | Peter Zijlstra [pet...@infradead.org] wrote: | | I've not woken up yet, and not actually fully read the email, but can | | you stuff the entire above chunk inside the IPI

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-22 Thread Sukadev Bhattiprolu
context, so no point in | calling update_*time*() for every event or so. | Do you mean something like this (will move the rename to a separate patch before posting): -- From e8eddb5d3877ebdb3b71213a00aaa980f4010dd0 Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Tue

Re: [PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-21 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | On Tue, Jul 14, 2015 at 08:01:54PM -0700, Sukadev Bhattiprolu wrote: | +/* | + * Use the transaction interface to read the group of events in @leader. | + * PMUs like the 24x7 counters in Power, can use this to queue the events | + * in the -read

Re: [PATCH v5 0/7]powerpc/powernv: Nest Instrumentation support

2015-07-20 Thread Sukadev Bhattiprolu
...@ellerman.id.au | Cc: Benjamin Herrenschmidt b...@kernel.crashing.org | Cc: Paul Mackerras pau...@samba.org | Cc: Anton Blanchard an...@samba.org | Cc: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com | Cc: Anshuman Khandual khand...@linux.vnet.ibm.com | Cc: Stephane Eranian eran...@google.com | Signed-off

Re: [PATCH v3 3/8] perf: Add a flags parameter to pmu txn interfaces

2015-07-16 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | On Tue, Jul 14, 2015 at 08:01:50PM -0700, Sukadev Bhattiprolu wrote: | @@ -1604,6 +1613,12 @@ static void power_pmu_start_txn(struct pmu *pmu) | static void power_pmu_cancel_txn(struct pmu *pmu) | { | struct cpu_hw_events *cpuhw

Re: BUG: perf error on syscalls for powerpc64.

2015-07-16 Thread Sukadev Bhattiprolu
Zumeng Chen [zumeng.c...@gmail.com] wrote: | 3. What I have seen in 3.14.x kernel, | == | And so far, no more difference to 4.x kernel from me about this part if | I'm right. | | *) With 1028ccf5 | | perf list|grep -i syscall got me nothing. | | | *) Without 1028ccf5 |

Re: [PATCH v3 5/8] perf: Split perf_event_read_value()

2015-07-16 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | On Tue, Jul 14, 2015 at 08:01:52PM -0700, Sukadev Bhattiprolu wrote: | Move the part of perf_event_read_value() that computes the event | counts and event times into a new function, perf_event_compute(). | | This would allow us to call

[PATCH v3 0/8] Implement group-read of events using txn interface

2015-07-14 Thread Sukadev Bhattiprolu
. Architectures/PMUs that don't need the READ transaction types simply ignore the -start_txn() and -commit_txn() calls. Peter Zijlstra (Intel) (1): perf: Rename perf_event_read_{one,group}, perf_read_hw Sukadev Bhattiprolu (7): powerpc/perf/hv-24x7: Whitespace - fix parameter alignment powerpc

[PATCH v3 5/8] perf: Split perf_event_read_value()

2015-07-14 Thread Sukadev Bhattiprolu
Move the part of perf_event_read_value() that computes the event counts and event times into a new function, perf_event_compute(). This would allow us to call perf_event_compute() independently. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Changelog[v3] Rather than move

[PATCH v3 7/8] perf: Define PMU_TXN_READ interface

2015-07-14 Thread Sukadev Bhattiprolu
. PMUs that don't implement PERF_PMU_TXN_READ ignore -start_txn() and -commit_txn() and continue to read counters one at a time. Thanks to input from Peter Zijlstra. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- include/linux/perf_event.h |1 + kernel/events/core.c | 35

[PATCH v3 2/8] powerpc/perf/hv-24x7: Simplify extracting counter from result buffer

2015-07-14 Thread Sukadev Bhattiprolu
Simplify code that extracts a 24x7 counter from the HCALL's result buffer. Suggested-by: Joe Perches j...@perches.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- arch/powerpc/perf/hv-24x7.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch

[PATCH v3 1/8] powerpc/perf/hv-24x7: Whitespace - fix parameter alignment

2015-07-14 Thread Sukadev Bhattiprolu
Fix parameter alignment to be consistent with coding style. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- arch/powerpc/perf/hv-24x7.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf

[PATCH v3 6/8] perf: Rename perf_event_read_{one, group}, perf_read_hw

2015-07-14 Thread Sukadev Bhattiprolu
From: Peter Zijlstra (Intel) pet...@infradead.org In order to free up the perf_event_read_group() name: s/perf_event_read_\(one\|group\)/perf_read_\1/g s/perf_read_hw/__perf_read/g Signed-off-by: Peter Zijlstra (Intel) pet...@infradead.org --- kernel/events/core.c | 14 +++--- 1

[PATCH v3 4/8] perf: Split perf_event_read() and perf_event_count()

2015-07-14 Thread Sukadev Bhattiprolu
implement the ability to read a group of events using the transaction interface, we would need the two pieces done independently. Break up perf_event_read() and have it just read/update the counter and have the callers compute the total count if necessary. Signed-off-by: Sukadev Bhattiprolu suka

[PATCH v3 3/8] perf: Add a flags parameter to pmu txn interfaces

2015-07-14 Thread Sukadev Bhattiprolu
' parameter and use this parameter to ignore any transactions that are not of type PERF_PMU_TXN_ADD. Thanks to Peter Zijlstra for his input. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Changelog[v3] - [Peter Zijlstra] Ensure the nop_txn interfaces disable/enable

[PATCH v3 8/8] powerpc/perf/hv-24x7: Use PMU_TXN_READ interface

2015-07-14 Thread Sukadev Bhattiprolu
submitting a new -read() request to the PMU. Thanks to input from Peter Zijlstra. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Changelog[v3] [Peter Zijlstra] Save the transaction state in -start_txn() and drop the flags parameter from -commit_txn() and -cancel_txn

Re: [PATCH v4 4/7] powerpc/powernv: detect supported nest pmus and its events

2015-07-09 Thread Sukadev Bhattiprolu
Sukadev Bhattiprolu [suka...@linux.vnet.ibm.com] wrote: | | @@ -50,6 +163,15 @@ static int nest_ima_dt_parser(void) | | p8ni-vbase = (uint64_t) phys_to_virt(p8ni-pbase); | | } | | | | + /* Look for supported Nest PMU units */ | | + idx = 0; | | + for_each_node_by_type(dev

Re: [PATCH v4 4/7] powerpc/powernv: detect supported nest pmus and its events

2015-07-09 Thread Sukadev Bhattiprolu
Madhavan Srinivasan [ma...@linux.vnet.ibm.com] wrote: | | Are the 'start.*' and 'unit.*' files events by themselves or just attributes | of events? | | These are attributes needed for computation. unit and scale attributes | will be used by perf tool in post-processing the counter data. These

Re: [PATCH v4 4/7] powerpc/powernv: detect supported nest pmus and its events

2015-07-08 Thread Sukadev Bhattiprolu
: Michael Ellerman m...@ellerman.id.au | Cc: Benjamin Herrenschmidt b...@kernel.crashing.org | Cc: Paul Mackerras pau...@samba.org | Cc: Anton Blanchard an...@samba.org | Cc: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com | Cc: Anshuman Khandual khand...@linux.vnet.ibm.com | Cc: Stephane Eranian eran

Re: [PATCH v4 5/7] powerpc/powernv: add event attribute and group to nest pmu

2015-07-08 Thread Sukadev Bhattiprolu
Blanchard an...@samba.org | Cc: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com | Cc: Anshuman Khandual khand...@linux.vnet.ibm.com | Cc: Stephane Eranian eran...@google.com | Signed-off-by: Madhavan Srinivasan ma...@linux.vnet.ibm.com | --- | arch/powerpc/perf/nest-pmu.c | 57

[PATCH] powerpc/perf/24x7: Fix lockdep warning

2015-07-07 Thread Sukadev Bhattiprolu
From 370152d9427e57cd9632b00189f71099f8e85544 Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Date: Tue, 7 Jul 2015 12:21:10 -0400 Subject: [PATCH 1/1] powerpc/perf/24x7: Fix lockdep warning The sysfs attributes for the 24x7 counters are dynamically allocated

Re: [PATCH v2 6/7]powerpc/powernv: generic nest pmu event functions

2015-06-22 Thread Sukadev Bhattiprolu
. Add code to register nest pmus. | | Cc: Michael Ellerman m...@ellerman.id.au | Cc: Benjamin Herrenschmidt b...@kernel.crashing.org | Cc: Paul Mackerras pau...@samba.org | Cc: Anton Blanchard an...@samba.org | Cc: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com | Cc: Anshuman Khandual khand

[PATCH v15 08/19] perf, tools: Support CPU id matching for x86 v2

2015-06-10 Thread Sukadev Bhattiprolu
Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- v2: Update to new get_cpuid_str() interface --- tools/perf/arch/x86/util/header.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff

[PATCH v15 11/19] perf, tools: Add a --no-desc flag to perf list

2015-06-10 Thread Sukadev Bhattiprolu
. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- v2: Rename --quiet to --no-desc. Add option to man page. --- tools/perf/Documentation/perf-list.txt | 8 +++- tools/perf/builtin-list.c

[PATCH V15 00/19] perf, tools: Add support for PMU events in JSON format

2015-06-10 Thread Sukadev Bhattiprolu
header line in mapfile Sukadev Bhattiprolu (9): Use __weak definition from linux/compiler.h perf, tools: Split perf_pmu__new_alias() perf, tools: Use pmu_events table to create aliases perf, tools: Support CPU ID matching for Powerpc perf, tools, jevents: Add support for long descriptions

[PATCH v15 09/19] perf, tools: Support alias descriptions

2015-06-10 Thread Sukadev Bhattiprolu
output: % perf list ... arith.fpu_div [Divide operations executed] arith.fpu_div_active [Cycles when divider is busy executing divide operations] Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo

[PATCH v15 14/19] perf, tools: Add alias support for long descriptions

2015-06-10 Thread Sukadev Bhattiprolu
-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- Changelog[v14] - [Jiri Olsa] Break up independent parts of the patch into separate patches. --- tools/perf/util/parse-events.c | 5 +++-- tools/perf/util/parse-events.h | 3 ++- tools/perf

[PATCH v15 02/19] perf, tools, jevents: Program to convert JSON file to C style file

2015-06-10 Thread Sukadev Bhattiprolu
. To avoid any conflicts I marked those files as BSD licenced too. As part of perf they become GPLv2. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- v2: Address review feedback. Rename option

[PATCH v15 10/19] perf, tools: Query terminal width and use in perf list

2015-06-10 Thread Sukadev Bhattiprolu
a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Namhyung Kim namhy...@kernel.org Acked-by: Jiri Olsa jo...@redhat.com --- tools/perf/util/cache.h | 1 + tools/perf/util/pager.c | 15 +++ tools/perf/util/pmu.c | 3 ++- 3 files changed, 18 insertions(+), 1

[PATCH v15 15/19] perf, tools: Support long descriptions with perf list

2015-06-10 Thread Sukadev Bhattiprolu
of baclears for any type of branch] Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- Changelog[v15] - [Jir Olsa, Andi Kleen] Fix usage strings; update man page. Changelog[v14] - [Jiri

[PATCH v15 04/19] perf, tools: Split perf_pmu__new_alias()

2015-06-10 Thread Sukadev Bhattiprolu
Separate the event parsing code in perf_pmu__new_alias() out into a separate function __perf_pmu__new_alias() so that code can be called indepdently. This is based on an earlier patch from Andi Kleen. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo

[PATCH v15 06/19] perf, tools: Support CPU ID matching for Powerpc

2015-06-10 Thread Sukadev Bhattiprolu
Implement code that returns the generic CPU ID string for Powerpc. This will be used to identify the specific table of PMU events to parse/compare user specified events against. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- Changelog[v14

[PATCH v15 17/19] perf, tools: Add support for event list topics

2015-06-10 Thread Sukadev Bhattiprolu
a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- Changelog[v14] - [Jiri Olsa] Move jevents support for Topic to a separate patch. --- tools/perf/util/pmu.c | 37 +++-- tools/perf/util/pmu.h | 1

[PATCH v15 05/19] perf, tools: Use pmu_events table to create aliases

2015-06-10 Thread Sukadev Bhattiprolu
to specify events using their aliases rather than raw event codes. Based on input and some earlier patches from Andi Kleen, Jiri Olsa. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- Changelog[v4] - Split off unrelated code into separate

[PATCH v15 07/19] perf, tools: Allow events with dot

2015-06-10 Thread Sukadev Bhattiprolu
by the user. I'm not fully sure this change to the scanner is correct (what was the dot special case good for?), but I haven't found anything that breaks with it so far at least. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked

[PATCH v15 16/19] perf, tools, jevents: Add support for event topics

2015-06-10 Thread Sukadev Bhattiprolu
Allow assigning categories Topics field to the PMU events i.e. process the topic field from the JSON file and add a corresponding topic field to the generated C events tables. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked

[PATCH v15 03/19] Use __weak definition from linux/compiler.h

2015-06-10 Thread Sukadev Bhattiprolu
Jiri Olsa pointed out, that the linux/compiler.h defines the attribute '__weak'. We might as well use that. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- tools/perf/util/pmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH v15 18/19] perf, tools: Handle header line in mapfile

2015-06-10 Thread Sukadev Bhattiprolu
From: Andi Kleen a...@linux.intel.com To work with existing mapfiles, assume that the first line in 'mapfile.csv' is a header line and skip over it. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com

[PATCH v15 01/19] perf, tools: Add jsmn `jasmine' JSON parser

2015-06-10 Thread Sukadev Bhattiprolu
Bhattiprolu suka...@linux.vnet.ibm.com --- v2: Address review feedback. v3: Minor checkpatch fixes. v4 (by Sukadev Bhattiprolu) - Rebase to 4.0 and fix minor conflicts in tools/perf/Makefile.perf - Report error if specified events file is invalid. v5 (Sukadev Bhattiprolu

[PATCH v15 13/19] perf, tools, jevents: Add support for long descriptions

2015-06-10 Thread Sukadev Bhattiprolu
Implement support in jevents to parse long descriptions for events that may have them in the JSON files. A follow on patch will make this long description available to user through the 'perf list' command. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka

[PATCH v15 12/19] perf, tools: Add override support for event list CPUID

2015-06-10 Thread Sukadev Bhattiprolu
From: Andi Kleen a...@linux.intel.com Add a PERF_CPUID variable to override the CPUID of the current CPU (within the current architecture). This is useful for testing, so that all event lists can be tested on a single system. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev

[PATCH v15 19/19] perf, tools: Add README for info on parsing JSON/map files

2015-06-10 Thread Sukadev Bhattiprolu
Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Acked-by: Jiri Olsa jo...@redhat.com --- tools/perf/pmu-events/README | 122 +++ 1 file changed, 122 insertions(+) create mode 100644 tools/perf/pmu-events/README diff --git a/tools/perf/pmu

[PATCH v14 06/19] perf, tools: Support CPU ID matching for Powerpc

2015-06-05 Thread Sukadev Bhattiprolu
Implement code that returns the generic CPU ID string for Powerpc. This will be used to identify the specific table of PMU events to parse/compare user specified events against. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Changelog[v14] - [Jiri Olsa] Move

[PATCH v14 13/19] perf, tools, jevents: Add support for long descriptions

2015-06-05 Thread Sukadev Bhattiprolu
Implement support in jevents to parse long descriptions for events that may have them in the JSON files. A follow on patch will make this long description available to user through the 'perf list' command. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka

[PATCH v14 11/19] perf, tools: Add a --no-desc flag to perf list

2015-06-05 Thread Sukadev Bhattiprolu
. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com v2: Rename --quiet to --no-desc. Add option to man page. --- tools/perf/Documentation/perf-list.txt |8 +++- tools/perf/builtin-list.c | 12 tools/perf/util

[PATCH v14 05/19] perf, tools: Use pmu_events table to create aliases

2015-06-05 Thread Sukadev Bhattiprolu
to specify events using their aliases rather than raw event codes. Based on input and some earlier patches from Andi Kleen, Jiri Olsa. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Changelog[v4] - Split off unrelated code into separate patches. Changelog[v3] - [Jiri

[PATCH v14 08/19] perf, tools: Support CPU id matching for x86 v2

2015-06-05 Thread Sukadev Bhattiprolu
Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com v2: Update to new get_cpuid_str() interface --- tools/perf/arch/x86/util/header.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/tools/perf/arch/x86/util/header.c

[PATCH v14 19/19] perf, tools: Add README for info on parsing JSON/map files

2015-06-05 Thread Sukadev Bhattiprolu
Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- tools/perf/pmu-events/README | 122 ++ 1 file changed, 122 insertions(+) create mode 100644 tools/perf/pmu-events/README diff --git a/tools/perf/pmu-events/README b/tools/perf/pmu-events

[PATCH V14 00/14] perf, tools: Add support for PMU events in JSON format

2015-06-05 Thread Sukadev Bhattiprolu
descriptions perf, tools: Query terminal width and use in perf list perf, tools: Add a --no-desc flag to perf list perf, tools: Add override support for event list CPUID perf, tools: Add support for event list topics perf, tools: Handle header line in mapfile Sukadev Bhattiprolu (9): Use __weak

[PATCH v14 04/19] perf, tools: Split perf_pmu__new_alias()

2015-06-05 Thread Sukadev Bhattiprolu
Separate the event parsing code in perf_pmu__new_alias() out into a separate function __perf_pmu__new_alias() so that code can be called indepdently. This is based on an earlier patch from Andi Kleen. Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- tools/perf/util/pmu.c | 42

[PATCH v14 10/19] perf, tools: Query terminal width and use in perf list

2015-06-05 Thread Sukadev Bhattiprolu
Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- tools/perf/util/cache.h |1 + tools/perf/util/pager.c | 15 +++ tools/perf/util/pmu.c |3 ++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/tools

[PATCH v14 14/19] perf, tools: Add alias support for long descriptions

2015-06-05 Thread Sukadev Bhattiprolu
-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Changelog[v14] - [Jiri Olsa] Break up independent parts of the patch into separate patches. --- tools/perf/util/parse-events.c |5 +++-- tools/perf/util/parse-events.h |3 ++- tools/perf/util/pmu.c | 16

[PATCH v14 02/19] perf, tools, jevents: Program to convert JSON file to C style file

2015-06-05 Thread Sukadev Bhattiprolu
. To avoid any conflicts I marked those files as BSD licenced too. As part of perf they become GPLv2. Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com v2: Address review feedback. Rename option to --event-files v3: Add JSON example v4: Update

[PATCH v14 01/19] perf, tools: Add jsmn `jasmine' JSON parser

2015-06-05 Thread Sukadev Bhattiprolu
added a simple wrapper that mmaps a json file and provides some straight forward access functions. Used in follow-on patches to parse event files. Acked-by: Namhyung Kim namhy...@kernel.org Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com

<    1   2   3   4   5   6   7   8   9   >