[PATCH 1/1] powerpc/hv-24x7: Add missing put_cpu_var()

2015-03-30 Thread Sukadev Bhattiprolu
From: Sukadev Bhattiprolu Date: Tue, 17 Feb 2015 14:14:36 -0500 Subject: [PATCH 1/1] powerpc/hv-24x7: Add missing put_cpu_var() Add missing put_cpu_var() for 24x7 requests. This went missing in commit f34b6c7 (3.18-rc3). Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/hv-24x7.c | 4

[PATCH v2 00/10] powerpc/hv-24x7: Reorganize single_24x7_request()

2015-03-30 Thread Sukadev Bhattiprolu
] - Split independent changes in patch 2 into patch 3. - Minor changes to pr_err() (Patch 4). - Move whitespace changes to separate patch (Patch 8). - Minor function renames (Patch 10). Sukadev Bhattiprolu (10): powerpc/hv-24x7: Modify definition of request and result

[PATCH v2 03/10] perf/hv24x7: Use pr_devel() to log message

2015-03-30 Thread Sukadev Bhattiprolu
Use pr_devel_ratelimited() to log error message when the 24x7 HCALL fails. Since users specify events by their sysfs name, the HCALL should succeed. Any errors reported by the HCALL would be of interest to the developer, rather than the user/administrator. Signed-off-by: Sukadev Bhattiprolu

[PATCH v2 01/10] powerpc/hv-24x7: Modify definition of request and result buffers

2015-03-30 Thread Sukadev Bhattiprolu
patch). Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/hv-24x7.c | 77 ++--- arch/powerpc/perf/hv-24x7.h | 8 ++--- 2 files changed, 41 insertions(+), 44 deletions(-) diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c index

[PATCH v2 02/10] powerpc/hv24x7: Remove unnecessary parameter

2015-03-30 Thread Sukadev Bhattiprolu
Remove the 'success_expected' parameter and log the message unconditionally. Changelog[v2] [Michael Ellerman]: Move the change to reduce log message priority into a separate patch. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/hv-2

[PATCH v2 06/10] powerpc/hv-24x7: Rename hv_24x7_event_update

2015-03-30 Thread Sukadev Bhattiprolu
For consistency with the pmu operation ->read() and with other pmus, rename hv_24x7_event_update() to hv_24x7_event_read(). 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.

[PATCH v2 04/10] powerpc/hv-24x7: Drop event_24x7_request()

2015-03-30 Thread Sukadev Bhattiprolu
: Sukadev Bhattiprolu --- arch/powerpc/perf/hv-24x7.c | 40 +++- 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c index 87c9905..f509f3b 100644 --- a/arch/powerpc/perf/hv-24x7.c +++ b/arch

[PATCH v2 05/10] powerpc/hv24x7: Move debug prints to separate function

2015-03-30 Thread Sukadev Bhattiprolu
To simplify/cleanup code, move the rather long printk() to a separate function. Signed-off-by: Sukadev Bhattiprolu Conflicts: arch/powerpc/perf/hv-24x7.c --- arch/powerpc/perf/hv-24x7.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/arch

[PATCH v2 10/10] powerpc/hv-24x7: Break up single_24x7_request

2015-03-30 Thread Sukadev Bhattiprolu
x7_request() and commit_24x7_get_data make_24x7_request(). Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/hv-24x7.c | 56 + 1 file changed, 42 insertions(+), 14 deletions(-) diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24

[PATCH v2 07/10] powerpc/hv-24x7: Define add_event_to_24x7_request()

2015-03-30 Thread Sukadev Bhattiprolu
Move code that maps a perf_event to a 24x7 request buffer into a separate function, add_event_to_24x7_request(). Changelog[v2] [Michael Ellerman]: Move white-space changes to separate patch. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/hv-24x7.c | 59

[PATCH v2 09/10] powerpc/hv-24x7: Define update_event_count()

2015-03-30 Thread Sukadev Bhattiprolu
Move the code to update an event count into a new function, update_event_count(). Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/hv-24x7.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c index

[PATCH v2 08/10] perf/hv24x7: Whitespace cleanup

