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

2015-09-03 Thread Sukadev Bhattiprolu
From: "Peter Zijlstra (Intel)" 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) --- kernel/events/core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletion

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

2015-09-03 Thread Sukadev Bhattiprolu
en we 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 --- k

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

2015-09-03 Thread Sukadev Bhattiprolu
'txn_flags' 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 --- Changelog[v6] - [Peter Zijlstra] - Change txn_flags to unsigned int.

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

2015-09-03 Thread Sukadev Bhattiprolu
xn() calls. Peter Zijlstra (2): perf: Add group reads to perf_event_read() perf: Invert perf_read_group() loops Peter Zijlstra (Intel) (1): perf: Rename perf_event_read_{one,group}, perf_read_hw Sukadev Bhattiprolu (7): perf/sparc: Remove unnecessary assignment perf: Add a flags param

[[PATCH v6 01/10] sparc/perf: Remove unnecessary assignment

2015-09-03 Thread Sukadev Bhattiprolu
In ->commit_txn() 'cpuc' is already initialized when it is declared, so we can remove the duplicate assignment. Signed-off-by: Sukadev Bhattiprolu --- arch/sparc/kernel/perf_event.c |1 - 1 file changed, 1 deletion(-) diff --git a/arch/sparc/kernel/perf_event.c b/arch

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 ma

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 by

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

2015-08-25 Thread Sukadev Bhattiprolu
Signed-off-by: Sukadev Bhattiprolu Acked-by: Jiri Olsa --- 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/README

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

2015-08-25 Thread Sukadev Bhattiprolu
From: Andi Kleen 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 Signed-off-by: Sukadev Bhattiprolu Acked-by: Jiri Olsa --- Changelog[v2] All architectures may not use the "Fami

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

2015-08-25 Thread Sukadev Bhattiprolu
] br_inst_exec.all_direct_jmp [Speculative and retired macro-unconditional branches excluding calls and indirects] br_inst_exec.all_direct_near_call [Speculative and retired direct near calls] br_inst_exec.all_indirect_jump_non_call_ret Signed-off-by: Andi Kleen Signed-off-by: Sukadev

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

2015-08-25 Thread Sukadev Bhattiprolu
Previously we were dropping the useful longer descriptions that some events have in the event list completely. Now that jevents provides support for longer descriptions (see previous patch), add support for parsing the long descriptions Signed-off-by: Andi Kleen Signed-off-by: Sukadev

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

2015-08-25 Thread Sukadev Bhattiprolu
baclears for any type of branch] Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Jiri Olsa --- Changelog[v15] - [Jir Olsa, Andi Kleen] Fix usage strings; update man page. Changelog[v14] - [Jiri Olsa] Break up independent parts of the patch into

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

2015-08-25 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 Signed-off-by: Sukadev Bhattiprolu Acked-by: Jiri Olsa --- Changelog[v14]

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

2015-08-25 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 Signed-off-by: Sukadev Bhattiprolu Acked-by:

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

2015-08-25 Thread Sukadev Bhattiprolu
Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Jiri Olsa --- 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/parse-events.c |4 ++--

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

2015-08-25 Thread Sukadev Bhattiprolu
From: Andi Kleen 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 Signed-off-by: Sukadev Bhattiprolu Acked-by: Jiri Olsa

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

2015-08-25 Thread Sukadev Bhattiprolu
From: Andi Kleen Automatically adapt the now wider and word wrapped perf list output to wider terminals. This requires querying the terminal before the auto pager takes over, and exporting this information from the pager subsystem. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu

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

2015-08-25 Thread Sukadev Bhattiprolu
: Sukadev Bhattiprolu Acked-by: Jiri Olsa --- 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 b/tools/perf/arch/x86/util/header.c index

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

