Received: by 10.223.185.116 with SMTP id b49csp6209415wrg; Wed, 28 Feb 2018 05:51:04 -0800 (PST) X-Google-Smtp-Source: AH8x226HFJ8rsWKo8M/9uujuJ+fHGreSzwEi7jA7VL/0iS3VP30ClsLJUPcra/ddPsn60nfavWVD X-Received: by 10.98.18.143 with SMTP id 15mr17972545pfs.104.1519825864459; Wed, 28 Feb 2018 05:51:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519825864; cv=none; d=google.com; s=arc-20160816; b=ILH7OCOWmSPh7dntdk0CztdkooOtWtOrifOnv3YoI3DXgLFmiahXkF9QdJjZzNgDEU PsSTznZZlhYmkAfFaeb/4DedOflKyP3NuuDOIpXFGPOjbJrGVUtyokXk4OC6ssYQVPdE qOYhmj0Oy1pvoP42RPJs9UP+1vyGeZ889lFTTeejMuNKFJ1/1NWHVJapWofR3Do49mhR 4SCV5njOm3qy4BzqbFfVTKfcp1khQZQzSo7BR21IIrDKlFF5kePWCiDMatF/1QBNFrc0 No9d20IJvP/jiPr8r8PVlRocRbvKVJkSsgJ0+3c9IvtkVSidpjopLx/Y5CRY0JpVW5jR 1YvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=yJt/RjSoL0E/Jdiv5Q2UrhlA8Lj73t5S40Fqj1ae6WQ=; b=cCeCyVEcGFEPdr3ZuD/wykPiTmFijkGgvn4coaf/YpHJcULlTrXD1+mS8hwW1MWWGX OXhaHQx3lR5IoomWukELG5Cv1UAZOwivTtVEi/5XojF+nGgDbNGOdvqwfvq/jMm6ibFa HoUG5bygCOspdyDqvF0L3DuEjpAtuBH0nbvZ6VimUuPvSkWhodU221zjt4DZre5bEb5L rYpfjDHbpte7qUAdyu6LGPMp+ld7bmkE760fNocwd8hgCvMCzSHyzqKlTp9mUZVP1A3o 0bkOaPEmHj1bEj2BjWZQTZ5c2EftFavD7hl1ks6AHOQb1fpV3QGxrrjSl49wc4i2xps1 WL0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=LSCi512X; dkim=pass header.i=@codeaurora.org header.s=default header.b=kykyaWjw; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c17si1248304pfi.259.2018.02.28.05.50.47; Wed, 28 Feb 2018 05:51:04 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=LSCi512X; dkim=pass header.i=@codeaurora.org header.s=default header.b=kykyaWjw; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752626AbeB1NuE (ORCPT + 99 others); Wed, 28 Feb 2018 08:50:04 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:33908 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752441AbeB1NuC (ORCPT ); Wed, 28 Feb 2018 08:50:02 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 3992E607DC; Wed, 28 Feb 2018 13:50:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1519825802; bh=5qyhnJazB3HOuBO6o7an54fcxEX9F+Jl3mkjny4wGnY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LSCi512XhN00Z9zwD/dbBL8M+wMxTuqEoPkotvjFb7DRXHI8/Ex4pBkZgx61GOke8 G+AgUlLTz8YBCzfLBk8RkBwplSFUNKWrLtwFl8yVfycLQOJ2V0IetsQX3tzubPGBMp i/Aqx1GQyFkJpt1HC+SaKHHIpgK5GJfMyH6l3/GY= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id F12F860115; Wed, 28 Feb 2018 13:50:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1519825801; bh=5qyhnJazB3HOuBO6o7an54fcxEX9F+Jl3mkjny4wGnY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=kykyaWjwMXry+XNTxpffvlGMG8jM2wNiwfR6LkuwOfnj3p/rZNNZHLFhKFgJLZteF e0QbJdNXVVrNI/4Jlzmq41Uch0+8jbxaypVzNW9xHSPv13thc/gSZn4nnIn7LYJLu9 inzenphkEVIg98GOWlxdEvrwFv0G+BQcc+TsEv9M= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Wed, 28 Feb 2018 08:50:00 -0500 From: Agustin Vega-Frias To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peter Zijlstra , Ingo Molnar , 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 In-Reply-To: <20180228124524.GA6102@kernel.org> References: <1519770848-26738-1-git-send-email-agustinv@codeaurora.org> <1519770848-26738-4-git-send-email-agustinv@codeaurora.org> <20180228094038.GA9474@krava> <20180228124524.GA6102@kernel.org> Message-ID: <54b6a1da83f451309da13e4b8eee1bc5@codeaurora.org> X-Sender: agustinv@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-02-28 07:45, Arnaldo Carvalho de Melo wrote: > Em Wed, Feb 28, 2018 at 10:40:38AM +0100, Jiri Olsa escreveu: >> 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 > > Yes, please show how it was and how it became, also please update the > documentation, as pointed out by Andi. Thanks all for the feedback, I'll make the updates requested and submit a follow up. Agustín > > - Arnaldo > >> 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 >> > -- Qualcomm Datacenter Technologies, Inc. on behalf of the Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.