2015-03-30 Thread Sukadev Bhattiprolu
Fix minor whitespace damages. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/hv-24x7.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c index fe74221..676fb2f9 100644 --- a/arch/powerpc

Re: [PATCH v2 08/10] perf/hv24x7: Whitespace cleanup

2015-04-01 Thread Sukadev Bhattiprolu
Joe Perches [j...@perches.com] wrote: | On Mon, 2015-03-30 at 18:53 -0700, Sukadev Bhattiprolu wrote: | > Fix minor whitespace damages. | | If you are going to do whitespace cleaning, | please verify the patches with scripts/checkpatch.pl --strict. Ok. Will fix up parameter alignment with

[PATCH v2 0/5] perf: Implement event group read using txn interface

2015-04-07 Thread Sukadev Bhattiprolu
rchitectures/PMUs that don't need the READ transaction types simply ignore the ->start_txn() and ->commit_txn() calls. Sukadev Bhattiprolu (5): perf: Add a flags parameter to pmu txn interfaces perf: Split perf_event_read() and perf_event_count() perf: Rename perf_event_r

[PATCH v2 1/5] perf: Add a flags parameter to pmu txn interfaces

2015-04-07 Thread Sukadev Bhattiprolu
interface and have the PMUs cache the transaction type. But that would need slightly more intrusive changes in all PMUs to support a second transaction type. Thanks to Peter Zijlstra for his input. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/core-book3s.c | 16 +

[PATCH v2 2/5] perf: Split perf_event_read() and perf_event_count()

2015-04-07 Thread Sukadev Bhattiprolu
vents using the transaction interface, we would sometimes need one but not both. 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 --- kernel/events/core.c | 14 -- 1

[PATCH v2 3/5] perf: Rename perf_event_read_value

2015-04-07 Thread Sukadev Bhattiprolu
: Sukadev Bhattiprolu --- arch/x86/kvm/pmu.c |6 -- include/linux/perf_event.h |3 ++- kernel/events/core.c | 18 +++--- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c index 8e6b7d8..5896cb1 100644 --- a

[PATCH v2 4/5] perf: Define PMU_TXN_READ interface

2015-04-07 Thread Sukadev Bhattiprolu
MU_TXN_READ will continue to read one counter at a time and ignore the ->start_txn() and ->commit_txn(). Thanks to input from Peter Zijlstra. Signed-off-by: Sukadev Bhattiprolu --- include/linux/perf_event.h |1 + kernel/events/core.c | 33 +++-- 2

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

2015-04-07 Thread Sukadev Bhattiprolu
ent and can avoid submitting a new ->read() request to the PMU. Thanks to input from Peter Zijlstra. Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/hv-24x7.c | 165 +++ 1 file changed, 165 insertions(+) diff --git a/arch/powerpc/perf/hv-24x7.c

[PATCH v9 00/11] Add support for JSON event files.

2015-04-13 Thread Sukadev Bhattiprolu
files perf, tools: Automatically look for event file name for cpu perf, tools: Query terminal width and use in perf list perf, tools: Add a new pmu interface to iterate over all events perf, tools, test: Add test case for alias and JSON parsing perf, tools: Add a --no-desc flag t

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

2015-04-13 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 Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu --- Changelog[v9] (by Sukadev Bhattiprolu) Rebase

[PATCH v9 02/11] perf, tools: Add support for text descriptions of events and alias add

2015-04-13 Thread Sukadev Bhattiprolu
From: Andi Kleen Change pmu.c to allow descriptions of events and add interfaces to add aliases at runtime from another file. To be used by jevents in a followon patch Acked-by: Namhyung Kim Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu --- Changelog[v9] by Sukadev Bhattiprolu

[PATCH v9 03/11] perf, tools, list: Update perf list to output descriptions

2015-04-13 Thread Sukadev Bhattiprolu
From: Andi Kleen Add support to perf list to print aliases with descriptions. Support word wrapping for descriptions. Fix up the sorting code to put aliases with descriptions last. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu --- Changelov[v9] by Sukadev Bhattiprolu

[PATCH v9 04/11] perf, tools: Add support for reading JSON event files

