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

2015-06-05 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 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 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 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 18/19] perf, tools: Handle header line in mapfile

2015-06-05 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 Changelog[v2] All

[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 15/19] perf, tools: Support long descriptions with perf list

2015-06-05 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 Changelog[v14] - [Jiri Olsa] Break up independent parts of the patch into separate patches. --- tools/perf/builtin-list.c | 11

[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 03/19] Use __weak definition from linux/compiler.h

2015-06-05 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 --- tools/perf/util/pmu.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/pmu.c b

[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 16/19] perf, tools, jevents: Add support for event topics

2015-06-05 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 Changelog

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

2015-06-05 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 Changelog

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

[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 17/19] perf, tools: Add support for event list topics

2015-06-05 Thread Sukadev Bhattiprolu
a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Changelog[v14] - [Jiri Olsa] Move jevents support for Topic to a separate patch. --- tools/perf/util/pmu.c | 36 ++-- tools/perf/util/pmu.h |1 + 2 files changed, 27 insertions

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

2015-06-05 Thread Sukadev Bhattiprolu
Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- tools/perf/util/parse-events.l |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l index 09e738f..13cef3c 100644

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

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 file changed, 8 insertions(+), 3 deletions

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

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

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

2015-06-02 Thread Sukadev Bhattiprolu
-by: 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
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-events.h

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

[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 11/14] perf, tools: Support long descriptions with perf list -v

2015-06-02 Thread Sukadev Bhattiprolu
the 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 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 04/14] perf, tools: Allow events with dot

2015-06-02 Thread Sukadev Bhattiprolu
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-by: Sukadev

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

2015-06-02 Thread Sukadev Bhattiprolu
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 fixes. v4 (by Sukadev

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

2015-06-02 Thread Sukadev Bhattiprolu
ort 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 |8 +- tools/perf/Makefile.perf

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

2015-06-02 Thread Sukadev Bhattiprolu
ws 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 specific inform

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

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 a...@linux.intel.com | | 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

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

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

2015-06-02 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 V13 00/14] perf, tools: Add support for PMU events in JSON format

2015-06-02 Thread Sukadev Bhattiprolu
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 |8 +- tools/perf/Makefile.perf | 25 +- tools/perf/arch/powerpc/util/header.c

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

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

