public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat•com>
To: Sukadev Bhattiprolu <sukadev@linux•vnet.ibm.com>
Cc: Michael Ellerman <michaele@au1•ibm.com>,
	peterz@infradead•org, linux-kernel@vger•kernel.org,
	Arnaldo Carvalho de Melo <acme@kernel•org>,
	dev@codyps•com, Paul Mackerras <paulus@samba•org>,
	linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH v5 1/4] tools/perf: support parsing parameterized events
Date: Mon, 8 Dec 2014 11:59:07 +0100	[thread overview]
Message-ID: <20141208105907.GB4796@krava.redhat.com> (raw)
In-Reply-To: <20141207073724.GA32721@us.ibm.com>

On Sat, Dec 06, 2014 at 11:37:24PM -0800, Sukadev Bhattiprolu wrote:
> Jiri Olsa [jolsa@redhat•com] wrote:
> 
> | anyway we could assign directly to the param term name as you do,
> | but I think we just need to mark the term as parametrized, like:
> | 
> | in /sys/bus/event_source/devices/pmu/events/event_name you have:
> |   param2=?,bar=1,param1=?
> 
> I like the idea of just using a single ? for required parameters, but
> the problem I had with this approach can be seen with these two sysfs
> entries:
> 
>         $ cat HPM_0THRD_NON_IDLE_CCYC__PHYS_CORE
>         domain=0x2,offset=0xe0,starting_index=core,lpar=0x0
> 
>         $ cat HPM_0THRD_NON_IDLE_CCYC__VCPU_HOME_CORE
>         domain=0x3,offset=0xe0,starting_index=vcpu,lpar=sibling_guest_id
> 
> The parameter 'starting_index' refers to a core in one event and vcpu in
> another event. We were trying to give a hint as to what it refers to.
> 
> Given that, 'starting_index' is not very intuitive, how about discarding
> starting_index and replacing with what it really means for the event and,
> use a simple '?' to indicate required parameter).
> 
>         $ cat HPM_0THRD_NON_IDLE_CCYC__PHYS_CORE
>         domain=0x2,offset=0xe0,core=?,lpar=0x0
> 
>         $ cat HPM_0THRD_NON_IDLE_CCYC__VCPU_HOME_CORE
>         domain=0x3,offset=0xe0,vcpu=?,lpar=?
> 
> perf list shows these as:
> 
> 	hv_24x7/HPM_0THRD_NON_IDLE_CCYC__PHYS_CORE,core=?/ 
> 	hv_24x7/HPM_0THRD_NON_IDLE_CCYC__VCPU_HOME_CHIP,vcpu=?,lpar=?/
> 
> command line would be
> 
> 	-e hv_24x7/HPM_0THRD_NON_IDLE_CCYC__PHYS_CORE,core=2/ 
> 
> 	or
> 
> 	-e hv_24x7/HPM_0THRD_NON_IDLE_CCYC__VCPU_HOME_CHIP,vcpu=2,lpar=7/
> 
> and would fail if a required parameter is missing.

that sounds good to me

jirka

  reply	other threads:[~2014-12-08 11:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-03  2:09 [PATCH v5 0/4] Add support for parametrized events Sukadev Bhattiprolu
2014-12-03  2:09 ` [PATCH v5 1/4] tools/perf: support parsing parameterized events Sukadev Bhattiprolu
2014-12-04 12:44   ` Jiri Olsa
2014-12-05 23:05     ` Cody P Schafer
2014-12-06 12:20       ` Jiri Olsa
2014-12-07  7:37     ` Sukadev Bhattiprolu
2014-12-08 10:59       ` Jiri Olsa [this message]
2014-12-03  2:09 ` [PATCH v5 2/4] tools/perf: extend format_alias() to include event parameters Sukadev Bhattiprolu
2014-12-03  2:09 ` [PATCH v5 3/4] perf Documentation: add " Sukadev Bhattiprolu
2014-12-03  2:09 ` [PATCH v5 4/4] tools/perf: Document parameterized and symbolic events 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=20141208105907.GB4796@krava.redhat.com \
    --to=jolsa@redhat$(echo .)com \
    --cc=acme@kernel$(echo .)org \
    --cc=dev@codyps$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=michaele@au1$(echo .)ibm.com \
    --cc=paulus@samba$(echo .)org \
    --cc=peterz@infradead$(echo .)org \
    --cc=sukadev@linux$(echo .)vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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