2015-04-13 Thread Sukadev Bhattiprolu
t;: "0", "CounterMask": "0", "Invert": "0", "AnyThread": "0", "EdgeDetect": "0", "PEBS": "0", "PRECISE_STORE": "0", "Errata"

[PATCH v9 05/11] perf, tools: Automatically look for event file name for cpu

2015-04-13 Thread Sukadev Bhattiprolu
From: Andi Kleen When no JSON event file is specified automatically look for a suitable file in ~/.cache/pmu-events. The event file format is per architecture, but can be extended for other architectures. Acked-by: Namhyung Kim Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu

[PATCH v9 06/11] powerpc/perf: Implement get_cpu_str()

2015-04-13 Thread Sukadev Bhattiprolu
option and run: perf stat -e pm_cyc sleep 1 Signed-off-by: Sukadev Bhattiprolu --- Changelog[v9] by Sukadev Bhattiprolu Rebase to 4.0. Changelog[v3]: [Tobias Klauser]: Fix some changelog damage to patch. Changelog[v2]: [Michael Ellerman]: Use PVR instead of AUXV

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

2015-04-13 Thread Sukadev Bhattiprolu
-by: Sukadev Bhattiprolu --- Changelog[v9] by Sukadev Bhattiprolu Rebase to 4.0. --- tools/perf/util/cache.h |1 + tools/perf/util/pager.c | 15 +++ tools/perf/util/pmu.c | 12 ++-- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/tools/perf

[PATCH v9 09/11] perf, tools, test: Add test case for alias and JSON parsing

2015-04-13 Thread Sukadev Bhattiprolu
From: Andi Kleen Add a simple test case to perf test that parses all the available events, including json events. This needs adding an all event iterator to pmu.c Acked-by: Namhyung Kim Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu --- Changelog[v9] by Sukadev Bhattiprolu

[PATCH v9 08/11] perf, tools: Add a new pmu interface to iterate over all events

2015-04-13 Thread Sukadev Bhattiprolu
From: Andi Kleen With calling a callback. To be used in test code added in the next patch. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu --- Changelog[v9] by Sukadev Bhattiprolu Rebase to 4.0 and fix conflicts in: tools/perf/util/pmu.c

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

2015-04-13 Thread Sukadev Bhattiprolu
l PMU event] br_inst_exec.all_branches [Kernel PMU event] Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu --- Changelog[v9] by Sukadev Bhattiprolu Rebase to 4.0 and fix conflicts in tools/perf/builtin-list.c v2: Rename --quiet to --no

[PATCH v9 11/11] perf-download: Download the events json file

2015-04-13 Thread Sukadev Bhattiprolu
d-off-by: Jiri Olsa Signed-off-by: Sukadev Bhattiprolu Changelog[v9] (by Sukadev Bhattiprolu) Add the perf-download script back into patchset. Set default download location to the tools/perf/pmu-events/ directory in Linus's tree. Include code to parse/downlo

Re: 'perf upgrade' (was: Re: [PATCH v9 00/11] Add support for JSON event files.)

2015-04-16 Thread Sukadev Bhattiprolu
| | * Michael Ellerman wrote: | | > > We just merged a patch series that was first sent in 2013. Some | > > things take time to get right. | > | > The first attempt to get symbolic event name support into perf was | > sent in 2010, that's FIVE years ago [1]. | | kgdb took even longer, I thin

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

2015-04-16 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | On Tue, Apr 07, 2015 at 05:34:55PM -0700, Sukadev Bhattiprolu wrote: | > diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h | > index 2b62198..4dc3d70 100644 | > --- a/include/linux/perf_event.h | > +++ b/include/linux/

Re: 'perf upgrade' (was: Re: [PATCH v9 00/11] Add support for JSON event files.)

2015-04-16 Thread Sukadev Bhattiprolu
Ingo Molnar [mi...@kernel.org] wrote: Meant to Cc Tom Huynh as they had a related patchset a few months ago. | | * Michael Ellerman wrote: | | > On Tue, 2015-04-14 at 10:55 +0200, Ingo Molnar wrote: | > > * Sukadev Bhattiprolu wrote: | > > | > > > This is another a

