Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2531090pxb; Sun, 23 Jan 2022 07:37:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxTw08UTrOyOeO7ag4NNmn6fAf4cOwA85mUA9AbeAsJ12/gQqITI3f46Tu1Dgj6ztpdueqh X-Received: by 2002:a17:90a:474d:: with SMTP id y13mr9418229pjg.4.1642952219884; Sun, 23 Jan 2022 07:36:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642952219; cv=none; d=google.com; s=arc-20160816; b=X0gcIQWPhCxlCnCJu+kPnhxszteVUFQdgMZ3uRTMi+HjGSEg5zIANKccMfxqAQJyqz 44autESGxNlNdDMHV31YdrhK4ks/YJ9QV20rEVO0OUgI8sF5ikNtficSt/cFxmEgy3H7 FZF4vL+HvC49LUStwMFWhPIHjnIK7/Q4GO91n0c9Pl+ZWodeJHc00qyUVEbQw8fFQjgk dBWPfUXs+x6hTfEmGNda6tuU75BzMOCjv/1jU4E0aGL7ljDkxfqYc4rfeIufrSU8pe+0 TK31uYRi1X2Wau2nJCDA/WhHx+ttqz8JCEoGiX1b63fTWBWqFyfYwG032ViZbzE7rwnU zgtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Xy1q8CibCJUAIkkmjuaWvUf9ztLj477sGcW4pnyChpo=; b=hNhmIbhzUZLh4rGhqsKtxYXsqjv/5uvnPzgX0PuBEVZ/iFmrm1CXrMi1HwzlzLVOfY 9pk6Yo1dTwNMLZcNiOxc382FFbMUvocf+v8Gt3PfHYYIhhdzh2sUVyBxPyw+fBHWHGp6 XKku7fNB5b+vpn+fyrgA0Sp3m/8dyKZoKIvwb0p5kEOVeme6i7dXbi27li15+h5LfsOT kDzpcu0EELJ17UciRHr3Jma7auh9kP2Cs8MbmRMeHq5QYQmNf3Tw6KLJNk2QiXtgAOZm a9VRZo72F98urNrYZ+G4FW8MgXJJpY5PiE26CMM/CpPgD/wxjqaz2ZQ3KH3T3SiYmpXW 2ZMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YqFvwQxQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c20si10469768pjo.139.2022.01.23.07.36.48; Sun, 23 Jan 2022 07:36:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=YqFvwQxQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231313AbiAVUY2 (ORCPT + 99 others); Sat, 22 Jan 2022 15:24:28 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:37976 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231252AbiAVUY1 (ORCPT ); Sat, 22 Jan 2022 15:24:27 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id DA5C3B80AD8; Sat, 22 Jan 2022 20:24:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 580ABC004E1; Sat, 22 Jan 2022 20:24:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642883064; bh=J7d62QJaNgCNwU/L/WAxtc1M4v8AXpbCa/rwZzH4Qo0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YqFvwQxQeRpZak5KkoNehcEftfSvz0CFBnCU5TSzRiWZg04jApG29obtOza5iDeLA iRVnglTw45Jkwfo4deAdioXWQc67ONzZ/b68itYBDRRzi7uD+x+QlBmai2L7jwpC/M I60LAkDWYjONxNEVt+0pBMJkVBKqM01BIVSKw7+z4zibN8iGgMSfp5qd1tM3Fl9g0u wS6SJYyQ8Lgtl7ph5YK6NAszKWV58zc33okzErmemB0EsisAx3IlzFlRI7nEjCnL8Q LBNN1CFDD/BiX1OJIlWPMHCgz08O/Mm01jHvqrMHYNiuA/bjVtgO53aqSn2RU/18EE t7C3bmFrtCTSA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 56D4B40C99; Sat, 22 Jan 2022 17:22:22 -0300 (-03) Date: Sat, 22 Jan 2022 17:22:22 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: John Garry , peterz@infradead.org, mingo@redhat.com, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org, kjain@linux.ibm.com, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, linuxarm@huawei.com, liuqi115@huawei.com, zhangshaokun@hisilicon.com Subject: Re: [PATCH 0/3] perf: Support event alias in form foo-bar-baz Message-ID: References: <1642432215-234089-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Mon, Jan 17, 2022 at 08:21:42AM -0800, Ian Rogers escreveu: > On Mon, Jan 17, 2022 at 7:15 AM John Garry wrote: > > > > Currently event aliases in the form foo-bar-baz are not supported. > > > > The HiSilicon D06 platform has uncore event aliases in that form, and > > using those aliases fail: > > > > $ ./perf list sdir-home-migrate > > > > List of pre-defined events (to be used in -e): > > > > uncore hha: > > sdir-home-migrate > > [Unit: hisi_sccl,hha] > > > > $ sudo ./perf stat -e sdir-home-migrate > > event syntax error: 'sdir-home-migrate' > > \___ parser error > > Run 'perf list' for a list of valid events > > > > Usage: perf stat [] [] > > > > -e, --event event selector. use 'perf list' to list available events > > > > This series added support for such an event alias form. > > > > I am no expert on l+y, so any and all review here would be appreciated, > > especially the last patch which is marked as RFC (for that same reason). > > > > The series is based on acme perf/core @ 9bce13ea88f8. > > > > John Garry (3): > > perf parse-events: Support event alias in form foo-bar-baz > > perf test: Add pmu-events test for aliases with hyphens > > perf test: Add parse-events test for aliases with hyphens > > The whole set: > > Acked-by: Ian Rogers > > The additional code is no worse than the existing code. The testing is > a great addition! Indeed, thanks a lot! Thanks, applied. - Arnaldo > Thanks, > Ian > > > .../arch/test/test_soc/cpu/uncore.json | 16 +++++ > > tools/perf/tests/parse-events.c | 49 ++++++++++++++ > > tools/perf/tests/pmu-events.c | 32 +++++++++ > > tools/perf/util/parse-events.c | 67 ++++++++++++++++--- > > tools/perf/util/parse-events.h | 1 + > > tools/perf/util/parse-events.l | 2 + > > tools/perf/util/parse-events.y | 17 ++++- > > 7 files changed, 171 insertions(+), 13 deletions(-) > > > > -- > > 2.26.2 > > -- - Arnaldo