Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3360574pxb; Mon, 17 Jan 2022 18:34:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJzTAe9likp4uikbc5REsyxyaFRjW6872ts8TBVFp47ztLeGytMgdvlPIN6vqpQZ/tFWc7iP X-Received: by 2002:a17:902:aa85:b0:149:4614:bc1f with SMTP id d5-20020a170902aa8500b001494614bc1fmr25136079plr.150.1642473282792; Mon, 17 Jan 2022 18:34:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642473282; cv=none; d=google.com; s=arc-20160816; b=syMzoPQVFsX075/kbxkDDOXiemcGu5Q8tGAbX8iA1rvHN7bT3BMMN7wnUJdBPhWWCX YJ9LWI/SsEuElYF6q8b/r0xzbW4o45tis9WQ8AYLOfNppdj1t/PCHRdJ8N3t5DZ59jtp HYk0dcj0YMya0WmJyJ6vPHsybXiLFKqgm13khohDR6yeYDP9wjjoG3wc3fcdkT0kEJrb vAHlo0FT6TaQxsL4Wc6bU/K7PQgKshWmppWFUAI72UqBS4kfc6EBR56StzB3baaYWrTm Am98jyGXluFKfOZdk3Qh6W43kX4iEQunNMXzVf/nIBagtzWPw0BZJDt3AuV5SNl1ylxi MRpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=8IYL5nUd3MsJ3sVzm3WG8x8DL+wmtFsYF8gMTZENYT0=; b=yVpXiPrfSDB+usj+70gZS3xUc3SJ7rhHKQHZ81G2zyEc9b+VxShsmaXHzpJrWPuMDH zRNCg1zbj7wj88H863AZ9AcKG6z6wOTczGq6UMmhX2CFGDbIPt+vCuxvGVF38KHbH/iD 5aYHOv36cJL1IoUZX1q2diZr+qJHOCbRGOrjPj2GZRi/5Tk9xWhZr/mgBfXrB4+enpHc LQyCodhbre3JxqXIpl1Uluyjl8b6eSInLYjb11g8rePiLAJfVlGYYhPiscEDK0dr//91 KT39QhyDRmHfSHgfud83thapmP/rGHoG5UPgmMQEwUAuZp0hgJ1OSXc4vRPhYaEX388Q 9OqA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b38si11393405pgb.221.2022.01.17.18.34.31; Mon, 17 Jan 2022 18:34:42 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240402AbiAQPPk (ORCPT + 99 others); Mon, 17 Jan 2022 10:15:40 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:4418 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240385AbiAQPPe (ORCPT ); Mon, 17 Jan 2022 10:15:34 -0500 Received: from fraeml706-chm.china.huawei.com (unknown [172.18.147.207]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4JcwPS6HF2z67fK4; Mon, 17 Jan 2022 23:12:28 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml706-chm.china.huawei.com (10.206.15.55) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.21; Mon, 17 Jan 2022 16:15:31 +0100 Received: from localhost.localdomain (10.69.192.58) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Mon, 17 Jan 2022 15:15:27 +0000 From: John Garry To: , , , , , , , , CC: , , , , , John Garry Subject: [PATCH 0/3] perf: Support event alias in form foo-bar-baz Date: Mon, 17 Jan 2022 23:10:12 +0800 Message-ID: <1642432215-234089-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 .../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