Re: [PATCH v2 4/5] perf: Define PMU_TXN_READ interface

2015-04-16 Thread Sukadev Bhattiprolu
Peter Zijlstra [pet...@infradead.org] wrote: | On Tue, Apr 07, 2015 at 05:34:58PM -0700, Sukadev Bhattiprolu wrote: | > diff --git a/kernel/events/core.c b/kernel/events/core.c | > index 1ac99d1..a001582 100644 | > --- a/kernel/events/core.c | > +++ b/kernel/events/core.c | > @@ -

[PATCH 1/1] powerpc/hv-24x7: Check support before registering PMU

2015-04-29 Thread Sukadev Bhattiprolu
. Reported-by: Gustavo Luiz Duarte Signed-off-by: Sukadev Bhattiprolu --- arch/powerpc/perf/hv-24x7.c | 32 1 file changed, 32 insertions(+) diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c index ec2eb20..19a59a3 100644 --- a/arch/powerpc/perf

[RFC][PATCH 0/4] perf: Enable symbolic event names

2015-05-01 Thread Sukadev Bhattiprolu
similarly use symoblic event names? I am also assuming that if the header files like power8-events.h are easily readable, we don't need the JSON files anymore? TODO: - Maybe translate event names to lower-case? - Allow perf to process event descriptions (need Andi Kleen's patch)

[RFC][PATCH 3/4] perf/powerpc: Move mfspr and friends to header file

2015-05-01 Thread Sukadev Bhattiprolu
mfspr() and related macros will be needed in two separate files. Move these defintions to a common header file. Signed-off-by: Sukadev Bhattiprolu --- tools/perf/arch/powerpc/util/header.c |9 + tools/perf/arch/powerpc/util/header.h |9 + 2 files changed, 10 insertions

[RFC][PATCH 4/4] perf: Create aliases for PMU events

2015-05-01 Thread Sukadev Bhattiprolu
ents_table() and take advantage of this. Signed-off-by: Sukadev Bhattiprolu --- tools/perf/arch/powerpc/util/Build|2 +- tools/perf/arch/powerpc/util/pmu-events.c | 52 +++ tools/perf/arch/powerpc/util/pmu-events.h | 17 +++ tools/perf/util/pmu.c

[PATCH 1/4] perf: Add jsmn `jasmine' JSON parser

2015-05-19 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 Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu --- v2: Address review feedback. v3: Minor checkpatch f

[PATCH 0/4] perf: Add support for PMU events in JSON format

2015-05-19 Thread Sukadev Bhattiprolu
- For architectures that don't have any JSON files, an empty mapping table is created and they should continue to build) Andi Kleen (2): perf, tools: Add jsmn `jasmine' JSON parser jevents: Program to convert JSON file to C style file Sukadev Bhattiprolu (2): U

[PATCH 2/4] perf: jevents: Program to convert JSON file to C style file

2015-05-19 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 speci

[PATCH 3/4] perf: Use pmu_events_map table to create event aliases

2015-05-19 Thread Sukadev Bhattiprolu
At run time, (i.e when perf is starting up), locate the specific events table for the current CPU and create event aliases for each of the events. Use these aliases to parse user's specified perf event. Signed-off-by: Sukadev Bhattiprolu --- tools/perf/arch/powerpc/util/header.c |

[PATCH 1/1] powerpc/perf/hv-24x7: Check support before registering

2015-05-20 Thread Sukadev Bhattiprolu
From 955102eacf035b19080dc659a15d9b8fbd8fae7f Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu Date: Tue, 28 Apr 2015 18:47:58 -0400 Subject: [PATCH 1/1] powerpc/perf/hv-24x7: Check support before registering PMU We currently try to register the 24x7 PMU unconditionally. Not all Power systems

Re: [PATCH 3/4] perf: Use pmu_events_map table to create event aliases