[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 suka...@linux.vnet.ibm.com --- 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

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

2015-06-02 Thread Sukadev Bhattiprolu
From: Andi Kleen a...@linux.intel.com Support a header line in the mapfile.csv, to match the existing mapfiles Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com Changelog[v2] All architectures may not use the Family to identify

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

2015-06-02 Thread Sukadev Bhattiprolu
event counts the number 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 --- tools/perf/builtin-list.c |9 ++--- tools/perf/pmu-events/jevents.c| 29

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

2015-06-02 Thread Sukadev Bhattiprolu
Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- tools/perf/util/pmu.c | 17 + 1 file changed, 17 insertions(+) diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c index 417333b..8d91fa7 100644 --- a/tools/perf/util/pmu.c +++ b/tools/perf/util/pmu.c

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

2015-06-02 Thread Sukadev Bhattiprolu
Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- tools/perf/pmu-events/jevents.c| 16 +++- tools/perf/pmu-events/jevents.h|3 ++- tools/perf/pmu-events/pmu-events.h |1 + tools/perf/util/pmu.c | 34 -- tools

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

2015-06-02 Thread Sukadev Bhattiprolu
Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com --- tools/perf/util/parse-events.l |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l index 09e738f..13cef3c 100644

[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 suka...@linux.vnet.ibm.com Changelog[v3] [Jiri

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

2015-06-02 Thread Sukadev Bhattiprolu
From: Andi Kleen a...@linux.intel.com 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 a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka

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

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

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

2015-06-02 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 v13 07/14] perf, tools: Query terminal width and use in perf list

2015-06-02 Thread Sukadev Bhattiprolu
Signed-off-by: Andi Kleen a...@linux.intel.com Signed-off-by: Sukadev Bhattiprolu suka...@linux.vnet.ibm.com 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

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

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

Re: More updates for event lists in perf list

2015-05-31 Thread Sukadev Bhattiprolu
Andi Kleen [a...@firstfloor.org] wrote: | This adds support for the event topics that Ingo requested, and | replaces the earlier event group patch. JSON files now have a Topic | header that is used by perf list to group events. | | This applies on top of Sukadev's patchkit. In addition | the

Re: More updates for event lists in perf list

2015-05-31 Thread Sukadev Bhattiprolu
Andi Kleen [a...@firstfloor.org] wrote: | This adds support for the event topics that Ingo requested, and | replaces the earlier event group patch. JSON files now have a Topic | header that is used by perf list to group events. | | This applies on top of Sukadev's patchkit. In addition | the

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

Re: [PATCH 3/3] perf, tools: Fix jevents dependencies

2015-05-28 Thread Sukadev Bhattiprolu
Andi Kleen [a...@firstfloor.org] wrote: | From: Andi Kleen | | The "find" based dependencies for the JSON files didn't work me. I | didn't get a rebuild when the JSON files changed. Hmm, it works for me every time. I like the 'find' better because it is more compact and allows mulitple levels.

Re: [PATCH 3/3] perf, tools: Fix jevents dependencies

2015-05-28 Thread Sukadev Bhattiprolu
Andi Kleen [a...@firstfloor.org] wrote: | From: Andi Kleen a...@linux.intel.com | | The find based dependencies for the JSON files didn't work me. I | didn't get a rebuild when the JSON files changed. Hmm, it works for me every time. I like the 'find' better because it is more compact and allows

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 way

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

2015-05-27 Thread Sukadev Bhattiprolu
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 fixes. v4 (by Sukadev

[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

[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

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

2015-05-27 Thread Sukadev Bhattiprolu
ws 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 specific inform

[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

[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

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

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

[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 0/10] perf: Add support for PMU events in JSON format

2015-05-27 Thread Sukadev Bhattiprolu
ith 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 aliases perf: Add powe

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. -- To unsubscribe from this list: send the

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. -- To unsubscribe from this list: send the

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

2015-05-27 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 08/10] perf, tools: Query terminal width and use in perf list

2015-05-27 Thread Sukadev Bhattiprolu
From: Andi Kleen a...@linux.intel.com 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 namhy...@kernel.org

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

2015-05-27 Thread Sukadev Bhattiprolu
From: Andi Kleen a...@linux.intel.com 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:

[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 suka...@linux.vnet.ibm.com Changelog[v2] [Andi

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

2015-05-27 Thread Sukadev Bhattiprolu
From: Andi Kleen a...@linux.intel.com 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

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

2015-05-27 Thread Sukadev Bhattiprolu
From: Andi Kleen a...@linux.intel.com 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

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

2015-05-27 Thread Sukadev Bhattiprolu
list Sukadev Bhattiprolu (2): Use pmu_events_map table to create event aliases perf: Add power8 PMU events in JSON format tools/perf/Documentation/perf-list.txt |8 +- tools/perf/Makefile.perf | 25 +- tools/perf/arch/powerpc/util/header.c | 11

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

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

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

2015-05-27 Thread Sukadev Bhattiprolu
From: Andi Kleen a...@linux.intel.com 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

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

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

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

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(); | > + if (rc < 0) { | > +

Re: perf, tools: Event files for Intel x86

2015-05-22 Thread Sukadev Bhattiprolu
Jiri Olsa [jo...@redhat.com] wrote: | On Wed, May 20, 2015 at 09:11:27PM -0700, Andi Kleen wrote: | > This patchkit extends Sukadev builtin event list patches for Intel x86. | > With that perf can build in event lists. | | Sukadev, | could you please pick it up fr your next patchset version, | so

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 | | --- | tools/perf/Build |1 + | tools/perf/Makefile.perf |4 +- | tools/perf/pmu-events/Build| 38 ++ | tools/perf/pmu-events

Re: perf, tools: Event files for Intel x86

2015-05-22 Thread Sukadev Bhattiprolu
Jiri Olsa [jo...@redhat.com] wrote: | On Wed, May 20, 2015 at 09:11:27PM -0700, Andi Kleen wrote: | This patchkit extends Sukadev builtin event list patches for Intel x86. | With that perf can build in event lists. | | Sukadev, | could you please pick it up fr your next patchset version, | so

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) { | + printf(%s: uname() failed

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

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

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

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

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 processor

[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 suka...@linux.vnet.ibm.com 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

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

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

<    5   6   7   8   9   10   11   12   13   14   >