Received: by 10.223.185.116 with SMTP id b49csp5975299wrg; Wed, 28 Feb 2018 01:42:15 -0800 (PST) X-Google-Smtp-Source: AH8x224wpYuhEOFQDG6ydVvipk7u6LMS1D8PM63HwrYhtyZT4UDDsZKKFDD9+hpmS/V5kfPlXRrE X-Received: by 2002:a17:902:8b85:: with SMTP id ay5-v6mr17750073plb.329.1519810935511; Wed, 28 Feb 2018 01:42:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519810935; cv=none; d=google.com; s=arc-20160816; b=M2kP7T+jraaN7nkuMXxDK0/taKR/A1ctTB6az0euRM/fUMl4YG0kuvZ1DKKn/4lgO2 qpQb3oahO2jgFap5KlPAHmIIuM92WHciYLZnn7Kk6g4xLbKsPmu3dtVB5E1VsW1rG3Pt JNayN5bFNUv/hNWWJE7ZMxktwi36j6djR0+zaqwaOOQ4rKKDsId5y7+PaCpS/Mp9tayi z7uv+hqc3h40qHsZwyNXaS10CDwFoNvz5J6VJN+k/nFZSGVszXTogAyfpGjHJ6akYF/d 12W1ac6DZHbhN9f9VtLACVZeMtabVLtzlPL7/tYHTAjdFOfqSLJERKhb8KRoMwxCanQi juHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=/+P9TzT3CN92rAZsDK+tYFxy6WnEt+NSX8R3ClIW+hM=; b=leVLrZ9Gx0cbY/2zu3tIwGuqrS3EqVuKo9lyArhoIoe3exaBrKEkqiDeH5nYZvFwwm 4YCe3/X5VJbPvhAM5FlzLPKUATUzB9q2wkxM1KtovOttui5LL4kTyx7hd+YZX1jriqS+ +pwY46a6rOzv1w1DfKCoaiVbeBlUPpwxW1ZNwjqJLCV1KElKoLIkWTiEiI0LqprO3u2/ XyPK3wYil6vy3CPV9W+2F8eIjnBMQYA7xL7XajQ/H30NMeixBsivFPQj4uqskpzU/tFJ KPDI2sQhipZhPkpnK929NKvlu2KIHD7ZOn5kvrWDZH+PicaHN4HDbtpWa7+AJ146D9SH n3wA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e87si941276pfj.381.2018.02.28.01.41.59; Wed, 28 Feb 2018 01:42:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752328AbeB1Jkm (ORCPT + 99 others); Wed, 28 Feb 2018 04:40:42 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36402 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751863AbeB1Jkl (ORCPT ); Wed, 28 Feb 2018 04:40:41 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BC89340FB646; Wed, 28 Feb 2018 09:40:40 +0000 (UTC) Received: from krava (ovpn-204-160.brq.redhat.com [10.40.204.160]) by smtp.corp.redhat.com (Postfix) with SMTP id B5A0D946A4; Wed, 28 Feb 2018 09:40:38 +0000 (UTC) Date: Wed, 28 Feb 2018 10:40:38 +0100 From: Jiri Olsa To: Agustin Vega-Frias Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Andi Kleen , Alexander Shishkin , Namhyung Kim , timur@codeaurora.org Subject: Re: [RFC 3/3] perf pmu: Restore auto-merging of PMU events created by prefix match Message-ID: <20180228094038.GA9474@krava> References: <1519770848-26738-1-git-send-email-agustinv@codeaurora.org> <1519770848-26738-4-git-send-email-agustinv@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1519770848-26738-4-git-send-email-agustinv@codeaurora.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 28 Feb 2018 09:40:40 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 28 Feb 2018 09:40:40 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jolsa@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 27, 2018 at 05:34:08PM -0500, Agustin Vega-Frias wrote: > This was disabled when auto-merging of non-alias events was disabled in > commit 63ce844 (perf stat: Only auto-merge events that are PMU aliases). this changes the output, right? please provide before/after output thanks, jirka > > Signed-off-by: Agustin Vega-Frias > --- > tools/perf/util/parse-events.c | 13 +++---------- > tools/perf/util/parse-events.h | 2 +- > tools/perf/util/parse-events.y | 4 ++-- > 3 files changed, 6 insertions(+), 13 deletions(-) > > diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c > index bafc91e..4e80ca3 100644 > --- a/tools/perf/util/parse-events.c > +++ b/tools/perf/util/parse-events.c > @@ -1217,7 +1217,7 @@ int parse_events_add_numeric(struct parse_events_state *parse_state, > get_config_name(head_config), &config_terms); > } > > -static int __parse_events_add_pmu(struct parse_events_state *parse_state, > +int parse_events_add_pmu(struct parse_events_state *parse_state, > struct list_head *list, char *name, > struct list_head *head_config, bool auto_merge_stats) > { > @@ -1287,13 +1287,6 @@ static int __parse_events_add_pmu(struct parse_events_state *parse_state, > return evsel ? 0 : -ENOMEM; > } > > -int parse_events_add_pmu(struct parse_events_state *parse_state, > - struct list_head *list, char *name, > - struct list_head *head_config) > -{ > - return __parse_events_add_pmu(parse_state, list, name, head_config, false); > -} > - > int parse_events_multi_pmu_add(struct parse_events_state *parse_state, > char *str, struct list_head **listp) > { > @@ -1323,8 +1316,8 @@ int parse_events_multi_pmu_add(struct parse_events_state *parse_state, > return -1; > list_add_tail(&term->list, head); > > - if (!__parse_events_add_pmu(parse_state, list, > - pmu->name, head, true)) { > + if (!parse_events_add_pmu(parse_state, list, > + pmu->name, head, true)) { > pr_debug("%s -> %s/%s/\n", str, > pmu->name, alias->str); > ok++; > diff --git a/tools/perf/util/parse-events.h b/tools/perf/util/parse-events.h > index 88108cd..5015cfd 100644 > --- a/tools/perf/util/parse-events.h > +++ b/tools/perf/util/parse-events.h > @@ -167,7 +167,7 @@ int parse_events_add_breakpoint(struct list_head *list, int *idx, > void *ptr, char *type, u64 len); > int parse_events_add_pmu(struct parse_events_state *parse_state, > struct list_head *list, char *name, > - struct list_head *head_config); > + struct list_head *head_config, bool auto_merge_stats); > > int parse_events_multi_pmu_add(struct parse_events_state *parse_state, > char *str, > diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y > index c528469..b51278f 100644 > --- a/tools/perf/util/parse-events.y > +++ b/tools/perf/util/parse-events.y > @@ -232,7 +232,7 @@ PE_NAME opt_event_config > YYABORT; > > ALLOC_LIST(list); > - if (parse_events_add_pmu(_parse_state, list, $1, $2)) { > + if (parse_events_add_pmu(_parse_state, list, $1, $2, false)) { > struct perf_pmu *pmu = NULL; > int ok = 0; > > @@ -245,7 +245,7 @@ PE_NAME opt_event_config > if (!strncmp($1, name, strlen($1)) || !fnmatch($1, name, 0)) { > if (parse_events_copy_term_list(orig_terms, &terms)) > YYABORT; > - if (!parse_events_add_pmu(_parse_state, list, pmu->name, terms)) > + if (!parse_events_add_pmu(_parse_state, list, pmu->name, terms, true)) > ok++; > parse_events_terms__delete(terms); > } > -- > 2.7.4 >