Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp149502pxb; Tue, 10 Nov 2020 23:21:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1dDKellc4GNrembBRdsTe5oLd5YozjRmMTy1YNE+D3EQ6rL29wIzhjUaKvEUPlIV3tOE/ X-Received: by 2002:aa7:da01:: with SMTP id r1mr17820280eds.45.1605079290132; Tue, 10 Nov 2020 23:21:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605079290; cv=none; d=google.com; s=arc-20160816; b=GHL6ZbmAvTkhHa46aU+A+E1/nX12euWHTfWB51K/aoeURpNh86L3e3jy/hfdm0eu1V qxL7rrhBm1gFgcGRUexcyuWEGhRp6NVUQulQKcehrc+tGM3GBSyw7m96VA0TnWcZZ3BT TwrNlXWdp/Kl5sOeZl2ZgGgVhctlAOFWkccZBwddByLcLQOL/L7rfrqkO68jEHrluNq1 +4BiE8gHNdNRj8qwDKbMTFoAG7f3DTAgI9NJzJMcLBzXm1E9ubnzfnMdJxx06CSSysOI f+3jvDxK1pUT6EBasYj2l/OZS7Y9QChRvW7abpovHdqHS34JBfLiNnYCGKBpEykr2b+f fZIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=3ucoYIWnfXMR4kJEztjUb/NPRnfC3552OCLDYo5AMI8=; b=NjdlwXlHFVHUeG5nbBung/4RESBHeLQ1JSI3yrCWs/uSr9IvMqFbu0oGCCb10C/7sk CHU4Jxt7vbkh7hp4/Flqb4Aup4nm8ZoX2Yvsxzud16+n3PgTb/u/wUjMQvet7HXQLpjL botwvWCRDJUVuLg0Fw/LdKa6qYh6c992i+F1sMHcmolYgnuMMuiTEoyB+LP0a6wDIbwk Nm+fD8XuYzD5yhIgqmkasiWjxY1hIIF8vhvCjd7UEmf3KV6hoGLmmw+iag1We8OCE4bs nM9gnkf4J22FaH6mICs/16iEac5YXUf9UChznBe2eEc98cQLkxSon1nsYl5vVJDrkR++ jQ1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Moe+k1e/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p23si1034422edw.241.2020.11.10.23.21.06; Tue, 10 Nov 2020 23:21:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Moe+k1e/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726427AbgKKHSD (ORCPT + 99 others); Wed, 11 Nov 2020 02:18:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49250 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726088AbgKKHPD (ORCPT ); Wed, 11 Nov 2020 02:15:03 -0500 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CFA8C061A4D for ; Tue, 10 Nov 2020 23:13:35 -0800 (PST) Received: by mail-pj1-x1042.google.com with SMTP id oc3so262188pjb.4 for ; Tue, 10 Nov 2020 23:13:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3ucoYIWnfXMR4kJEztjUb/NPRnfC3552OCLDYo5AMI8=; b=Moe+k1e/Htewp+me46McmHMhHJPPYtop4TdYtUM8uJvD5VtwOHDmsmrCLjF/ezdlTY eqirMv55x84ChIt2SfpbtA8f/q9WRr+cdi3ERdQhu3VyRvgMoZk9Enzi6K+ZssAxTfmp dzv9uWygkGl47jxciXU2SuQTtO0cfvJN4C5AxOPyyAQR2fxKB47W/ddCauFM71dqN7a/ 8yZlMwh1T0JyzIQP8u00Y7P02VdnYQU9r7DtCeMONFRYpxfrgspjvoCKJmI5msh+kCLd W8m3jVpNo7dOIJ8QJhlMKUA50938fo6OVjFt8TDWD3UH7rtVGVoMd7Tx+6QJzRsecc0s ftMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3ucoYIWnfXMR4kJEztjUb/NPRnfC3552OCLDYo5AMI8=; b=KqFXsMvsbk8VAWgEEHtp14UZQ6xRrWkCktra+C3wkGFyC1bjF7Zx5V9/OYV67Mxea6 +jQbw8yuj5hyEhN/ePD64Z67KNSAm33O1ZX6/sVxMMM8UX+50POJz9s5lHttiGkksOLN doXp+6ntoO6QpZG30KzsOqfBn9ibnuYNp6JPBpUtmqOHeV6Z8/nigDuDVJlKYei/PjwE GNLBEaHlutOeatRW2ZqbymiWiqK6GjoUlP/LHLfPsn/empALGXMxuD090h1ZXrrZIKsz v+uoiXa0skGUkPCyizUY8Pq7wy2K3BE6tUu7z7HFANbfDrqqJpEE/D4uUeacy2ixGWpL /j0Q== X-Gm-Message-State: AOAM532JsbtWg/gn4M8jOXkHh1C2M4+/Hq/wC6AG0ilSt3wYqeBQC86f 2ad9s4NfyNxmw7pQmTUjxbFTfw== X-Received: by 2002:a17:90b:1c0e:: with SMTP id oc14mr2562751pjb.142.1605078814575; Tue, 10 Nov 2020 23:13:34 -0800 (PST) Received: from localhost ([45.137.216.7]) by smtp.gmail.com with ESMTPSA id b80sm1342039pfb.40.2020.11.10.23.13.33 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Nov 2020 23:13:33 -0800 (PST) From: Leo Yan To: Arnaldo Carvalho de Melo , Andre Przywara , Dave Martin , James Clark , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Al Grant , Wei Li , John Garry , Will Deacon , Mathieu Poirier , linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v8 20/22] perf arm-spe: Add more sub classes for operation packet Date: Wed, 11 Nov 2020 15:11:47 +0800 Message-Id: <20201111071149.815-21-leo.yan@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201111071149.815-1-leo.yan@linaro.org> References: <20201111071149.815-1-leo.yan@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org For the operation type packet payload with load/store class, it misses to support these sub classes: - A load/store targeting the general-purpose registers; - A load/store targeting unspecified registers; - The ARMv8.4 nested virtualisation extension can redirect system register accesses to a memory page controlled by the hypervisor. The SPE profiling feature in newer implementations can tag those memory accesses accordingly. Add the bit pattern describing load/store sub classes, so that the perf tool can decode it properly. Inspired by Andre Przywara, refined the commit log and code for more clear description. Co-developed-by: Andre Przywara Signed-off-by: Leo Yan Reviewed-by: Andre Przywara --- .../util/arm-spe-decoder/arm-spe-pkt-decoder.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c b/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c index 5fe1c5e8094d..55c4bf330b96 100644 --- a/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c +++ b/tools/perf/util/arm-spe-decoder/arm-spe-pkt-decoder.c @@ -343,9 +343,23 @@ static int arm_spe_pkt_desc_op_type(const struct arm_spe_pkt *packet, arm_spe_pkt_snprintf(&err, &buf, &buf_len, " EXCL"); if (payload & SPE_OP_PKT_AR) arm_spe_pkt_snprintf(&err, &buf, &buf_len, " AR"); - } else if (SPE_OP_PKT_LDST_SUBCLASS_GET(payload) == - SPE_OP_PKT_LDST_SUBCLASS_SIMD_FP) { + } + + switch (SPE_OP_PKT_LDST_SUBCLASS_GET(payload)) { + case SPE_OP_PKT_LDST_SUBCLASS_SIMD_FP: arm_spe_pkt_snprintf(&err, &buf, &buf_len, " SIMD-FP"); + break; + case SPE_OP_PKT_LDST_SUBCLASS_GP_REG: + arm_spe_pkt_snprintf(&err, &buf, &buf_len, " GP-REG"); + break; + case SPE_OP_PKT_LDST_SUBCLASS_UNSPEC_REG: + arm_spe_pkt_snprintf(&err, &buf, &buf_len, " UNSPEC-REG"); + break; + case SPE_OP_PKT_LDST_SUBCLASS_NV_SYSREG: + arm_spe_pkt_snprintf(&err, &buf, &buf_len, " NV-SYSREG"); + break; + default: + break; } break; case SPE_OP_PKT_HDR_CLASS_BR_ERET: -- 2.17.1