Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4257177pxy; Tue, 27 Apr 2021 00:04:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzRIlY8ai1/34Pm6Gn+GIBtkRxRLizxf71ejF27PxOCIIGTBbaWG1T41s0iCRmzIIB1+Jp5 X-Received: by 2002:a63:1352:: with SMTP id 18mr19804420pgt.11.1619507047497; Tue, 27 Apr 2021 00:04:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619507047; cv=none; d=google.com; s=arc-20160816; b=w/PPl0ntvjc0mGQIZYUAlQhkfOEn96dlxEJHGQb68WanXv6ALpYyL4EoOBz060pJL1 or0CpFFSXzYCxq1L3593Iqwfu2o1xkEMz6HoB57Au9UOBsGEONaaIlj5l17zT+8QRlA2 E5mn7qZcK8X+in/HhvakhaufHzxIuqwWErizDkXnOt56bSvKZNs4FetcFt2Q+HzBjITX fEajDx/y2+NhbeqA99QTe7laGl2/DKvPArgywkYV7JA/38cJl3Y92n4e0D5oumi44Iwq VaJS1aoOljhKPCEJFq8ng/dhiHvmBWHra/7oT/08kXxosV50q8aepD5qztZpUrVFprGK vWow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:ironport-sdr:ironport-sdr; bh=nlcPRU1Mg4d/ZAE2XcrAtnOOex9r5RrXlk2CES+Jmng=; b=pqKjlrSz0KXslIfKL4hpyA2XrVM9kjxmciSMsFikT0pPOKeZO2uEzEVgfjU8lp8Cn6 mXSsyviC0bjeS71Q31Xb8dVikeJOu77g6ZpWhbo3Hjk0QT3QZD1pUnPvQenPBtdlIhkG isLVlOmCvLfa5p9g8LB8mFzdCGwJKjEc+sianyfV8pursHQaN6UMiFi90UhwP4N05Bcz 1nhQsGeAMUgorFuUBQQ9JXy3liNqs8BFl0uMe//J7G6epsyLsleRrjFWuVefPxqD9bmJ teHmXkiUTgHshhvYi9HPK2I7LIuuc8ggxDzlwl6ukxgHVviN3pLyUGfW8qk2xcolFcG2 urSQ== 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 r20si21128280pgv.32.2021.04.27.00.03.55; Tue, 27 Apr 2021 00:04:07 -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 S234791AbhD0HEC (ORCPT + 99 others); Tue, 27 Apr 2021 03:04:02 -0400 Received: from mga12.intel.com ([192.55.52.136]:3176 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234764AbhD0HD5 (ORCPT ); Tue, 27 Apr 2021 03:03:57 -0400 IronPort-SDR: IIbG31vqdIcMyJDeteBA5uKTiGpdxcmTNp0To+GI0FlsvKfxyPrOEAo/4pG54uGrY9x8uP4i7D KbfiRimH+N/A== X-IronPort-AV: E=McAfee;i="6200,9189,9966"; a="175944148" X-IronPort-AV: E=Sophos;i="5.82,254,1613462400"; d="scan'208";a="175944148" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2021 00:03:13 -0700 IronPort-SDR: dkSiJHabp0DQ/L93TpaW7h9Db/aCIdaIqjGsI+X9FulY0d04r2GVH083O6zRNdHEoDXXHWIa87 /OWEuKFWx8cA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,254,1613462400"; d="scan'208";a="447506594" Received: from kbl-ppc.sh.intel.com ([10.239.159.163]) by fmsmga004.fm.intel.com with ESMTP; 27 Apr 2021 00:03:11 -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, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com, Jin Yao Subject: [PATCH v6 02/26] perf jevents: Support unit value "cpu_core" and "cpu_atom" Date: Tue, 27 Apr 2021 15:01:15 +0800 Message-Id: <20210427070139.25256-3-yao.jin@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210427070139.25256-1-yao.jin@linux.intel.com> References: <20210427070139.25256-1-yao.jin@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For some Intel platforms, such as Alderlake, which is a hybrid platform and it consists of atom cpu and core cpu. Each cpu has dedicated event list. Part of events are available on core cpu, part of events are available on atom cpu. The kernel exports new cpu pmus: cpu_core and cpu_atom. The event in json is added with a new field "Unit" to indicate which pmu the event is available on. For example, one event in cache.json, { "BriefDescription": "Counts the number of load ops retired that", "CollectPEBSRecord": "2", "Counter": "0,1,2,3", "EventCode": "0xd2", "EventName": "MEM_LOAD_UOPS_RETIRED_MISC.MMIO", "PEBScounters": "0,1,2,3", "SampleAfterValue": "1000003", "UMask": "0x80", "Unit": "cpu_atom" }, The unit "cpu_atom" indicates this event is only available on "cpu_atom". In generated pmu-events.c, we can see: { .name = "mem_load_uops_retired_misc.mmio", .event = "period=1000003,umask=0x80,event=0xd2", .desc = "Counts the number of load ops retired that. Unit: cpu_atom ", .topic = "cache", .pmu = "cpu_atom", }, But if without this patch, the "uncore_" prefix is added before "cpu_atom", such as: .pmu = "uncore_cpu_atom" That would be a wrong pmu. Signed-off-by: Jin Yao --- v6: - No change. tools/perf/pmu-events/jevents.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c index 33aa3c885eaf..ed4f0bd72e5a 100644 --- a/tools/perf/pmu-events/jevents.c +++ b/tools/perf/pmu-events/jevents.c @@ -285,6 +285,8 @@ static struct map { { "imx8_ddr", "imx8_ddr" }, { "L3PMC", "amd_l3" }, { "DFPMC", "amd_df" }, + { "cpu_core", "cpu_core" }, + { "cpu_atom", "cpu_atom" }, {} }; -- 2.17.1