From patchwork Tue May 17 02:03:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ali Saidi X-Patchwork-Id: 12851809 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 4683BC433F5 for ; Tue, 17 May 2022 02:05:25 +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=Pp9FCpMFnmnRptEFRml9ksHgra2Uur0TfnxOJLm6ctQ=; b=5CI8xOutMP3I6E 4XOD+hDeSAoWNEaUR2oPhb9KGXGtQ2WSuv4tgIT3GFHndtNM5MQnq60BbjaAaBZ/h8AtwI78rYEGj M2oYzRxgJ9wWCTXnU5oS1FTdbKbBxDQ+f6UAdRp9APfRCxZXO8eK5TGSao94bYbcBqzozOt9oartv KiSaO1MzOHdaFcKWIP0x1wexF1ABsZFOMehoEw/U2C+z3aJ1HQEf4uVixL32xiaaMxt4ct7TSqu3h lblecgaonx86E4tA7skhpWpUMLHQfCkJ+OmQQ+G/wjtbGhxF9ZIl9fbVQUFAntO5+XljMSSr5TaKz /9pFXwZA8JeqweDstpkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqmZT-00BDSu-AB; Tue, 17 May 2022 02:04:23 +0000 Received: from smtp-fw-6001.amazon.com ([52.95.48.154]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqmYp-00BDEa-3T for linux-arm-kernel@lists.infradead.org; Tue, 17 May 2022 02:03:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1652753024; x=1684289024; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Co6ZCtQl7dAoI2uebo1D1QUugEUgi2UYTVOs/yZ+Jsw=; b=XH5vEx6tYlAAAIie3iNsj+9P02Cq6p7g7Wz3gM6spZDLrGxb/RT1GLvh FKq8joFXshplV8f0OaYZX/n8/0aaIesaMGkmeefWNUF7bupMTSSskIZii un9trNPFmrFzj7LdTRm0fYxBYZVIO+QUsMbHLvf8/XQx9xiSTSnPUWSRV E=; X-IronPort-AV: E=Sophos;i="5.91,231,1647302400"; d="scan'208";a="203649419" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-iad-1e-0168675e.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-6001.iad6.amazon.com with ESMTP; 17 May 2022 02:03:39 +0000 Received: from EX13MTAUWB001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan3.iad.amazon.com [10.40.163.38]) by email-inbound-relay-iad-1e-0168675e.us-east-1.amazon.com (Postfix) with ESMTPS id 575E4A2762; Tue, 17 May 2022 02:03:33 +0000 (UTC) Received: from EX13D02UWB002.ant.amazon.com (10.43.161.160) by EX13MTAUWB001.ant.amazon.com (10.43.161.249) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 17 May 2022 02:03:32 +0000 Received: from EX13MTAUWB001.ant.amazon.com (10.43.161.207) by EX13D02UWB002.ant.amazon.com (10.43.161.160) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 17 May 2022 02:03:32 +0000 Received: from dev-dsk-alisaidi-1d-b9a0e636.us-east-1.amazon.com (172.19.181.128) by mail-relay.amazon.com (10.43.161.249) with Microsoft SMTP Server id 15.0.1497.32 via Frontend Transport; Tue, 17 May 2022 02:03:32 +0000 Received: by dev-dsk-alisaidi-1d-b9a0e636.us-east-1.amazon.com (Postfix, from userid 5131138) id 561AB2128; Tue, 17 May 2022 02:03:31 +0000 (UTC) From: Ali Saidi To: , , , , , CC: , , , , , , , , , , , , , , , Subject: [PATCH v8 0/4] perf: arm-spe: Decode SPE source and use for perf c2c Date: Tue, 17 May 2022 02:03:21 +0000 Message-ID: <20220517020326.18580-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-20220516_190343_294801_F79682C6 X-CRM114-Status: GOOD ( 14.20 ) 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 future changes to c2c on a system with SPE where lines that are shared among multiple cores show up in perf c2c output. Changes is v9: * Change reporting of remote socket data which should make Leo's upcomping patch set for c2c make sense on multi-socket platforms Changes in v8: * Report NA for both mem_lvl and mem_lvl_num for stores where we have no information Changes in v7: * Minor change requested by Leo Yan Changes in v6: * Drop changes to c2c command which will come from Leo Yan Changes in v5: * Add a new snooping type to disambiguate cache-to-cache transfers where we don't know if the data is clean or dirty. * Set snoop flags on all the data-source cases * Special case stores as we have no information on them Changes in v4: * Bring-in the kernel's arch/arm64/include/asm/cputype.h into tools/ * Add neoverse-v1 to the neoverse cores list Ali Saidi (4): tools: arm64: Import cputype.h perf arm-spe: Use SPE data source for neoverse cores perf mem: Support mem_lvl_num in c2c command perf mem: Support HITM for when mem_lvl_num is any tools/arch/arm64/include/asm/cputype.h | 258 ++++++++++++++++++ .../util/arm-spe-decoder/arm-spe-decoder.c | 1 + .../util/arm-spe-decoder/arm-spe-decoder.h | 12 + tools/perf/util/arm-spe.c | 110 +++++++- tools/perf/util/mem-events.c | 20 +- 5 files changed, 383 insertions(+), 18 deletions(-) create mode 100644 tools/arch/arm64/include/asm/cputype.h