Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1452013

Re: [PATCH V2 3/6] perf tools: add infrastructure for PMU specific configuration

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH V2 3/6] perf tools: add infrastructure for PMU specific configuration
Date 2016-07-28 19:00 +0200
Message-ID <rZWP7-s6-3@gated-at.bofh.it> (permalink)
References (5 earlier) <rXNmW-WX-29@gated-at.bofh.it> <rZhsB-6N1-9@gated-at.bofh.it> <rZBhE-2x1-9@gated-at.bofh.it> <rZCGJ-3Dk-1@gated-at.bofh.it> <rZWcq-ek-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jul 28, 2016 at 10:15:52AM -0600, Mathieu Poirier wrote:
> 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.

ah you need that whole string in one piece.. ok
let's do it by your original way then

please add some comments for in drv_str function describing
the usage of @ and the fact we're doing this because we need
whole assignment as single string

thanks,
jirka

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH V2 3/6] perf tools: add infrastructure for PMU specific  configuration Jiri Olsa <jolsa@redhat.com> - 2016-07-26 22:50 +0200
  Re: [PATCH V2 3/6] perf tools: add infrastructure for PMU specific configuration Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-27 20:00 +0200
    Re: [PATCH V2 3/6] perf tools: add infrastructure for PMU specific  configuration Jiri Olsa <jolsa@redhat.com> - 2016-07-27 21:30 +0200
      Re: [PATCH V2 3/6] perf tools: add infrastructure for PMU specific configuration Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-07-28 18:20 +0200
        Re: [PATCH V2 3/6] perf tools: add infrastructure for PMU specific  configuration Jiri Olsa <jolsa@redhat.com> - 2016-07-28 19:00 +0200

csiph-web