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


Groups > linux.kernel > #1501902

Re: [PATCH 08/10] perf, tools: Expand PMU events by prefix match

Path csiph.com!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH 08/10] perf, tools: Expand PMU events by prefix match
Date Mon, 17 Oct 2016 13:50:01 +0200
Message-ID <steAx-2Ua-7@gated-at.bofh.it> (permalink)
References <srVzX-qJ-3@gated-at.bofh.it> <srVzX-qJ-7@gated-at.bofh.it>
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.7.1 (2016-10-04)
X-Scanned-By MIMEDefang 2.68 on 10.5.11.24
X-Greylist Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 17 Oct 2016 11:40:41 +0000 (UTC)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 45
Organization linux.* mail to news gateway
X-Original-Cc acme@kernel.org, jolsa@kernel.org, sukadev@linux.vnet.ibm.com, eranian@google.com, linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
X-Original-Date Mon, 17 Oct 2016 13:40:38 +0200
X-Original-Message-ID <20161017114038.GD24552@krava>
X-Original-References <1476393332-20732-1-git-send-email-andi@firstfloor.org> <1476393332-20732-9-git-send-email-andi@firstfloor.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1501902

Show key headers only | View raw


On Thu, Oct 13, 2016 at 02:15:30PM -0700, Andi Kleen wrote:

SNIP

> diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y
> index 3a5196380609..790f0dd598b9 100644
> --- a/tools/perf/util/parse-events.y
> +++ b/tools/perf/util/parse-events.y
> @@ -224,11 +224,34 @@ event_pmu:
>  PE_NAME opt_event_config
>  {
>  	struct parse_events_evlist *data = _data;
> -	struct list_head *list;
> +	struct list_head *list, *orig_terms, *terms;
> +
> +	if (parse_events_copy_term_list($2, &orig_terms))
> +		YYABORT;
>  
>  	ALLOC_LIST(list);
> -	ABORT_ON(parse_events_add_pmu(data, list, $1, $2));
> +	if (parse_events_add_pmu(data, list, $1, $2)) {
> +		struct perf_pmu *pmu = NULL;
> +		int ok = 0;
> +
> +		while ((pmu = perf_pmu__scan(pmu)) != NULL) {
> +			char *name = pmu->name;
> +
> +			if (!strncmp(name, "uncore_", 7))
> +				name += 7;

so there's a special treatment for uncore events,
what if user says 'uncore_box/..' then?


> +			if (!strncmp($1, name, strlen($1))) {
> +				if (parse_events_copy_term_list(orig_terms, &terms))
> +					YYABORT;
> +				if (!parse_events_add_pmu(data, list, pmu->name, terms))
> +					ok++;

so we're ok if some of the events is not added?
do we warn at least?

thanks,
jirka

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


Thread

Support Intel uncore event lists Andi Kleen <andi@firstfloor.org> - 2016-10-13 23:20 +0200
  [PATCH 07/10] perf, tools: Collapse identically named events in perf stat Andi Kleen <andi@firstfloor.org> - 2016-10-13 23:20 +0200
    Re: [PATCH 07/10] perf, tools: Collapse identically named events in  perf stat Jiri Olsa <jolsa@redhat.com> - 2016-10-17 13:00 +0200
    Re: [PATCH 07/10] perf, tools: Collapse identically named events in  perf stat Jiri Olsa <jolsa@redhat.com> - 2016-10-17 13:30 +0200
      Re: [PATCH 07/10] perf, tools: Collapse identically named events in  perf stat Andi Kleen <andi@firstfloor.org> - 2016-10-17 18:40 +0200
        Re: [PATCH 07/10] perf, tools: Collapse identically named events in  perf stat Jiri Olsa <jolsa@redhat.com> - 2016-10-17 19:30 +0200
          Re: [PATCH 07/10] perf, tools: Collapse identically named events in  perf stat Andi Kleen <ak@linux.intel.com> - 2016-10-17 20:20 +0200
    Re: [PATCH 07/10] perf, tools: Collapse identically named events in  perf stat Jiri Olsa <jolsa@redhat.com> - 2016-10-17 13:30 +0200
  [PATCH 08/10] perf, tools: Expand PMU events by prefix match Andi Kleen <andi@firstfloor.org> - 2016-10-13 23:20 +0200
    Re: [PATCH 08/10] perf, tools: Expand PMU events by prefix match Jiri Olsa <jolsa@redhat.com> - 2016-10-17 13:40 +0200
    Re: [PATCH 08/10] perf, tools: Expand PMU events by prefix match Jiri Olsa <jolsa@redhat.com> - 2016-10-17 13:50 +0200
      Re: [PATCH 08/10] perf, tools: Expand PMU events by prefix match Andi Kleen <andi@firstfloor.org> - 2016-10-17 19:20 +0200
        Re: [PATCH 08/10] perf, tools: Expand PMU events by prefix match Jiri Olsa <jolsa@redhat.com> - 2016-10-17 19:30 +0200
  [PATCH 02/10] perf, tools: Only print Using CPUID message once Andi Kleen <andi@firstfloor.org> - 2016-10-13 23:20 +0200
    Re: [PATCH 02/10] perf, tools: Only print Using CPUID message once Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-14 17:50 +0200
    [tip:perf/core] perf pmu: Only print Using CPUID message once tip-bot for Andi Kleen <tipbot@zytor.com> - 2016-10-24 21:10 +0200
  [PATCH 09/10] perf, tools: Support DividedBy header in JSON event list Andi Kleen <andi@firstfloor.org> - 2016-10-13 23:20 +0200
    Re: [PATCH 09/10] perf, tools: Support DividedBy header in JSON  event list Jiri Olsa <jolsa@redhat.com> - 2016-10-17 13:50 +0200
      Re: [PATCH 09/10] perf, tools: Support DividedBy header in JSON  event list Andi Kleen <andi@firstfloor.org> - 2016-10-17 18:30 +0200
        Re: [PATCH 09/10] perf, tools: Support DividedBy header in JSON  event list Jiri Olsa <jolsa@redhat.com> - 2016-10-17 19:50 +0200
        Re: [PATCH 09/10] perf, tools: Support DividedBy header in JSON  event list Jiri Olsa <jolsa@redhat.com> - 2016-10-17 19:50 +0200
          Re: [PATCH 09/10] perf, tools: Support DividedBy header in JSON  event list Andi Kleen <andi@firstfloor.org> - 2016-10-17 20:30 +0200
  [PATCH 04/10] perf, tools: Support per pmu json aliases Andi Kleen <andi@firstfloor.org> - 2016-10-13 23:20 +0200
    Re: [PATCH 04/10] perf, tools: Support per pmu json aliases Jiri Olsa <jolsa@redhat.com> - 2016-10-14 14:40 +0200
  [PATCH 05/10] perf, tools: Support event aliases for non cpu// pmus Andi Kleen <andi@firstfloor.org> - 2016-10-13 23:20 +0200
    Re: [PATCH 05/10] perf, tools: Support event aliases for non cpu//  pmus Jiri Olsa <jolsa@redhat.com> - 2016-10-17 11:40 +0200
    Re: [PATCH 05/10] perf, tools: Support event aliases for non cpu//  pmus Jiri Olsa <jolsa@redhat.com> - 2016-10-17 12:30 +0200
  [PATCH 01/10] perf, tools: Factor out scale conversion code Andi Kleen <andi@firstfloor.org> - 2016-10-13 23:20 +0200
    Re: [PATCH 01/10] perf, tools: Factor out scale conversion code Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-14 17:40 +0200
      Re: [PATCH 01/10] perf, tools: Factor out scale conversion code Andi Kleen <andi@firstfloor.org> - 2016-10-14 17:50 +0200
        Re: [PATCH 01/10] perf, tools: Factor out scale conversion code Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-14 18:20 +0200
          Re: [PATCH 01/10] perf, tools: Factor out scale conversion code Andi Kleen <ak@linux.intel.com> - 2016-10-14 18:20 +0200
            Re: [PATCH 01/10] perf, tools: Factor out scale conversion code Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-14 18:30 +0200
              Re: [PATCH 01/10] perf, tools: Factor out scale conversion code Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-10-14 18:40 +0200
              Re: [PATCH 01/10] perf, tools: Factor out scale conversion code Andi Kleen <andi@firstfloor.org> - 2016-10-14 18:40 +0200
  [PATCH 10/10] perf, tools, stat: Output generic dividedby metric Andi Kleen <andi@firstfloor.org> - 2016-10-13 23:20 +0200
  [PATCH 06/10] perf, tools: Add debug support for outputing alias string Andi Kleen <andi@firstfloor.org> - 2016-10-13 23:20 +0200
  Re: Support Intel uncore event lists Jiri Olsa <jolsa@redhat.com> - 2016-10-17 13:10 +0200

csiph-web