Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3363040pxb; Mon, 17 Jan 2022 18:38:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJwg6INXjAxokNzBINiKeXEHZ2ZNU63BeSrRTfXUMRY/1YvV958Sd6y+w3VVP6AYF9VzyCCf X-Received: by 2002:a17:90a:bd12:: with SMTP id y18mr1035357pjr.134.1642473513276; Mon, 17 Jan 2022 18:38:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642473513; cv=none; d=google.com; s=arc-20160816; b=t1+ShC8uQKYhSOb00N/QTsJiEp/rI1z/cWashHEx2lgy4gSVtCJE6raagcujYsaNaN NM3JSOZGucCyMc1NzyBJLSs6O8VtBrH5iMPteuTcD5xzMacLqj+Dk9giV/8YO0n40Ne7 bfUgK6HNn2ZRLHyneRAXPibz9g6nR9WsxJBKMq0VjB/KfU+J9VW683e+H7UdKKhYvcAo SXxGf2veWLvWK7BVLk7fkXQvYv23+qi8YiI6ZoRx5n8aO+iwluNJCysJ7x30zxPz0gA5 BAwemyImRmmih+KigsNWQtKTBPVgESp+hMAHd3YEjhrkZzkkXd0/GlNTn6grx5NVn87C soAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Sp+0eoECInU2wfkdrbVWkaKUDKICynVO7ICEtzkqDx8=; b=OrBIB0CQIhpDG2qqJ+Nk2RnUKjfNgU7+q1iZZ5twnPFMXPp80lUNdPDdSYDX0I8CBc bC+CgP5w1kCkreBycRbU3fOcqwa1BukwokugPo7783/5d0vyjY2xCZ7KzKUSBUNUhqxB Qnb7bbEBOUP2IhEhfUw0Y5XCTy81YMn/4gcS2fA5/JsomVUVdRHIgXM+kHVj9DeTm3Da RK5UijtRCR+6BA+u8bq7vKwUsqTTXTRcfXSGaz6KL+o+Q/oo4xup76wD6/jJ+B8fCVdt jDHOp2xwKPtMcOHVwn1CkxUYPHVF6id9xKBM9boVRXOhEv6cTsi+kBunIO/1mAWhVpZZ 0+OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=G7gYml8d; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x3si9982727pgr.396.2022.01.17.18.38.21; Mon, 17 Jan 2022 18:38:33 -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=@google.com header.s=20210112 header.b=G7gYml8d; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241057AbiAQQV5 (ORCPT + 99 others); Mon, 17 Jan 2022 11:21:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237650AbiAQQV4 (ORCPT ); Mon, 17 Jan 2022 11:21:56 -0500 Received: from mail-il1-x131.google.com (mail-il1-x131.google.com [IPv6:2607:f8b0:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E63BAC06161C for ; Mon, 17 Jan 2022 08:21:55 -0800 (PST) Received: by mail-il1-x131.google.com with SMTP id x15so15189271ilc.5 for ; Mon, 17 Jan 2022 08:21:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Sp+0eoECInU2wfkdrbVWkaKUDKICynVO7ICEtzkqDx8=; b=G7gYml8dmiEYly+hsWDEJkbGtJsKpyLr2bmYQH7r+pHbSZBANaq3j/K1PRU8rlVMTG zpOd1VFgDUX7J6RvXrbCyRUOO5bPURbgl18lr7YyP9y0LObLswmSte7COLutEbl1nkKo mA9CAkIhzzh9JaSFgIRXG2Oc7mYX3yWSaj8wJLkmhYOhM3FwVwSSjaLSrtYTdm7BA2yF YhVsTtT3j8D7IEQ8BYZBTnjdJTUN6jZB5nr7einp2i5em+F7zF/kMIT+enAwnnFT7U5I fySbn8gjekMICzahIiA9HNkyz4TQ3erGhTI39hl6ehrKug2L2OQw5IZ8f7fLp2pRGcFL 5x8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Sp+0eoECInU2wfkdrbVWkaKUDKICynVO7ICEtzkqDx8=; b=oP1wOE9jOfdn5DBQCOQhBZ1JQ2QGR+27az1eEpW2rdMd36h+RFyvqxUnAu73XIQ7Ay tWrHdCsux5wlZv1ubRBFMUmpuQTzJ0Xhv5b+3cua1KteGN/4SXAGaG5vSskP0RCHVur4 6wpnk6TI/0tWc2P1iOjOp4fWKhOBRJeo5nPinU5VJDdbs98k2an8OPsLDn8Yx/jPjZQY 2Sl889dkbulDrqlKdSkspsBHn/5zoPCNWr9eaj/gXePN9ba6KMyvHB4ogt41shgksOTx kZAwEIyt0I5w2OTH4HgzBd9wIOHEGOplb2ZXFS8CQkpFEf7Cb72/F/zgS1KwxXzm7rcC B2iQ== X-Gm-Message-State: AOAM530HHAelqCaYHHw9AEIW/VNemceyt3rxCa+ohdm58U0AY/JqH1eI MMRviNG4fXhJUCz02ot5L+OYfgx+CgCKqsnSbH2STw== X-Received: by 2002:a05:6e02:19cd:: with SMTP id r13mr11713421ill.89.1642436515137; Mon, 17 Jan 2022 08:21:55 -0800 (PST) MIME-Version: 1.0 References: <1642432215-234089-1-git-send-email-john.garry@huawei.com> In-Reply-To: <1642432215-234089-1-git-send-email-john.garry@huawei.com> From: Ian Rogers Date: Mon, 17 Jan 2022 08:21:42 -0800 Message-ID: Subject: Re: [PATCH 0/3] perf: Support event alias in form foo-bar-baz To: John Garry Cc: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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! 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 >