Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3686528iob; Tue, 17 May 2022 05:28:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKCDGnFJbdfrm1fzpDp7vT3KZEoF/B0/xwzOR4aqA5BfsdBeB5hYumwIzdsNenQ6ya1ken X-Received: by 2002:a17:907:7d93:b0:6fe:21d9:4230 with SMTP id oz19-20020a1709077d9300b006fe21d94230mr12847630ejc.42.1652790487488; Tue, 17 May 2022 05:28:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652790487; cv=none; d=google.com; s=arc-20160816; b=r/vtVcQiMf8I4nbdluj/eJVtaxLaxb7P+BHuPdzp+WsFgZ7Nh4f04iid8rITCWxG+i 5QhOPoQ+Q6lSSMnLg24gMOvX6gR5TbnlFB95635GN2SxXP71TtKev7eiJIDQScQXpNvO kOf1+zY376deyLfpoaJGWQ9YN51JSCzSaZluyzdznFEFJ3WVfr2Gwsd1Lbhz6AK2dox0 fs5wcDDdW7b/A0NdPo91fcNqSxCQU5W++EhLInKfq7CWPrmVYjCTpmY+iZ1UXZNILCov zFw8Lsm5O9G1jqSTwa1+gAHV3s4g1z5Ik/oZdW5MVb9pNLxL3NS0z2NlSOf+iiIB/vOs yH1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Co6ZCtQl7dAoI2uebo1D1QUugEUgi2UYTVOs/yZ+Jsw=; b=rNRH0SKk0QoTpcOiKibhlGnXlARoKSdckc7tLJEPadkVowh+Yjmy2z/Uxc2LaN3SJT 81rl1n/haHgjIQGoGgsbhlR66X2Ha2mSbgBWHtKuKzyR0JHege5L0HqNWnpXfjcpiUPX FRkvzJVtIrf8AuPlg+KKutKWLKEGEirI57vbUydqbb+7NR7k7OMhgI+aBKa0NOI+RR7W pQC593wg0uRDq+2KFHHLYE+8ivlUe16S13uLnalPFN4szmthEN9t0q5+LRTMYDHZDcOF Tpcsbvkwen7wOzZcsqOsQRjHIuQmV4jSSJfMlpnFvUdI2kRK8GqIBGD+XbhHkEfRw7bL NxvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=Kv3UUAEA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dp1-20020a170906c14100b006f3a0ad9695si2726672ejc.81.2022.05.17.05.27.40; Tue, 17 May 2022 05:28:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=Kv3UUAEA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238926AbiEQCD5 (ORCPT + 99 others); Mon, 16 May 2022 22:03:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235914AbiEQCDl (ORCPT ); Mon, 16 May 2022 22:03:41 -0400 Received: from smtp-fw-6001.amazon.com (smtp-fw-6001.amazon.com [52.95.48.154]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05EC03E0DC; Mon, 16 May 2022 19:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1652753021; x=1684289021; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Co6ZCtQl7dAoI2uebo1D1QUugEUgi2UYTVOs/yZ+Jsw=; b=Kv3UUAEAJ38QwM4Fet3VGIXGzVJ/mWxQFSCUR6AKB9kHx0FmqRIoFIJq rt0dIRsDB8aX6BfPrOLUbGY52S2IziTfwhKuMZR55c21qzR8kK6UBK2bB 6Bnzq5l7CtkD8kd2415M43cel09ahk6ikAljah1ti2SsDuXJmzrgaI0Cv A=; 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 -- 2.32.0