2015-05-20 Thread Sukadev Bhattiprolu
Andi Kleen [a...@linux.intel.com] wrote: | > +/* | > + * Return TRUE if the CPU identified by @vfm, @version, and @type | > + * matches the current CPU. vfm refers to [Vendor, Family, Model], | > + * | > + * Return FALSE otherwise. | > + * | > + * For Powerpc, we only compare @version to the proce

Re: [PATCH 3/4] perf: Use pmu_events_map table to create event aliases

2015-05-20 Thread Sukadev Bhattiprolu
Andi Kleen [a...@linux.intel.com] wrote: | If you need something else in vfm to identify the CPU | can't you just add it there? I wouldn't really call it vfm, it's | really a "abstract cpu identifier per architecture". So if you | need pvr just add it there. Ok. I will change vfm to cpuid_str and

Re: [PATCH 2/4] perf: jevents: Program to convert JSON file to C style file

2015-05-22 Thread Sukadev Bhattiprolu
Jiri Olsa [jo...@redhat.com] wrote: | On Tue, May 19, 2015 at 05:02:08PM -0700, Sukadev Bhattiprolu wrote: | | SNIP | | > --- | > tools/perf/Build |1 + | > tools/perf/Makefile.perf |4 +- | > tools/perf/pmu-events/Build| 38 ++ | >

Re: [PATCH 2/4] perf: jevents: Program to convert JSON file to C style file

2015-05-22 Thread Sukadev Bhattiprolu
Jiri Olsa [jo...@redhat.com] wrote: | On Tue, May 19, 2015 at 05:02:08PM -0700, Sukadev Bhattiprolu wrote: | | SNIP | | > +int main(int argc, char *argv[]) | > +{ | > + int rc; | > + int flags; | | SNIP | | > + | > + rc = uname(&uts); | > + if (rc < 0)

Re: [PATCH 2/4] perf: jevents: Program to convert JSON file to C style file

2015-05-22 Thread Sukadev Bhattiprolu
Andi Kleen [a...@linux.intel.com] wrote: | > pmu-events.c depends only on JSON files relevant to the arch perf is | > being built on and there could be several JSON files per arch. So it | > would complicate the Makefiles. | | Could just use a wildcard dependency on */$(ARCH)/*.json Sure, but sh

Re: [PATCH 4/4] perf: Add power8 PMU events in JSON format

2015-05-27 Thread Sukadev Bhattiprolu
Andi Kleen [a...@linux.intel.com] wrote: | > I know. What I said is make it optional so that we can drop if it's identical. | | Should be easy enough. It's already optional in the jevents parser. I have removed the duplicated entries in power8.json.

[PATCH 0/10] perf: Add support for PMU events in JSON format

2015-05-27 Thread Sukadev Bhattiprolu
ools: Allow events with dot perf, tools: Support CPU id matching for x86 v2 perf, tools: Support alias descriptions perf, tools: Query terminal width and use in perf list perf, tools: Add a --no-desc flag to perf list Sukadev Bhattiprolu (2): Use pmu_events_map table to create event alia

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

2015-05-27 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 Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu --- v2: Address review feedback. v3: Minor checkpatch f

[PATCH 03/10] Use pmu_events_map table to create event aliases

2015-05-27 Thread Sukadev Bhattiprolu
At run time, (i.e when perf is starting up), locate the specific events table for the current CPU and create event aliases for each of the events. Use these aliases to parse user's specified perf event. Signed-off-by: Sukadev Bhattiprolu Changelog[v2] [Andi Kleen] Replac

[PATCH 02/10] jevents: Program to convert JSON file to C style file

2015-05-27 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 speci

[PATCH 04/10] perf, tools: Handle header line in mapfile

2015-05-27 Thread Sukadev Bhattiprolu
From: Andi Kleen Support a header line in the mapfile.csv, to match the existing mapfiles Signed-off-by: Andi Kleen --- tools/perf/pmu-events/jevents.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c index 03f7b65..4365

[PATCH 05/10] perf, tools: Allow events with dot

2015-05-27 Thread Sukadev Bhattiprolu
From: Andi Kleen The Intel events use a dot to separate event name and unit mask. Allow dot in names in the scanner, and remove special handling of dot as EOF. Also remove the hack in jevents to replace dot with underscore. This way dotted events can be specified directly by the user. I'm not fu

[PATCH 07/10] perf, tools: Support alias descriptions

2015-05-27 Thread Sukadev Bhattiprolu
From: Andi Kleen Add support to print alias descriptions in perf list, which are taken from the generated event files. The sorting code is changed to put the events with descriptions at the end. The descriptions are printed as possibly multiple word wrapped lines. Example output: % perf list .

[PATCH 06/10] perf, tools: Support CPU id matching for x86 v2

2015-05-27 Thread Sukadev Bhattiprolu
From: Andi Kleen Implement the code to match CPU types to mapfile types for x86 based on CPUID. This extends an existing similar function, but changes it to use the x86 mapfile cpu description. This allows to resolve event lists generated by jevents. v2: Update to new get_cpuid_str() interface S

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

2015-05-27 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. Acked-by: Namhyung Kim Signed-off-by: Andi Kleen --- tools/pe

[PATCH 09/10] perf, tools: Add a --no-desc flag to perf list

2015-05-27 Thread Sukadev Bhattiprolu
From: Andi Kleen Add a --no-desc flag to perf list to not print the event descriptions that were earlier added for JSON events. This may be useful to get a less crowded listing. It's still default to print descriptions as that is the more useful default for most users. v2: Rename --quiet to --n

Re: [PATCH 04/10] perf, tools: Handle header line in mapfile

2015-05-28 Thread Sukadev Bhattiprolu
Jiri Olsa [jo...@redhat.com] wrote: | > if (line[0] == '#' || line[0] == '\n') | > continue; | > + if (!strncmp(line, "Family", 6)) | > + continue; | | I think we should fix mapfiles to put the 'Family' starting | line as a comment.. the

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

2015-06-02 Thread Sukadev Bhattiprolu
vent list CPUID perf, tools: Support long descriptions with perf list -v perf, tools: Add support for event list topics perf, tools: Handle header line in mapfile Sukadev Bhattiprolu (1): perf, tools: Use pmu_events_map table to create event aliases tools/perf/Documentation/perf-list.txt |

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

2015-06-02 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 speci

[PATCH v13 03/14] perf, tools: Use pmu_events_map table to create event aliases

2015-06-02 Thread Sukadev Bhattiprolu
At run time, (i.e when perf is starting up), locate the specific events table for the current CPU and create event aliases for each of the events. Use these aliases to parse user's specified perf event. Signed-off-by: Sukadev Bhattiprolu Changelog[v3] [Jiri Olsa] Fix a memory leak

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

2015-06-02 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 Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu --- v2: Address review feedback. v3: Minor checkpatch f

[PATCH v13 04/14] perf, tools: Allow events with dot

2015-06-02 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. V2: Add the dot to name too, to handle events outside cpu// Acked-by: Namhyung Kim Signed-off-by: Andi Kleen Signed-off-b

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

2015-06-02 Thread Sukadev Bhattiprolu
: Sukadev Bhattiprolu 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 146d12a..a74a48d 100644

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

2015-06-02 Thread Sukadev Bhattiprolu
-by: Sukadev Bhattiprolu Conflicts: tools/perf/util/pager.c --- 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

[PATCH v13 06/14] perf, tools: Support alias descriptions

2015-06-02 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 Changelog - Delete a redundant free() --- tools/perf/util/pmu.c | 83

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

2015-06-02 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

[PATCH v13 10/14] perf, tools: Add override support for event list CPUID

2015-06-02 Thread Sukadev Bhattiprolu
From: Andi Kleen Add a PERF_CPUID variable to override the CPUID of the current CPU. 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 v2: Fix double free in earlier version. Print actual

[PATCH v13 09/14] perf, tools: Group alias perf list by section

2015-06-02 Thread Sukadev Bhattiprolu
From: Andi Kleen The first first element in an hardware event name defines the general area, usually the part of the micro architecture it is refering to. Group the perf list output by these sections by adding section headers. Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu

[PATCH v13 12/14] perf, tools: Add support for event list topics

2015-06-02 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 Bhattiprolu

[PATCH v13 11/14] perf, tools: Support long descriptions with perf list -v

2015-06-02 Thread Sukadev Bhattiprolu
number of baclears for any type of branch] Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu --- tools/perf/builtin-list.c |9 ++--- tools/perf/pmu-events/jevents.c| 29 - tools/perf/pmu-events/jevents.h|2 +- tools/perf/pmu

[PATCH v13 13/14] perf, tools: Handle header line in mapfile

2015-06-02 Thread Sukadev Bhattiprolu
From: Andi Kleen Support a header line in the mapfile.csv, to match the existing mapfiles Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu Changelog[v2] All architectures may not use the "Family" to identify. So, assume first line is header. --- tool

[PATCH v13 14/14] perf, tools: Add README for the JSON/map files parsing

2015-06-02 Thread Sukadev Bhattiprolu
Signed-off-by: Sukadev Bhattiprolu --- tools/perf/pmu-events/README | 115 ++ 1 file changed, 115 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

Re: [PATCH v13 12/14] perf, tools: Add support for event list topics

2015-06-02 Thread Sukadev Bhattiprolu
Sukadev Bhattiprolu [suka...@linux.vnet.ibm.com] wrote: | From: Andi Kleen | | Add support to group the output of perf list by the Topic field | in the JSON file. [PATCH 9/14] has been dropped from this set. This alters the current, patch [PATCH 12/14], slightly, which is included below. The

Re: [PATCH v13 09/14] perf, tools: Group alias perf list by section

2015-06-02 Thread Sukadev Bhattiprolu
Please drop this patch. It was incorrectly included in the set. Also, see the updated Patch 12/14. Current set of patches are in the json-v13.1 branch: https://github.com/sukadev/linux/tree/json-v13.1 Sukadev Sukadev Bhattiprolu [suka...@linux.vnet.ibm.com] wrote: | From: Andi Kleen

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

2015-06-02 Thread Sukadev Bhattiprolu
Sukadev Bhattiprolu [suka...@linux.vnet.ibm.com] wrote: | | These patches are available from: | | https://github.com:sukadev/linux.git | | Branch Description | -- | json

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

2015-06-04 Thread Sukadev Bhattiprolu
e to C style file perf, tools: Allow events with dot perf, tools: Support CPU id matching for x86 v2 perf, tools: Support alias 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

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

2015-06-04 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 --- tools/perf/util/pmu.c | 42

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

2015-06-04 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 Signed-off-by: Andi Kleen Signed-off-by: Sukadev Bhattiprolu --- v2: Address review feedback. v3: Minor checkpatch f

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

2015-06-04 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 speci

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

2015-06-04 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. V2: Add the dot to name too, to handle events outside cpu// Acked-by: Namhyung Kim Signed-off-by: Andi Kleen Signed-off-b

[PATCH v14 03/19] Use __weak definition from

2015-06-04 Thread Sukadev Bhattiprolu
Jiri Olsa pointed out, that the defines the attribute '__weak'. We might as well use that. Signed-off-by: Sukadev Bhattiprolu --- 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/pmu.c index 0fcc62

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

2015-06-04 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 Changelog[v14] - [Jiri Olsa] Move this independent code off into a

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

2015-06-04 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 Changelog[v4] - Split off unrelated code into separate patches. Changelog[v3] - [Jiri Olsa] Fix memo

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

2015-06-04 Thread Sukadev Bhattiprolu
: Sukadev Bhattiprolu 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 146d12a..a74a48d 100644

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

2015-06-04 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 Changelog - Delete a redundant free() Changelog[v14] - [Jiri Olsa] Fail

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

2015-06-04 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 v2: Fix double free in

[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

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

Re: [PATCH V3 2/3] powerpc, ptrace: Enable support for transactional memory register sets

2014-08-27 Thread Sukadev Bhattiprolu
Anshuman Khandual [khand...@linux.vnet.ibm.com] wrote: | This patch enables get and set of transactional memory related register | sets through PTRACE_GETREGSET/PTRACE_SETREGSET interface by implementing | four new powerpc specific register sets i.e REGSET_TM_SPR, REGSET_TM_CGPR, | REGSET_TM_CFPR,

  1   2   3   4   5   6   7   8   9   >