All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: lkp@lists.01.org
Subject: Re: [drm/i915/gt] 8c3b1ba0e7: perf-sanity-tests.Parse_event_definition_strings.fail
Date: Sun, 28 Feb 2021 10:33:52 +0100	[thread overview]
Message-ID: <YDtjgCcP9mLBcu/y@krava> (raw)
In-Reply-To: <YDodJb4CXDT8VemG@krava>

[-- Attachment #1: Type: text/plain, Size: 2180 bytes --]

On Sat, Feb 27, 2021 at 11:21:25AM +0100, Jiri Olsa wrote:
> On Fri, Feb 26, 2021 at 08:41:26AM +0800, Jin, Yao wrote:
> 
> SNIP
> 
> > > +				SET_SYMBOL(prefix, PMU_EVENT_SYMBOL);
> > >   				len++;
> > >   			}
> > >   		}
> > >   	}
> > > +
> > > +	/* unlikely, but still.. */
> > > +	if (!len)
> > > +		goto err;
> > > +	perf_pmu_events_list_num = len;
> > > +
> > >   	qsort(perf_pmu_events_list, len,
> > >   		sizeof(struct perf_pmu_event_symbol), comp_pmu);
> > > 
> > 
> > Thanks so much for the patch! It works with my tests.
> > 
> > # ./perf test 6
> >  6: Parse event definition strings                                  : Ok
> > 
> > # ./perf stat -e software/r1a/ -a -- sleep 1
> > 
> >  Performance counter stats for 'system wide':
> > 
> >    <not supported>      software/r1a/
> > 
> >        1.000940433 seconds time elapsed
> > 
> > In theory, do we also need to check suffix as well? I think returning
> > PMU_EVENT_SYMBOL_SUFFIX may also confuse the parser. But yes, we don't have
> > this case now.
> 
> yep, let's wait for use case ;-) you can't have suffix
> without prefix, and that's the one failing, so I think
> we are fine

actualy this one seems to work as well, could you plz check

thanks,
jirka


---
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index d5b6aff82f21..d57ac86ce7ca 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -89,6 +89,7 @@ static void inc_group_count(struct list_head *list,
 %type <str> PE_EVENT_NAME
 %type <str> PE_PMU_EVENT_PRE PE_PMU_EVENT_SUF PE_KERNEL_PMU_EVENT PE_PMU_EVENT_FAKE
 %type <str> PE_DRV_CFG_TERM
+%type <str> event_pmu_name
 %destructor { free ($$); } <str>
 %type <term> event_term
 %destructor { parse_events_term__delete ($$); } <term>
@@ -272,8 +273,11 @@ event_def: event_pmu |
 	   event_legacy_raw sep_dc |
 	   event_bpf_file
 
+event_pmu_name:
+PE_NAME | PE_PMU_EVENT_PRE
+
 event_pmu:
-PE_NAME opt_pmu_config
+event_pmu_name opt_pmu_config
 {
 	struct parse_events_state *parse_state = _parse_state;
 	struct parse_events_error *error = parse_state->error;

WARNING: multiple messages have this Message-ID (diff)
From: Jiri Olsa <jolsa@redhat.com>
To: "Jin, Yao" <yao.jin@linux.intel.com>
Cc: kernel test robot <oliver.sang@intel.com>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>,
	Tvrtko Ursulin <tvrtko.ursulin@intel.com>,
	Matthew Brost <matthew.brost@intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	lkp@lists.01.org, lkp@intel.com, Andi Kleen <ak@linux.intel.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	"Liang, Kan" <kan.liang@intel.com>,
	"Jin, Yao" <yao.jin@intel.com>, "Yi, Ammy" <ammy.yi@intel.com>
Subject: Re: [drm/i915/gt] 8c3b1ba0e7: perf-sanity-tests.Parse_event_definition_strings.fail
Date: Sun, 28 Feb 2021 10:33:52 +0100	[thread overview]
Message-ID: <YDtjgCcP9mLBcu/y@krava> (raw)
In-Reply-To: <YDodJb4CXDT8VemG@krava>

On Sat, Feb 27, 2021 at 11:21:25AM +0100, Jiri Olsa wrote:
> On Fri, Feb 26, 2021 at 08:41:26AM +0800, Jin, Yao wrote:
> 
> SNIP
> 
> > > +				SET_SYMBOL(prefix, PMU_EVENT_SYMBOL);
> > >   				len++;
> > >   			}
> > >   		}
> > >   	}
> > > +
> > > +	/* unlikely, but still.. */
> > > +	if (!len)
> > > +		goto err;
> > > +	perf_pmu_events_list_num = len;
> > > +
> > >   	qsort(perf_pmu_events_list, len,
> > >   		sizeof(struct perf_pmu_event_symbol), comp_pmu);
> > > 
> > 
> > Thanks so much for the patch! It works with my tests.
> > 
> > # ./perf test 6
> >  6: Parse event definition strings                                  : Ok
> > 
> > # ./perf stat -e software/r1a/ -a -- sleep 1
> > 
> >  Performance counter stats for 'system wide':
> > 
> >    <not supported>      software/r1a/
> > 
> >        1.000940433 seconds time elapsed
> > 
> > In theory, do we also need to check suffix as well? I think returning
> > PMU_EVENT_SYMBOL_SUFFIX may also confuse the parser. But yes, we don't have
> > this case now.
> 
> yep, let's wait for use case ;-) you can't have suffix
> without prefix, and that's the one failing, so I think
> we are fine

