From patchwork Mon Feb 21 22:28:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ali Saidi X-Patchwork-Id: 12754219 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75F1FC433EF for ; Mon, 21 Feb 2022 22:37:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=pS0bgq2nZwjdtP6ThRaQxq+CXL09ACE1WXkTjEz25vM=; b=CwNeuJyZI1eWns 9s5Ccs9cDUj5PJhyN6LjzwLGnJBKc3/JC5talX0M+/6Rh05bFhpGD8TXiwXdpJ6eMYVZI3L+RJ1qo 28gx3gc4uQO2djhUEUeU5SfryX9xyCwKwCcpODHE9Xs8HwDZ9/aX+/Jpdecw/PSO3UKfDAQMt/xGS nJWd/nuwSfRI+i2IWt2tLfyp9xBx1qRFNSKOvcFMEvHizq+qwh7ua5Z58DDirIHRniR23DU5IsiNH LsZxeJFPTQyfodGmtEfUluVenZWgP++oGEdZ+RN5U41wK4B2OjByk4deerNqGrIABIJNWZDbowyZF vcjqLdTA47FZFMKFsC/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMHI2-007Nmz-86; Mon, 21 Feb 2022 22:36:18 +0000 Received: from smtp-fw-80006.amazon.com ([99.78.197.217]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nMHHy-007NlG-GA for linux-arm-kernel@lists.infradead.org; Mon, 21 Feb 2022 22:36:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1645482974; x=1677018974; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=k0dyxPOLVR5U+xrHOAfkTufymjKXrO3oXF6kdc2fxWo=; b=Pb2eTBIgNSDUgnsQLXhzXwaq7w6zmjCxHRZYLcf+hoScPJPvxUymSe3f 0N9iynQf17MszEQuEpHUVFyu1mwgs9wZBgUQdddC8xR3+YUMdn9yHHJhg Xbx7UrBvyeF8Z0B/bzWuFXL3p96vheM9DQwJGrfQ/bVj/Bj95GX0iBfHP w=; X-IronPort-AV: E=Sophos;i="5.88,386,1635206400"; d="scan'208";a="64956749" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-iad-1e-b69ea591.us-east-1.amazon.com) ([10.25.36.214]) by smtp-border-fw-80006.pdx80.corp.amazon.com with ESMTP; 21 Feb 2022 22:36:08 +0000 Received: from EX13MTAUWB001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan2.iad.amazon.com [10.40.163.34]) by email-inbound-relay-iad-1e-b69ea591.us-east-1.amazon.com (Postfix) with ESMTPS id 00C4CC0A6C; Mon, 21 Feb 2022 22:36:02 +0000 (UTC) Received: from EX13D02UWC002.ant.amazon.com (10.43.162.6) by EX13MTAUWB001.ant.amazon.com (10.43.161.249) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Mon, 21 Feb 2022 22:35:56 +0000 Received: from EX13MTAUEE002.ant.amazon.com (10.43.62.24) by EX13D02UWC002.ant.amazon.com (10.43.162.6) with Microsoft SMTP Server (TLS) id 15.0.1497.28; Mon, 21 Feb 2022 22:35:56 +0000 Received: from dev-dsk-alisaidi-1d-b9a0e636.us-east-1.amazon.com (172.19.181.128) by mail-relay.amazon.com (10.43.62.224) with Microsoft SMTP Server id 15.0.1497.28 via Frontend Transport; Mon, 21 Feb 2022 22:35:55 +0000 Received: by dev-dsk-alisaidi-1d-b9a0e636.us-east-1.amazon.com (Postfix, from userid 5131138) id C73CC1796; Mon, 21 Feb 2022 22:35:55 +0000 (UTC) From: Ali Saidi To: , , , , CC: , , Peter Zijlstra , Ingo Molnar , "Arnaldo Carvalho de Melo" , Mark Rutland , "Alexander Shishkin" , Jiri Olsa , Namhyung Kim , John Garry , "Will Deacon" , Mathieu Poirier , "James Clark" , Andrew Kilroy , Jin Yao , Kajol Jain , Li Huafei Subject: [PATCH v2 0/2] perf: arm-spe: Decode SPE source and use for perf c2c Date: Mon, 21 Feb 2022 22:28:44 +0000 Message-ID: <20220221222853.953-1-alisaidi@amazon.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Precedence: Bulk X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220221_143614_623905_B0C1AC4E X-CRM114-Status: GOOD ( 11.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When synthesizing data from SPE, augment the type with source information for Arm Neoverse cores so we can detect situtions like cache line contention and transfers on Arm platforms. This changes enables the expected behavior of perf c2c on a system with SPE where lines that are shared among multiple cores show up in perf c2c output. These changes switch to use mem_lvl_num to encode the level information instead of mem_lvl which is being deprecated, but I haven't found other users of mem_lvl_num. Changes in v2: * Split the synht_data_source functions into a generic and neoverse version * Use mem_lvl_num instead of mem_lvl * Modify c2c to support mem_lvl_num + HITM Ali Saidi (2): perf arm-spe: Use SPE data source for neoverse cores perf mem: Support HITM for when mem_lvl_num is used .../util/arm-spe-decoder/arm-spe-decoder.c | 1 + .../util/arm-spe-decoder/arm-spe-decoder.h | 12 ++ tools/perf/util/arm-spe.c | 106 +++++++++++++++--- tools/perf/util/mem-events.c | 14 ++- 4 files changed, 114 insertions(+), 19 deletions(-)