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>
Cc: ak@linux.intel.com, Michael Ellerman <michaele@au1.ibm.com>,
	peterz@infradead.org, linux-kernel@vger.kernel.org,
	eranian@google.com, dev@codyps.com,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	linuxppc-dev@lists.ozlabs.org,
	Anshuman Khandual <khandual@linux.vnet.ibm.com>
Subject: Re: [PATCH v2 00/14] Add support for parameterized events from sysfs
Date: Wed, 20 Aug 2014 16:15:45 +0200	[thread overview]
Message-ID: <20140820141545.GA3242@krava.brq.redhat.com> (raw)
In-Reply-To: <1408087583-32239-1-git-send-email-sukadev@linux.vnet.ibm.com>

On Fri, Aug 15, 2014 at 12:26:09AM -0700, Sukadev Bhattiprolu wrote:
> From: Cody P Schafer <dev@codyps.com>
> 
> What this patchset does:
> 
>  - the first patch (override sysfs in tools/perf via SYSFS_PATH) was sent out
>    previously, but needed a resend anyhow. Having it is useful for testing the
>    later changes to tools/perf.
>  - the second patch is a bugfix to the powerpc hv-24x7 code which was
>    previously sent out, which is a good idea to have when testing these patches
>    on POWER8 hardware.
> 
>  - document perf sysfs and the changes to add parameterized events
>    - semi-notably: removes the growing list of specific POWER cpu events and
>      begins documenting them generically, much like the docs for
>      /sys/modules/MODULENAME do for modules.
>  - tools/perf changes to support parameterized events
>  - export some parameterized events from the powerpc pmus hv_24x7 and hv_gpci
> 
> Description of "event parameters" from the documentation patch:
> 
>     Event parameters are a basic way for partial events to be specified in
>     sysfs with per-event names given to the fields that need to be filled in
>     when using a particular event.
> 
>     It is intended for supporting cases where the single 'cpu' parameter is
>     insufficient. For example, POWER 8 has events for physical
>     sockets/cores/cpus that are accessible from with virtual machines. To
>     keep using the single 'cpu' parameter we'd need to perform a mapping
>     between Linux's cpus and the physical machine's cpus (in this case
>     Linux is running under a hypervisor). This isn't possible because
>     bindings between our cpus and physical cpus may not be fixed, and we
>     probably won't have a "cpu" on each physical cpu.
> 
> Description of the sysfs contents when events are parameterized (copied from an
> included patch):
> 
> 	Examples:
> 
> 		domain=0x1,offset=0x8,starting_index=phys_cpu
> 
> 	In the case of the last example, a value replacing "phys_cpu"
> 	would need to be provided by the user selecting the particular
> 	event. This is refered to as "event parameterization". All
> 	non-numerical values indicate an event parameter.
> 
> Notes on how perf-list displays parameterized events (and how to use them,
> again culled from an included patch):
> 
> 	PARAMETERIZED EVENTS
> 	--------------------
> 
> 	Some pmu events listed by 'perf-list' will be displayed with '?' in
> 	them. For example:
> 
> 	  hv_gpci/dtbp_ptitc,phys_processor_idx=?/
> 
> 	This means that when provided as an event, a value for
> 	phys_processor_idx must also be supplied. For example:
> 
> 	  perf stat -e 'hv_gpci/dtbp_ptitc,phys_processor_idx=0x2/' ...

hi,
is the reason for this to document this field for event
in "events/<event>" file?

Because once you have the field (phys_processor_idx) defined in
"formats/phys_processor_idx" you should be able to use it as in
your example:

   perf stat -e 'hv_gpci/dtbp_ptitc,phys_processor_idx=0x2/'

without any changes

thanks,
jirka

  parent reply	other threads:[~2014-08-20 14:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-15  7:26 [PATCH v2 00/14] Add support for parameterized events from sysfs Sukadev Bhattiprolu
2014-08-15  7:26 ` [PATCH v2 01/14] powerpc/perf/hv-24x7: use kmem_cache instead of aligned stack allocations Sukadev Bhattiprolu
2014-08-15  7:26 ` [PATCH v2 03/14] perf Documentation: sysfs events/ interfaces Sukadev Bhattiprolu
2014-08-15  7:26 ` [PATCH v2 04/14] perf Documentation: remove duplicated docs for powerpc cpu specific events Sukadev Bhattiprolu
2014-08-15  7:26 ` [PATCH v2 04/14] perf Documentation: add event parameters Sukadev Bhattiprolu
2014-08-15  7:26 ` [PATCH v2 05/14] tools/perf: annotate list_head with type info Sukadev Bhattiprolu
2014-08-15 13:47   ` Arnaldo Carvalho de Melo
2014-08-15  7:26 ` [PATCH v2 06/14] tools/perf: support parsing parameterized events Sukadev Bhattiprolu
2014-08-15  7:26 ` [PATCH v2 07/14] tools/perf: extend format_alias() to include event parameters Sukadev Bhattiprolu
2014-08-15  7:26 ` [PATCH v2 08/14] tools/perf: document parameterized events and note symbolically formed events Sukadev Bhattiprolu
2014-08-15  7:26 ` [PATCH v2 09/14] perf: provide sysfs_show for struct perf_pmu_events_attr Sukadev Bhattiprolu
2014-08-15  7:26 ` [PATCH v2 10/14] powerpc/perf/hv-24x7: parse catalog and populate sysfs with events Sukadev Bhattiprolu
2014-08-15  7:26 ` [PATCH v2 11/14] powerpc/perf/hv-24x7: Documentaion for new sysfs entries which expose descriptions Sukadev Bhattiprolu
2014-08-15  7:26 ` [PATCH v2 12/14] perf: add PMU_EVENT_ATTR_STRING() helper Sukadev Bhattiprolu
2014-08-15  7:26 ` [PATCH v2 13/14] powerpc/perf/{hv-gpci, hv-common}: generate requests with counters annotated Sukadev Bhattiprolu
2014-08-15  7:26 ` [PATCH v2 14/14] powerpc/perf/hv-gpci: add the remaining gpci requests Sukadev Bhattiprolu
2014-08-15  7:44 ` [PATCH v2 00/14] Add support for parameterized events from sysfs Peter Zijlstra
2014-08-20 14:15 ` Jiri Olsa [this message]
2014-08-23  0:23   ` Sukadev Bhattiprolu

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=20140820141545.GA3242@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=dev@codyps.com \
    --cc=eranian@google.com \
    --cc=khandual@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=michaele@au1.ibm.com \
    --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).