From patchwork Fri Mar 18 19:59:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ali Saidi X-Patchwork-Id: 12785874 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 8A323C433EF for ; Fri, 18 Mar 2022 20:01: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=dBadQU3PThO5SURLGiSKT+uNKCWY5dKtgFLrLC/Umog=; b=SoU4D81l52Rl5L OhuDeH6hpNHVHqVPGXr2q6Nlh1rQD2zh5kgpsqooTB4CSVdTuDdZenbUd3SFYYbpbdHuHD6hbj0tp Br2VRmlqXFzbiRPeAva2F9ifZlExYU3fv4d2YRWDJedCEUuLEBL368JDbcz8KfocLe/Bx5qQmvdhC aRu87BnVLmaeN1Hu2d2heHpXsXJuSIiDATptP0V0iOpSGRiXdt9C9NBEezzCvqzOHAV3ZPUJ+YGyU 3/c/8cCFDqUvMbINmjfk/k59uPixjZn9k4GqFv5BHxQgNL1+VAfnS59xg2pVWJyZLPwDzlRDQExzR KLzyqsoWyOaFyIVFRxjQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nVIlT-002jiz-0L; Fri, 18 Mar 2022 19:59:59 +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 1nVIl3-002jY6-By for linux-arm-kernel@lists.infradead.org; Fri, 18 Mar 2022 19:59:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1647633573; x=1679169573; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=U+moaLi59+BQm7Q4OgIusu1BC18OCx6kr1I58AQfNVM=; b=moAEKAEX/7/NDzvtuUjRA3QoUIvMlVIYakaIrYecXRPBXg6G5G73o20E 3O8ttRYqUJ6lZb1uDVhw6dGF+ALJdbMVLzDNwMpjymX31/as7Wq3JogiJ Iy+fVgEt2fD0MEkEeZ1FkwoEFqXdXAiX89AYu4vW1AmskIW7hKbD41L9i Q=; X-IronPort-AV: E=Sophos;i="5.90,192,1643673600"; d="scan'208";a="72160465" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO email-inbound-relay-pdx-2a-e6c05252.us-west-2.amazon.com) ([10.25.36.214]) by smtp-border-fw-80006.pdx80.corp.amazon.com with ESMTP; 18 Mar 2022 19:59:29 +0000 Received: from EX13MTAUWB001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2a-e6c05252.us-west-2.amazon.com (Postfix) with ESMTPS id 66E594200E; Fri, 18 Mar 2022 19:59:28 +0000 (UTC) Received: from EX13D02UWC002.ant.amazon.com (10.43.162.6) by EX13MTAUWB001.ant.amazon.com (10.43.161.207) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Fri, 18 Mar 2022 19:59:27 +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.32; Fri, 18 Mar 2022 19:59:27 +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.32 via Frontend Transport; Fri, 18 Mar 2022 19:59:26 +0000 Received: by dev-dsk-alisaidi-1d-b9a0e636.us-east-1.amazon.com (Postfix, from userid 5131138) id 8507317C1; Fri, 18 Mar 2022 19:59:25 +0000 (UTC) From: Ali Saidi To: , , , , CC: , , , , , , , , , , , , , , , , Subject: [PATCH v3 0/2] perf: arm-spe: Decode SPE source and use for perf c2c Date: Fri, 18 Mar 2022 19:59:10 +0000 Message-ID: <20220318195913.17459-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-20220318_125933_518894_77D0CE78 X-CRM114-Status: GOOD ( 11.64 ) 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 v3: * Assume ther are only three levels of cache hierarchy * Split the mem_lvl_num and HITM changes in c2c into two seperate patches Ali Saidi (3): 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 .../util/arm-spe-decoder/arm-spe-decoder.c | 1 + .../util/arm-spe-decoder/arm-spe-decoder.h | 12 ++ tools/perf/util/arm-spe.c | 109 +++++++++++++++--- tools/perf/util/mem-events.c | 20 +++- 4 files changed, 124 insertions(+), 18 deletions(-) Tested-by: German Gomez Reviewed-by: German Gomez