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

2015-05-31 Thread Andi Kleen
Ok I did some scripting to add these topics you requested to the Intel JSON files, and changed perf list to group events by them. I'll redirect any questions on their value to you. And I certainly hope this is the last of your improvements for now. The updated event lists are available in

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

2015-05-29 Thread Ingo Molnar
* Andi Kleen a...@linux.intel.com wrote: So instead of this flat structure, there should at minimum be broad categorization of the various parts of the hardware they relate to: whether they relate to the branch predictor, memory caches, TLB caches, memory ops, offcore, decoders,

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

2015-05-28 Thread Jiri Olsa
On Wed, May 27, 2015 at 11:59:04PM +0900, Namhyung Kim wrote: Hi Andi, On Wed, May 27, 2015 at 11:40 PM, Andi Kleen a...@linux.intel.com wrote: So we build tables of all models in the architecture, and choose matching one when compiling perf, right? Can't we do that when building the

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

2015-05-28 Thread Ingo Molnar
* Ingo Molnar mi...@kernel.org wrote: * Jiri Olsa jo...@redhat.com wrote: On Wed, May 27, 2015 at 11:59:04PM +0900, Namhyung Kim wrote: Hi Andi, On Wed, May 27, 2015 at 11:40 PM, Andi Kleen a...@linux.intel.com wrote: So we build tables of all models in the architecture, and

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

2015-05-28 Thread Ingo Molnar
* Jiri Olsa jo...@redhat.com wrote: On Wed, May 27, 2015 at 11:59:04PM +0900, Namhyung Kim wrote: Hi Andi, On Wed, May 27, 2015 at 11:40 PM, Andi Kleen a...@linux.intel.com wrote: So we build tables of all models in the architecture, and choose matching one when compiling perf,

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

2015-05-28 Thread Andi Kleen
So instead of this flat structure, there should at minimum be broad categorization of the various parts of the hardware they relate to: whether they relate to the branch predictor, memory caches, TLB caches, memory ops, offcore, decoders, execution units, FPU ops, etc., etc. - so that

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

2015-05-27 Thread Namhyung Kim
Hi Sukadev, On Tue, May 19, 2015 at 05:02:08PM -0700, Sukadev Bhattiprolu wrote: From: Andi Kleen a...@linux.intel.com This is a modified version of an earlier patch by Andi Kleen. We expect architectures to describe the performance monitoring events for each CPU in a corresponding JSON

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

2015-05-27 Thread Andi Kleen
So we build tables of all models in the architecture, and choose matching one when compiling perf, right? Can't we do that when building the tables? IOW, why don't we check the VFM and discard non-matching tables? Those non-matching tables are also needed? We build it for all cpus in an

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

2015-05-27 Thread Namhyung Kim
Hi Andi, On Wed, May 27, 2015 at 11:40 PM, Andi Kleen a...@linux.intel.com wrote: So we build tables of all models in the architecture, and choose matching one when compiling perf, right? Can't we do that when building the tables? IOW, why don't we check the VFM and discard non-matching

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

2015-05-22 Thread Andi Kleen
Sure, but shouldn't we allow JSON files to be in subdirs pmu-events/arch/x86/HSX/Haswell_core.json and this could go to arbitrary levels? I used a flat hierarchy. Should be good enough. -Andi -- a...@linux.intel.com -- Speaking for myself only

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

2015-05-22 Thread Jiri Olsa
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: %s\n, argv[0], strerror(errno)); + goto

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

2015-05-22 Thread Jiri Olsa
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/README | 67

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

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

2015-05-22 Thread Jiri Olsa
On Fri, May 22, 2015 at 08:58:22AM -0700, Sukadev Bhattiprolu wrote: SNIP | | there's no concetion (yet) in the new build system to trigger | another binery build as a dependency for object file.. I'd | rather do this the framework way, please check attached patch | | also currently the

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 Andi Kleen
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 Also it would be good to move the generated file into the object