Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5875179pxv; Thu, 29 Jul 2021 00:09:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzY0o6iFYu0IOcMWx/T1lzdJFOrdJaie/ziHW6DaFvZnqOpCcO+Qv0SkK5aiYwbhyH59pwg X-Received: by 2002:a17:906:3016:: with SMTP id 22mr3239917ejz.28.1627542576869; Thu, 29 Jul 2021 00:09:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627542576; cv=none; d=google.com; s=arc-20160816; b=mtl26G0vJgSU31WaT/1z7UTtULzmuEQsW+K96Xi9j+c8/HKkZXbWSgocMn3BwEbq6a tKfZTNAn288wsbdC1hClpx180pZ5pogwU0/Uq9jHHrY0E8rEFsjHuuaMC46jahr+2iGJ yNgOXup+TPjWis995ka8CZ631C5o/f6GPjHyWb4TQrPCj5qg2umw4hP64ZWy7QlJuxct AFR+HhVZ/oYEJNCIqhbJ84f1x9qVW8L0fbWSBQurgwX8Fe9FYoxf4bcBOBAgkDYa64ud QvuGO4LlfOfVcyWxY3J+bdLOFzQmYrcYgmHK+lyoqlN3w96ezUfkH356526zQxkYdM5J lOKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=v6AQN5MjLH2mwwfgx4zfeh6xaFKZWv6kxnj2j9hxIXM=; b=DwmKVN+knLFxS9zgc+bwebTRi4fDW9eHHJofOiFcQT0BYsKVviELYA4cwCjfGHDuR4 vZh2WMZNIqyO0xTkrL60ocr1ly44gTwAbYwlNgI6MFUTH5YwzxRAjIgQYF9ieSWRLNtL 7H7gnUiXVc8mcGI/TUPrP8YU2fDrPbMq82MIThDDvh+ZX4AqQFCEz7vm1LRAwEBz4/5r iixFOY0teRj5bU5i8tRNKSJm3aw+bfwIpW9NllLQTVvBW4tKeEeIn+25RIrJrmgOUadv KzYJfMlUGlVrUbdOmrBjbvqaeAd5PZlR0kDuJ+Ma7Ueh8WFllw5/kOdw8SmDc/QASHKw WnhQ== 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v22si2334485edb.606.2021.07.29.00.09.14; Thu, 29 Jul 2021 00:09:36 -0700 (PDT) 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234471AbhG2HHv (ORCPT + 99 others); Thu, 29 Jul 2021 03:07:51 -0400 Received: from mga02.intel.com ([134.134.136.20]:59415 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234268AbhG2HHu (ORCPT ); Thu, 29 Jul 2021 03:07:50 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10059"; a="199997808" X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="199997808" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2021 00:07:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="476237891" Received: from kbl-ppc.sh.intel.com ([10.239.159.163]) by fmsmga008.fm.intel.com with ESMTP; 29 Jul 2021 00:07:44 -0700 From: Jin Yao To: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com Cc: Linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com, Jin Yao Subject: [PATCH v2 0/2] perf tools: Add PMU alias support Date: Thu, 29 Jul 2021 15:06:17 +0800 Message-Id: <20210729070619.20726-1-yao.jin@linux.intel.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A perf uncore PMU may have two PMU names, a real name and an alias name. With this patch set, the perf tool can monitor the PMU with either the real name or the alias. Use the real name, $ perf stat -e uncore_cha_2/event=1/ -x, 4044879584,,uncore_cha_2/event=1/,2528059205,100.00,, Use the alias, $ perf stat -e uncore_type_0_2/event=1/ -x, 3659675336,,uncore_type_0_2/event=1/,2287306455,100.00,, v2: --- Add test case to verify the real name and alias name having same effect. Jin Yao (1): perf tests: Test for PMU alias Kan Liang (1): perf pmu: Add PMU alias support tools/perf/arch/x86/util/pmu.c | 109 +++++++++++++++++++++++++++++++- tools/perf/tests/parse-events.c | 79 +++++++++++++++++++++++ tools/perf/util/parse-events.y | 3 +- tools/perf/util/pmu.c | 26 +++++++- tools/perf/util/pmu.h | 5 ++ 5 files changed, 217 insertions(+), 5 deletions(-) -- 2.17.1