2015-08-25 Thread Sukadev Bhattiprolu
... arith.fpu_div [Divide operations executed] arith.fpu_div_active [Cycles when divider is busy executing divide operations] Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Jiri Olsa --- Changelog - Delete a redundant free() Changelog[v14

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

2015-08-25 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 Acked-by: Jiri Olsa --- Changelog[v14] - [Jiri Olsa] Move this

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

2015-08-25 Thread Sukadev Bhattiprolu
he user 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 Acked-by: Jiri Olsa --- Changelog[v4] - Split off unrelated code into separate patches. Changelog[v3] -

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

2015-08-25 Thread Sukadev Bhattiprolu
lows parsing Intel style JSON event files. This allows to use an Intel event list directly with perf. The Intel event lists can be quite large and are too big to store in unswappable kernel memory. The conversion from JSON to C-style is straight forward. The parser knows (very little) Intel spe

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

2015-08-25 Thread Sukadev Bhattiprolu
ion I 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 Acked-by: Jiri Olsa Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu --- v2: Address review feedback. v3: Minor

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

2015-08-25 Thread Sukadev Bhattiprolu
: 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 (7): perf, tools: Use pmu_eve

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

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

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

2015-08-14 Thread Sukadev Bhattiprolu
From: Peter Zijlstra Enable perf_event_read() to update entire groups at once, this will be useful for read transactions. Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Michael Ellerman Cc: Sukadev Bhattiprolu Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r

[PATCH v5 7/8] Define PERF_PMU_TXN_READ interface

2015-08-13 Thread Sukadev Bhattiprolu
nt 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 --- Changelog[v4] - [Peter Zijlstra] Add lockdep_assert_held() in perf_event_read_group(). Make s

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

2015-08-13 Thread Sukadev Bhattiprolu
child. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Sukadev Bhattiprolu --- Changes to Peter's patch: - Add GFP_KERNEL to kzalloc(). - Pass in address of counter to atomic_read(). - Return event->size rather than leader->size (perf_read_group())

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

2015-08-13 Thread Sukadev Bhattiprolu
en we 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 --- k

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

2015-08-13 Thread Sukadev Bhattiprolu
the return value when 'group' parameter is false. Signed-off-by: Sukadev Bhattiprolu --- 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 3/8] perf: Rename perf_event_read_{one, group}, perf_read_hw

2015-08-13 Thread Sukadev Bhattiprolu
From: "Peter Zijlstra (Intel)" 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) --- kernel/events/core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletion

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

2015-08-13 Thread Sukadev Bhattiprolu
'txn_flags' 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 --- 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-13 Thread Sukadev Bhattiprolu
. Peter Zijlstra (2): perf: Add group reads to perf_event_read() perf: Invert 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()

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;

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-&g

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 by

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 allo

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

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

[PATCH 09/10] Define PERF_PMU_TXN_READ interface

2015-07-26 Thread Sukadev Bhattiprolu
nt 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 --- Changelog[v4] [Peter Zijlstra] Add lockdep_assert_held() in perf_event_read_group(). Make s

