From patchwork Thu Mar 24 18:33:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ali Saidi X-Patchwork-Id: 12790970 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 DFC66C433F5 for ; Thu, 24 Mar 2022 18:35:06 +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=0hTit8+jHjz5Xxcg1wVu4uXzeqn9vpfYungwi1KKFEY=; b=GkZXOubRR7xsAp +ByjnFbitg7iMgeXvZVwAgnQwfhDdr8e2vJiL/NtclqAcUa0pzjTGyVG6isS0yvDbgTo3QVDx/aOv CXYAF6TI02YV/b+Gw88AUFxTWx2VI3mH+iki8OJvDmreRWgRgXboYhuX6yooQFz+ujch4lS/N45EB 849CxzYDoZN9crthVjAsGqybTZpaGEgWsRr3xA0JjQ+AY4smk4eaAlxHFWgsBNFhUyd8jrOmalQwf OS6PCkG0fd3JtC/LQq7SP/5do3flGhcv8PliQAPRimOgBAWP2HeITbOZF0/UbcrPJIJ9WI7DG0AU7 YmXUt3RwqakzZeVB1hrw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nXSHT-00HY8w-WA; Thu, 24 Mar 2022 18:33:56 +0000 Received: from smtp-fw-9102.amazon.com ([207.171.184.29]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nXSHO-00HY7j-CH for linux-arm-kernel@lists.infradead.org; Thu, 24 Mar 2022 18:33:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1648146830; x=1679682830; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=F4XLeJkRXeQm1oTsqoQy/DIHpkva71gmVFFW70rGJ50=; b=bMnZ8ce6WSGYB1vhTR9BEnBH/5jLlsi8EfLZ+/8kn+yKsOVtRISJh4Et ibZr87mHiojf5SD3oBMwwQDWDJowVtKdgWuh84+/V1yWCDT/1GdK3p+yy 26KbjzFG8LXBH1/4umvCQqO/IvZT3yEmquqOpaGfNvcxGAF4DwentMhuN 0=; X-IronPort-AV: E=Sophos;i="5.90,208,1643673600"; d="scan'208";a="205119688" 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-9102.sea19.amazon.com with ESMTP; 24 Mar 2022 18:33:46 +0000 Received: from EX13MTAUWC002.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 6522DC0944; Thu, 24 Mar 2022 18:33:40 +0000 (UTC) Received: from EX13D02UWC001.ant.amazon.com (10.43.162.243) by EX13MTAUWC002.ant.amazon.com (10.43.162.240) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Thu, 24 Mar 2022 18:33:39 +0000 Received: from EX13MTAUWC001.ant.amazon.com (10.43.162.135) by EX13D02UWC001.ant.amazon.com (10.43.162.243) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Thu, 24 Mar 2022 18:33:39 +0000 Received: from dev-dsk-alisaidi-1d-b9a0e636.us-east-1.amazon.com (172.19.181.128) by mail-relay.amazon.com (10.43.162.232) with Microsoft SMTP Server id 15.0.1497.32 via Frontend Transport; Thu, 24 Mar 2022 18:33:39 +0000 Received: by dev-dsk-alisaidi-1d-b9a0e636.us-east-1.amazon.com (Postfix, from userid 5131138) id 08FDC2549; Thu, 24 Mar 2022 18:33:39 +0000 (UTC) From: Ali Saidi To: , , , , , CC: , , , , , , , , , , , , , , , Subject: [PATCH v4 0/4] perf: arm-spe: Decode SPE source and use for perf c2c Date: Thu, 24 Mar 2022 18:33:19 +0000 Message-ID: <20220324183323.31414-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-20220324_113350_490811_2BC2DF5E X-CRM114-Status: GOOD ( 11.28 ) 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 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