actualy this one seems to work as well, could you plz check

thanks,
jirka


---
diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
index d5b6aff82f21..d57ac86ce7ca 100644
--- a/tools/perf/util/parse-events.y
+++ b/tools/perf/util/parse-events.y
@@ -89,6 +89,7 @@ static void inc_group_count(struct list_head *list,
 %type <str> PE_EVENT_NAME
 %type <str> PE_PMU_EVENT_PRE PE_PMU_EVENT_SUF PE_KERNEL_PMU_EVENT PE_PMU_EVENT_FAKE
 %type <str> PE_DRV_CFG_TERM
+%type <str> event_pmu_name
 %destructor { free ($$); } <str>
 %type <term> event_term
 %destructor { parse_events_term__delete ($$); } <term>
@@ -272,8 +273,11 @@ event_def: event_pmu |
 	   event_legacy_raw sep_dc |
 	   event_bpf_file
 
+event_pmu_name:
+PE_NAME | PE_PMU_EVENT_PRE
+
 event_pmu:
-PE_NAME opt_pmu_config
+event_pmu_name opt_pmu_config
 {
 	struct parse_events_state *parse_state = _parse_state;
 	struct parse_events_error *error = parse_state->error;


  reply	other threads:[~2021-02-28  9:33 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24  7:48 [drm/i915/gt] 8c3b1ba0e7: perf-sanity-tests.Parse_event_definition_strings.fail kernel test robot
2021-02-24  7:48 ` kernel test robot
2021-02-25  8:06 ` Jin, Yao
2021-02-25  8:06   ` Jin, Yao
2021-02-25 13:33   ` Jiri Olsa
2021-02-25 13:33     ` Jiri Olsa
2021-02-25 18:16     ` Jiri Olsa
2021-02-25 18:16       ` Jiri Olsa
2021-02-25 18:50       ` Jiri Olsa
2021-02-25 18:50         ` Jiri Olsa
2021-02-25 19:03         ` Jiri Olsa
2021-02-25 19:03           ` Jiri Olsa
2021-02-26  0:41           ` Jin, Yao
2021-02-26  0:41             ` Jin, Yao
2021-02-27 10:21             ` Jiri Olsa
2021-02-27 10:21               ` Jiri Olsa
2021-02-28  9:33               ` Jiri Olsa [this message]
2021-02-28  9:33                 ` Jiri Olsa
2021-03-01  1:12                 ` Jin, Yao
2021-03-01  1:12                   ` Jin, Yao
  -- strict thread matches above, loose matches on Subject: below --
2020-12-26 10:58 kernel test robot
2020-12-26 10:58 ` kernel test robot
2020-12-26 10:58 ` kernel test robot

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=YDtjgCcP9mLBcu/y@krava \
    --to=jolsa@redhat.com \
    --cc=lkp@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.