[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 --- kernel/events/core.c | 22 +++--- 1 file changed, 19

[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 --- kernel/events/core.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ker

[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 --- kernel/events/core.c | 19 +-- 1 file changed, 13

[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 --- kernel/events/core.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/kernel/e

[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 --- Changelog[v4] [Peter Zijlstra] Add missing

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

2015-07-26 Thread Sukadev Bhattiprolu
From: "Peter Zijlstra (Intel)" 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) --- kernel/events/core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletion

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

2015-07-26 Thread Sukadev Bhattiprolu
en we 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 --- k

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

2015-07-26 Thread Sukadev Bhattiprolu
tectures/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 (9): perf: Add a flags parameter to pmu txn interfaces

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

2015-07-26 Thread Sukadev Bhattiprolu
'txn_flags' 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 --- Changelog[v4] - [Peter Zijlstra] Fix an copy-paste error in power_pmu_cancel_txn().

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

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

2015-07-22 Thread Sukadev Bhattiprolu
same 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 Date: Tue, 7 Jul 2015 21:45:23

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 | >

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

2015-07-20 Thread Sukadev Bhattiprolu
Herrenschmidt | Cc: Paul Mackerras | Cc: Anton Blanchard | Cc: Sukadev Bhattiprolu | Cc: Anshuman Khandual | Cc: Stephane Eranian | Signed-off-by: Madhavan Srinivasan Thanks for addressing my comments from earlier version. Reviewed-by: Sukadev Bhattiprolu

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 | root@

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 allo

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_e

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

2015-07-14 Thread Sukadev Bhattiprolu
From: "Peter Zijlstra (Intel)" 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) --- kernel/events/core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletion

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

2015-07-14 Thread Sukadev Bhattiprolu
erf_event and can avoid submitting a new ->read() request to the PMU. Thanks to input from Peter Zijlstra. Signed-off-by: Sukadev Bhattiprolu Changelog[v3] [Peter Zijlstra] Save the transaction state in ->start_txn() and drop the flags parameter from ->commit_txn() and ->

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

2015-07-14 Thread Sukadev Bhattiprolu
t once. 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 --- include/linux/perf_event.h |1 + kernel/events/co

[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 Changelog[v3] Rather than move perf_event_read() into

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

2015-07-14 Thread Sukadev Bhattiprolu
'txn_flags' 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 Changelog[v3] - [Peter Zijlstra] Ensure the nop_txn interfaces disable/enable

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

2015-07-14 Thread Sukadev Bhattiprolu
en we 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 --- k

[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 Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/hv-24x7.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc

[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 --- 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/hv-24x7.c index df95629

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

2015-07-14 Thread Sukadev Bhattiprolu
nsaction interface unconditionally to avoid special-case code. 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

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-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_ty

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

2015-07-08 Thread Sukadev Bhattiprolu
Madhavan Srinivasan [ma...@linux.vnet.ibm.com] wrote: | Add code to create event/format attributes and attribute groups for | each nest pmu. | | Cc: Michael Ellerman | Cc: Benjamin Herrenschmidt | Cc: Paul Mackerras | Cc: Anton Blanchard | Cc: Sukadev Bhattiprolu | Cc: Anshuman Khandual

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

2015-07-08 Thread Sukadev Bhattiprolu
: Michael Ellerman | Cc: Benjamin Herrenschmidt | Cc: Paul Mackerras | Cc: Anton Blanchard | Cc: Sukadev Bhattiprolu | Cc: Anshuman Khandual | Cc: Stephane Eranian | Signed-off-by: Madhavan Srinivasan | --- | arch/powerpc/perf/nest-pmu.c | 124 ++- | 1

[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 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. Initialize the attributes using

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

2015-06-22 Thread Sukadev Bhattiprolu
nest pmus. | | Cc: Michael Ellerman | Cc: Benjamin Herrenschmidt | Cc: Paul Mackerras | Cc: Anton Blanchard | Cc: Sukadev Bhattiprolu | Cc: Anshuman Khandual | Cc: Stephane Eranian | Signed-off-by: Madhavan Srinivasan | --- | arch/powerpc/perf/nest-pmu.c | 109

[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 Acked-by: Jiri Olsa --- 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/README

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

2015-06-10 Thread Sukadev Bhattiprolu
From: Andi Kleen 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 Signed-off-by: Sukadev Bhattiprolu Acked-by: Jiri Olsa --- Changelog[v2] All architectures may not use the "Fami

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

2015-06-10 Thread Sukadev Bhattiprolu
] br_inst_exec.all_direct_jmp [Speculative and retired macro-unconditional branches excluding calls and indirects] br_inst_exec.all_direct_near_call [Speculative and retired direct near calls] br_inst_exec.all_indirect_jump_non_call_ret Signed-off-by: Andi Kleen Signed-off-by: Sukadev

[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 Signed-off-by: Sukadev Bhattiprolu Acked-by: Jiri Olsa --- Changelog[v14]

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

2015-06-10 Thread Sukadev Bhattiprolu
baclears for any type of branch] Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Jiri Olsa --- Changelog[v15] - [Jir Olsa, Andi Kleen] Fix usage strings; update man page. Changelog[v14] - [Jiri Olsa] Break up independent parts of the patch into

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

2015-06-10 Thread Sukadev Bhattiprolu
Previously we were dropping the useful longer descriptions that some events have in the event list completely. Now that jevents provides support for longer descriptions (see previous patch), add support for parsing the long descriptions Signed-off-by: Andi Kleen Signed-off-by: Sukadev

[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 Signed-off-by: Sukadev Bhattiprolu Acked-by:

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

2015-06-10 Thread Sukadev Bhattiprolu
From: Andi Kleen 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 Signed-off-by: Sukadev Bhattiprolu Acked-by: Jiri Olsa

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

2015-06-10 Thread Sukadev Bhattiprolu
Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Jiri Olsa --- 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/parse-events.c | 4 ++-- tools

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

2015-06-10 Thread Sukadev Bhattiprolu
From: Andi Kleen Automatically adapt the now wider and word wrapped perf list output to wider terminals. This requires querying the terminal before the auto pager takes over, and exporting this information from the pager subsystem. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu

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

2015-06-10 Thread Sukadev Bhattiprolu
: Sukadev Bhattiprolu Acked-by: Jiri Olsa --- 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 b/tools/perf/arch/x86/util/header.c index

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

2015-06-10 Thread Sukadev Bhattiprolu
... arith.fpu_div [Divide operations executed] arith.fpu_div_active [Cycles when divider is busy executing divide operations] Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Acked-by: Jiri Olsa --- Changelog - Delete a redundant free() Changelog[v14

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

2015-06-10 Thread Sukadev Bhattiprolu
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 Signed-off-by: Sukadev Bhattiprolu Acked-by: Namhyung Kim Acked-by: Jiri Olsa --- V2: Add the dot t

[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 Acked-by: Jiri Olsa --- Changelog[v14] - [Jiri Olsa] Move this

[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 Acked-by: Jiri Olsa --- tools/perf/util/pmu.c | 42

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

2015-06-10 Thread Sukadev Bhattiprolu
he user 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 Acked-by: Jiri Olsa --- Changelog[v4] - Split off unrelated code into separate patches. Changelog[v3] -

[PATCH v15 03/19] Use __weak definition from

2015-06-10 Thread Sukadev Bhattiprolu
Jiri Olsa pointed out, that the defines the attribute '__weak'. We might as well use that. Signed-off-by: Sukadev Bhattiprolu Acked-by: Jiri Olsa --- tools/perf/util/pmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/pmu.c b/tools/perf/util/p

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

2015-06-10 Thread Sukadev Bhattiprolu
lows parsing Intel style JSON event files. This allows to use an Intel event list directly with perf. The Intel event lists can be quite large and are too big to store in unswappable kernel memory. The conversion from JSON to C-style is straight forward. The parser knows (very little) Intel spe

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

2015-06-10 Thread Sukadev Bhattiprolu
ion I 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 Acked-by: Jiri Olsa Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu --- v2: Address review feedback. v3: Minor

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

2015-06-10 Thread Sukadev Bhattiprolu
ag 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 definition from perf, tools: Split perf_pmu__new_alias() perf, tools: Use pmu_events table to

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

2015-06-05 Thread Sukadev Bhattiprolu
Andi Kleen [a...@linux.intel.com] wrote: | On Fri, Jun 05, 2015 at 12:21:38PM +0200, Jiri Olsa wrote: | > On Thu, Jun 04, 2015 at 11:27:23PM -0700, Sukadev Bhattiprolu wrote: | > | > SNIP | > | > > --- | > > tools/perf/builtin-list.c | 11 --- | > > 1 fi

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

2015-06-04 Thread Sukadev Bhattiprolu
Signed-off-by: Sukadev Bhattiprolu --- 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/README new file mode 100644

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

2015-06-04 Thread Sukadev Bhattiprolu
From: Andi Kleen 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 Signed-off-by: Sukadev Bhattiprolu Changelog[v2] All architectures may not use the "Family" to identify. So,

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

2015-06-04 Thread Sukadev Bhattiprolu
] br_inst_exec.all_direct_jmp [Speculative and retired macro-unconditional branches excluding calls and indirects] br_inst_exec.all_direct_near_call [Speculative and retired direct near calls] br_inst_exec.all_indirect_jump_non_call_ret Signed-off-by: Andi Kleen Signed-off-by: Sukadev

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

2015-06-04 Thread Sukadev Bhattiprolu
baclears for any type of branch] Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Changelog[v14] - [Jiri Olsa] Break up independent parts of the patch into separate patches. --- tools/perf/builtin-list.c | 11 --- 1 file changed, 8 insertions(+), 3

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

2015-06-04 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 Signed-off-by: Sukadev Bhattiprolu Changelog[v14] [Jiri Olsa]

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

2015-06-04 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 Signed-off-by: Sukadev Bhattiprolu Cha

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

2015-06-04 Thread Sukadev Bhattiprolu
Previously we were dropping the useful longer descriptions that some events have in the event list completely. Now that jevents provides support for longer descriptions (see previous patch), add support for parsing the long descriptions Signed-off-by: Andi Kleen Signed-off-by: Sukadev

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

2015-06-04 Thread Sukadev Bhattiprolu
-by: Sukadev Bhattiprolu --- 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/perf/util/cache.h b/tools/perf/util/cache.h index c861373..8e0d4b8 100644 --- a

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

2015-06-04 Thread Sukadev Bhattiprolu
Andi Kleen Signed-off-by: Sukadev Bhattiprolu 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/parse-events.c |4 ++-- tools/perf/util/parse-eve

<    1   2   3   4   5   6   7   8   9   >