From patchwork Mon May 30 08:36:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 12864423 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 9E3D1C433F5 for ; Mon, 30 May 2022 08:38:43 +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=DhpscR7RgmEIeESHYC/ypantTy8y1Q/J0keqR1llDiA=; b=SuxgVf+LRGbUPr TMu44f9hLcAY/rbc62/u0+XLV9t9hYCC9zkR7H0i9E6ZoNGIWkYVueMr/TzWA+t/CeAgzPhDKcSbs bFnJjx3gNbg5VO1Tyx2zfOiccmv1aXOXmT4wVQ6YJ1rMIbXzqW1znVEHcWitIhqUo1CseOUv6Uo1X VREaWSyOtImsZI6ZowW2QmYuwlh5F/arCiAJkQSO+lqgnVBkbSHJ1uf129Uer9FCsaRsTNP0pUZl7 hFJHmgKs8IFovBu2XRBeLvh3E9ujVbzJajrMj1pajC9z/y/LEZPRfVYaltYGgroHVVvut4T1joXfz G4nYAOdS2KgfsvdN6Hcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvau0-005wjS-HG; Mon, 30 May 2022 08:37:28 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nvatb-005wZT-V7 for linux-arm-kernel@lists.infradead.org; Mon, 30 May 2022 08:37:05 +0000 Received: by mail-pf1-x432.google.com with SMTP id 202so10039028pfu.0 for ; Mon, 30 May 2022 01:37:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UhkR/xwMVW188JuNs6C6f8j4661lnOTgyOGhSkFU51U=; b=RX8p/ioqUv9vKJwWEHErAhzsNdDv+lzw6ldOZ2tLzYsA2BtTduGeCybTgIGcEPbL8x FPPS0TqIzDyDYPidnLHRdx8lkvCC4f0d2TBBCfUeqVVdMnusVqefk68FoljFIjusekHA 7qlmnfJzNpZsagijS0GsAvGOzoV2EJ9TQh01ZZFVwCuLY99sc0sGqdOIzW9ykFwyxvSo uzdjWRuYxBvJsgxSRHri4PmmvQCz1yiLFiLOZq9m2YkYUdLqRtqXt4sC4zvohBWnkcLs 21q0aMSrAuPk1cbY0C4cVwjaRPKYymHsLDqG5EVDxKhGMyYXaqGzzQnQ7BIKMdabRyKD MqhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UhkR/xwMVW188JuNs6C6f8j4661lnOTgyOGhSkFU51U=; b=EVaGJbxxQe/C3XzTIkDaXvfDBpPE2L2ke0Q3wPOMxu+kiobuVP3DmF11gBuwL/JrL3 1rWdzEYUw/XtghbGQ4WysMun5E3bPB/n1BfI4VJUEZK2JrpZOeipLsy52MgWi0GvIDB6 rvzXxyoVzBCRAMa/RASz31J9kzlqQlbIVoh8z8s+hna/l119vkWQ0y7PV56qM25X6zSZ dQBMQus53o1jE5wZLjxtyLfDgNfWn4FO8M7aaH/4Uv5wDSeMpP0Y1xMuT8nT39PRTizT Uf0FK2OhY2f7MiNf8PV4PN2rh3gnaOFzhlZZNn+OcNr0L5Tno8uIJnRRXTVuuLxxiBVc z38w== X-Gm-Message-State: AOAM530UjAc4mLtBHSLIbRR/Z00JRiToUcNy2Omh7UzMJSKabXlOOGVa tDxChO6j7M/yhqbsMqaGQb4Gow== X-Google-Smtp-Source: ABdhPJwmlOiMnXPNpqTc1QvLvtX4BdfJK0TQYozh+L0RCqyyIOrqFxwHS8VViVjHuwYOBBoy/5b7UA== X-Received: by 2002:a65:52cd:0:b0:3f5:f3fb:6780 with SMTP id z13-20020a6552cd000000b003f5f3fb6780mr49020668pgp.150.1653899820324; Mon, 30 May 2022 01:37:00 -0700 (PDT) Received: from leo-build-box.lan ([46.249.98.195]) by smtp.gmail.com with ESMTPSA id c20-20020a170902b69400b0015e8d4eb1e5sm8556786pls.47.2022.05.30.01.36.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 May 2022 01:36:59 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , James Clark , John Garry , Will Deacon , Mike Leach , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , German Gomez , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH] perf mem: Trace physical address for Arm SPE events Date: Mon, 30 May 2022 16:36:45 +0800 Message-Id: <20220530083645.253432-1-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220530_013704_090213_F870588D X-CRM114-Status: GOOD ( 13.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list 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 Currently, Arm SPE events don't trace physical address, therefore, the field 'phys_addr' is always zero in synthesized memory samples. This leads to perf c2c tool cannot locate the memory node for samples. This patch enables configuration 'pa_enable' for Arm SPE events, so the physical address packet can be traced, finally this can allow perf c2c tool to locate properly for memory node. Signed-off-by: Leo Yan Acked-by: Namhyung Kim --- tools/perf/arch/arm64/util/mem-events.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/perf/arch/arm64/util/mem-events.c b/tools/perf/arch/arm64/util/mem-events.c index be41721b9aa1..df817d1f9f3e 100644 --- a/tools/perf/arch/arm64/util/mem-events.c +++ b/tools/perf/arch/arm64/util/mem-events.c @@ -5,9 +5,9 @@ #define E(t, n, s) { .tag = t, .name = n, .sysfs_name = s } static struct perf_mem_event perf_mem_events[PERF_MEM_EVENTS__MAX] = { - E("spe-load", "arm_spe_0/ts_enable=1,load_filter=1,store_filter=0,min_latency=%u/", "arm_spe_0"), - E("spe-store", "arm_spe_0/ts_enable=1,load_filter=0,store_filter=1/", "arm_spe_0"), - E("spe-ldst", "arm_spe_0/ts_enable=1,load_filter=1,store_filter=1,min_latency=%u/", "arm_spe_0"), + E("spe-load", "arm_spe_0/ts_enable=1,pa_enable=1,load_filter=1,store_filter=0,min_latency=%u/", "arm_spe_0"), + E("spe-store", "arm_spe_0/ts_enable=1,pa_enable=1,load_filter=0,store_filter=1/", "arm_spe_0"), + E("spe-ldst", "arm_spe_0/ts_enable=1,pa_enable=1,load_filter=1,store_filter=1,min_latency=%u/", "arm_spe_0"), }; static char mem_ev_name[100];