From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754900AbdCGKDm (ORCPT ); Tue, 7 Mar 2017 05:03:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60276 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754182AbdCGKD0 (ORCPT ); Tue, 7 Mar 2017 05:03:26 -0500 Date: Tue, 7 Mar 2017 11:03:00 +0100 From: Jiri Olsa To: Andi Kleen Cc: acme@kernel.org, jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH 03/10] perf, tools: Factor out PMU matching in parser Message-ID: <20170307100300.GB12093@krava> References: <20170301064924.32172-1-andi@firstfloor.org> <20170301064924.32172-4-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170301064924.32172-4-andi@firstfloor.org> User-Agent: Mutt/1.8.0 (2017-02-23) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 07 Mar 2017 10:03:04 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 28, 2017 at 10:49:17PM -0800, Andi Kleen wrote: SNIP > diff --git a/tools/perf/util/parse-events.y b/tools/perf/util/parse-events.y > index a14b47ab3879..6b2bc918fc94 100644 > --- a/tools/perf/util/parse-events.y > +++ b/tools/perf/util/parse-events.y > @@ -236,37 +236,9 @@ PE_NAME opt_event_config > | > PE_KERNEL_PMU_EVENT sep_dc > { > - struct parse_events_evlist *data = _data; > - struct list_head *head; > - struct parse_events_term *term; > struct list_head *list; > - struct perf_pmu *pmu = NULL; > - int ok = 0; > > - /* Add it for all PMUs that support the alias */ > - ALLOC_LIST(list); > - while ((pmu = perf_pmu__scan(pmu)) != NULL) { > - struct perf_pmu_alias *alias; > - > - list_for_each_entry(alias, &pmu->aliases, list) { > - if (!strcasecmp(alias->name, $1)) { > - ALLOC_LIST(head); > - ABORT_ON(parse_events_term__num(&term, PARSE_EVENTS__TERM_TYPE_USER, > - $1, 1, &@1, NULL)); > - list_add_tail(&term->list, head); http://marc.info/?l=linux-kernel&m=148818456131560&w=2 jirka