linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	jolsa@kernel.org, Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH V2 3/6] perf tools: add infrastructure for PMU specific configuration
Date: Thu, 28 Jul 2016 10:15:52 -0600	[thread overview]
Message-ID: <CANLsYkxzSBHXGwe2y-593D4yDyLy9+vdcTHmP_rqF30x0qTiug@mail.gmail.com> (raw)
In-Reply-To: <20160727192639.GC23264@krava>

On 27 July 2016 at 13:26, Jiri Olsa <jolsa@redhat.com> wrote:
> On Wed, Jul 27, 2016 at 11:59:50AM -0600, Mathieu Poirier wrote:
>
> SNIP
>
>> > -PE_DRV_CFG_TERM
>> > +'@' PE_NAME '=' PE_NAME
>> >  {
>> >         struct parse_events_term *term;
>> >
>> >         ABORT_ON(parse_events_term__str(&term, PARSE_EVENTS__TERM_TYPE_DRV_CFG,
>> > -                                       $1, $1, &@1, NULL));
>> > +                                       $2, $4, &@2, &@4));
>> >         $$ = term;
>> >  }
>> >
>>
>> The problem here is that the correlation between the first and the
>> second PE_NAME is lost and instead of seeing "PE_NAME=PE_NAME", the
>> kernel only gets the value associated with the second PE_NAME.
>>
>> For example,
>>
>> -e event/@cfg1=value1,@cfg2=value2/ ...
>>
>> The above code will send "value1" and "value2" to the kernel driver
>> where there is no way to know what configurable the values correspond
>
> hum.. you get the 'cfg1' and 'cfg2' strings in $1 no?

Indeed you do.

Macro ADD_CONFIG_TERM in function get_config_terms() only account for
the __val parameter and struct parse_events_term::config is completely
ignored.  We could concatenate the fields before calling
ADD_CONFIG_TERM() but between that and freeing the reserved memory, I
think it is cleaner to let flex do the work.

Mathieu

>
> jirka
>
>> to.  To go around that we'd have to concatenate $2 and $4 in function
>> parse_events_term__str() (or new_term()) when @type_term ==
>> PARSE_EVENTS__TERM_TYPE_DRV_CFG, something that definitely looks
>> hackish to me.
>>
>> Thanks,
>> Mathieu

  reply	other threads:[~2016-07-28 16:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-20 20:38 [PATCH V2 0/6] perf: Driver specific configuration for PMU Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 1/6] perf/core: Adding PMU driver specific configuration Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 2/6] perf: Passing struct perf_event to function setup_aux() Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 3/6] perf tools: add infrastructure for PMU specific configuration Mathieu Poirier
2016-07-21  7:47   ` Jiri Olsa
2016-07-21  7:47   ` Jiri Olsa
2016-07-21 14:44     ` Mathieu Poirier
2016-07-21 14:54       ` Jiri Olsa
2016-07-21 15:47         ` Mathieu Poirier
2016-07-22 18:24         ` Mathieu Poirier
2016-07-26 20:41           ` Jiri Olsa
2016-07-27 17:59             ` Mathieu Poirier
2016-07-27 19:26               ` Jiri Olsa
2016-07-28 16:15                 ` Mathieu Poirier [this message]
2016-07-28 16:52                   ` Jiri Olsa
2016-07-21  7:47   ` Jiri Olsa
2016-07-20 20:38 ` [PATCH V2 4/6] perf tools: pushing driver configuration down to the kernel Mathieu Poirier
2016-07-21  7:47   ` Jiri Olsa
2016-07-22 19:57     ` Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 5/6] coresight: adding sink parameter to function coresight_build_path() Mathieu Poirier
2016-07-21 10:49   ` Suzuki K Poulose
2016-07-21 15:05     ` Mathieu Poirier
2016-07-20 20:38 ` [PATCH V2 6/6] coresight: etm-perf: incorporating sink definition from cmd line Mathieu Poirier

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=CANLsYkxzSBHXGwe2y-593D4yDyLy9+vdcTHmP_rqF30x0qTiug@mail.gmail.com \
    --to=mathieu.poirier@linaro.org \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    /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).