linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>, ak@linux.intel.com
Cc: mingo@redhat.com, Michael Ellerman <mpe@ellerman.id.au>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	peterz@infradead.org, maddy@linux.vnet.ibm.com,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v20 00/20] perf, tools: Add support for PMU events in JSON format
Date: Wed, 31 Aug 2016 13:42:54 +0200	[thread overview]
Message-ID: <20160831114254.GA9001@krava> (raw)
In-Reply-To: <1466481770-25290-1-git-send-email-sukadev@linux.vnet.ibm.com>

On Mon, Jun 20, 2016 at 09:02:30PM -0700, Sukadev Bhattiprolu 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 their raw codes:
> 
> 	perf stat -e r100f2 sleep 1
> 
> This patchset allows architectures to specify these PMU events in JSON
> files located in 'tools/perf/pmu-events/arch/' of the mainline tree.
> The events from the JSON files for the architecture are then built into
> the perf binary.
> 
> At run time, perf identifies the specific set of events for the CPU and
> creates "event aliases". These aliases allow users to specify events by
> "name" as:
> 
> 	perf stat -e pm_1plus_ppc_cmpl sleep 1
> 
> The file, 'tools/perf/pmu-events/README' in [PATCH 16/16] gives more
> details.
> 
> Note:
> 	- All known events tables for the architecture are included in the
> 	  perf binary.
> 
> 	- For architectures that don't have any JSON files, an empty mapping
> 	  table is created and they should continue to build.
> 
> Thanks to input from Andi Kleen, Jiri Olsa, Namhyung Kim and Ingo Molnar.
> 
> These patches are available from:
> 
> 	https://github.com/sukadev/linux.git 
> 	
> 	Branch			Description
> 	------------------------------------------------------
> 	json-code-v20		Source Code only 
> 	json-data-v20		x86 and Powerpc datafiles only
> 	json-code+data-v20	Both code and data (for build/test)
> 	
> NOTE: 	Only "source code" patches (i.e those in json-code-v20) are being
> 	emailed.  Please pull the "data files" from the json-data-v20 branch.
> 
> Changelog[v20]
> 	- Rebase to recent perf/core
> 	- Add Patch 20/20 to allow perf-stat to work with the period= field

hi,
I had discussion with Ingo about the state of this patchset
and there's one more requirement from his side - to split
event files into per topic files

I made some initial changes over latest Sukadev's branch
and came up with something like this:

	$ find pmu-events/arch/x86/
	pmu-events/arch/x86/
	pmu-events/arch/x86/NehalemEX_core
	pmu-events/arch/x86/NehalemEX_core/Memory.json
	pmu-events/arch/x86/NehalemEX_core/Virtual-Memory.json
	pmu-events/arch/x86/NehalemEX_core/Cache.json
	pmu-events/arch/x86/NehalemEX_core/Pipeline.json
	pmu-events/arch/x86/NehalemEX_core/Floating-point.json
	pmu-events/arch/x86/NehalemEX_core/Other.json
	pmu-events/arch/x86/mapfile.csv
	pmu-events/arch/x86/Broadwell_core
	pmu-events/arch/x86/Broadwell_core/Memory.json
	pmu-events/arch/x86/Broadwell_core/Virtual-Memory.json
	pmu-events/arch/x86/Broadwell_core/Cache.json
	pmu-events/arch/x86/Broadwell_core/Pipeline.json
	pmu-events/arch/x86/Broadwell_core/Floating-point.json
	pmu-events/arch/x86/Broadwell_core/Other.json
	pmu-events/arch/x86/Broadwell_core/Frontend.json

so let's have a discussion if this is acceptable for you guys

I've already made some changes in pmu-events/* to support
this hierarchy to see how bad the change would be.. and
it's not that bad ;-)

you can check followin patches (only 2 Intel files transformed):

	1d5ffa8bb969 perf, tools: Change jevents
	65919f8901e3 perf, tools: Split Broadwell_core.json
	7cd309a85465 perf, tools: Add Broadwell V14 event file
	e316aff2dd4e perf, tools: Split NehalemEX_core.json
	e19e8de49408 perf, tools: Add NehalemEX V1 event file

It's available in:
  git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
  perf/json

thanks,
jirka

  parent reply	other threads:[~2016-08-31 11:42 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21  4:02 [PATCH v20 00/20] perf, tools: Add support for PMU events in JSON format Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 01/20] perf, tools: Add jsmn `jasmine' JSON parser Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 02/20] perf, tools, jevents: Program to convert JSON file to C style file Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 03/20] perf, tools: Use pmu_events table to create aliases Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 04/20] perf, tools: Support CPU ID matching for Powerpc Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 05/20] perf, tools: Support CPU id matching for x86 v2 Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 06/20] perf, tools: Support alias descriptions Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 07/20] perf, tools: Query terminal width and use in perf list Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 08/20] perf, tools: Add a --no-desc flag to " Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 09/20] perf, tools: Add override support for event list CPUID Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 10/20] perf, tools, jevents: Add support for long descriptions Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 11/20] perf, tools: Add alias " Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 12/20] perf, tools: Support long descriptions with perf list Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 13/20] perf, tools, jevents: Add support for event topics Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 14/20] perf, tools: Add support for event list topics Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 15/20] perf, tools: Handle header line in mapfile Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 16/20] perf, tools: Add README for info on parsing JSON/map files Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 17/20] perf, tools: Make alias matching case-insensitive Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 18/20] perf, tools, pmu-events: Fix fixed counters on Intel Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 19/20] perf, tools, pmu-events: Add Skylake frontend MSR support Sukadev Bhattiprolu
2016-06-21  4:02 ` [PATCH v20 20/20] Allow period= in perf stat CPU event descriptions Sukadev Bhattiprolu
2016-08-31 11:42 ` Jiri Olsa [this message]
2016-08-31 14:42   ` [PATCH v20 00/20] perf, tools: Add support for PMU events in JSON format Andi Kleen
2016-08-31 14:54     ` Jiri Olsa
2016-08-31 16:15       ` Andi Kleen
2016-09-01  6:46         ` Jiri Olsa
2016-09-14  1:53           ` Michael Ellerman
2016-09-14  5:45             ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160831114254.GA9001@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.vnet.ibm.com \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=peterz@infradead.org \
    --cc=sukadev@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).