From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8037C433E1 for ; Mon, 17 Aug 2020 15:06:26 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7051204EC for ; Mon, 17 Aug 2020 15:06:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oOZKYae4"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="KWxoyMUO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7051204EC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=akXy4rXCC7CrCbB15huQGV6bwbfalD45qplbRZ4jWjs=; b=oOZKYae4+rNOIMPmSDhbDcvfi QRe4v59nPgBeKjWneGV0NpdwL6Grss2t7JNAeiLQI9PJRl05sa4UXr9cl8eCgqD1upKRP9ACAHouQ 7mo5OMbAciaVnC4GJSslTTFCcTKkW/uN/bujA6MnivIWtwlY11bL8c71GP2AA90Pq2/IWcsGiBbVf 1Fhxd9D2nduu+TJYiI/gKGt/JOvNH9bMeUYaFZ/XyWI4yf7ksYOeJFmRuggMk8fzONclYbrY+6VFJ 4YaVaQyoDmp9plmrs5ZngWh/fygtkBKfZ5I93SmNXiHUrOAoQ6XotevaSNjgMyp5NNf7VBqIeY86L qj9XLvfQw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7gh3-0002eK-3N; Mon, 17 Aug 2020 15:05:01 +0000 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k7gh0-0002dQ-Ig for linux-arm-kernel@lists.infradead.org; Mon, 17 Aug 2020 15:04:59 +0000 Received: by mail-pj1-x1043.google.com with SMTP id l60so7956875pjb.3 for ; Mon, 17 Aug 2020 08:04:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=UaBLznpKDizTNge1awPErBrIaArrL3hCJFbh4AaJehU=; b=KWxoyMUOnwQx5kHVtG+SdXctCilm+x7Xq2sJZFbvuIJG5UKFULhqkRWg0gA+zOQplX DCfi/4EcxZASN/ENMwBPcVlUZ1BwbFKODvKErpRQ+Bfs44HoRclZU/VfoSvt0likvxT5 52JpgEth/2YyqABO8XqP5qdxrpapoOj3siisL5gdhuhEEL72clmMIxOBlKkh+TxQgJH0 dolAJWq5O61xSNxRgb4cQQ2VYIZ1uUf2ilSXz7Mx9qwoFmzzM1Sn64O0R0CV5EmMhRqS h7XPOzpG5Q+7GdsBSsBXh7hY07ehLqtgxgvmJSBC5IlzZHj1Be5+h0QCQX2vNPDbZ8eP WVEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=UaBLznpKDizTNge1awPErBrIaArrL3hCJFbh4AaJehU=; b=VScNWle6aliJhfUi8zaYhiYmCDC+KWdO8QW3zaUQXPbnMTuGc8zWtIHIlZkmyb8AWT 75R6FqpdfQpGPzgpKuKLGj/DzdSxa25mKtjLacm03WZFL3jquprJpx2KWIWsWqQRksrC gLZQm9roxhI2tZyurIdBqXdovbGJKfFAYyO+aMYkygeUnsf2z79WYF6ga0xjp1oS2I+g 4Emw2e6dZF1wuQBnj0t0VMt+JMpTSlmt5aKkijyOFRyH+IWKLVOWdaN1lyCAd5UXn9r0 2/MHA82+5D/wuql5cAgPN8GuGDO6djgtlddKE3ICkcYtRUr9P6xWCf7jjojvhyOUEqYV vF5w== X-Gm-Message-State: AOAM531C4WcIVV9s7mgtrK/qCXBuXMOl2MXnga12GskTeH5eLWvP+/CT x8AZHgwYAbZyKJU1cj6C8D5z+A== X-Google-Smtp-Source: ABdhPJze8Z66pqu3BzApDswHS9kV1EI/PpT+KyHOZ5POINjJegP+j4aXuLJ7/ZEvXGJxsHmRIILDaw== X-Received: by 2002:a17:90a:6f85:: with SMTP id e5mr12732312pjk.128.1597676696150; Mon, 17 Aug 2020 08:04:56 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([2600:3c01::f03c:91ff:fe8a:bb03]) by smtp.gmail.com with ESMTPSA id 30sm18184680pjz.24.2020.08.17.08.04.48 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Aug 2020 08:04:55 -0700 (PDT) Date: Mon, 17 Aug 2020 23:04:44 +0800 From: Leo Yan To: Wei Li Subject: Re: [PATCH 2/4] perf: arm-spe: Add support for ARMv8.3-SPE Message-ID: <20200817150444.GA7927@leoy-ThinkPad-X240s> References: <20200724091607.41903-1-liwei391@huawei.com> <20200724091607.41903-3-liwei391@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200724091607.41903-3-liwei391@huawei.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200817_110458_632643_1E73B198 X-CRM114-Status: GOOD ( 25.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Will Deacon , Suzuki K Poulose , Alexander Shishkin , Catalin Marinas , Adrian Hunter , Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, zhangshaokun@hisilicon.com, Peter Zijlstra , Ingo Molnar , James Clark , guohanjun@huawei.com, Namhyung Kim , Jiri Olsa , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Wei, On Fri, Jul 24, 2020 at 05:16:05PM +0800, Wei Li wrote: > Armv8.3 extends the SPE by adding: > - Alignment field in the Events packet, and filtering on this event > using PMSEVFR_EL1. > - Support for the Scalable Vector Extension (SVE). > > The main additions for SVE are: > - Recording the vector length for SVE operations in the Operation Type > packet. It is not possible to filter on vector length. > - Incomplete predicate and empty predicate fields in the Events packet, > and filtering on these events using PMSEVFR_EL1. > > Add the corresponding decode process of Events packet and Operation Type > packet in perf tool. Since I am refactoring the Arm SPE decoding and dumping flows, based on new introduce macro definitions for packet format, I also improved your this patch and combined it into the refactoring patch set, hope this is okay for you. Please review the updated patch: https://lore.kernel.org/patchwork/patch/1288413/ Thanks, Leo > Signed-off-by: Wei Li > --- > .../arm-spe-decoder/arm-spe-pkt-decoder.c | 69 ++++++++++++++++++- > 1 file changed, 67 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 b94001b756c7..10a3692839de 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 > @@ -347,6 +347,24 @@ int arm_spe_pkt_desc(const struct arm_spe_pkt *packet, char *buf, > blen -= ret; > } > } > + if (idx > 2) { > + if (payload & 0x800) { > + ret = snprintf(buf, buf_len, " ALIGNMENT"); > + buf += ret; > + blen -= ret; > + } > + if (payload & 0x20000) { > + ret = snprintf(buf, buf_len, " SVE-PRED-PARTIAL"); > + buf += ret; > + blen -= ret; > + } > + if (payload & 0x40000) { > + ret = snprintf(buf, buf_len, " SVE-PRED-EMPTY"); > + buf += ret; > + blen -= ret; > + } > + } > + > if (ret < 0) > return ret; > blen -= ret; > @@ -354,8 +372,38 @@ int arm_spe_pkt_desc(const struct arm_spe_pkt *packet, char *buf, > } > case ARM_SPE_OP_TYPE: > switch (idx) { > - case 0: return snprintf(buf, buf_len, "%s", payload & 0x1 ? > - "COND-SELECT" : "INSN-OTHER"); > + case 0: { > + if (payload & 0x8) { > + size_t blen = buf_len; > + > + ret = snprintf(buf, buf_len, "SVE-OTHER"); > + buf += ret; > + blen -= ret; > + if (payload & 0x2) { > + ret = snprintf(buf, buf_len, " FP"); > + buf += ret; > + blen -= ret; > + } > + if (payload & 0x4) { > + ret = snprintf(buf, buf_len, " PRED"); > + buf += ret; > + blen -= ret; > + } > + if (payload & 0x70) { > + ret = snprintf(buf, buf_len, " EVL %d", > + 32 << ((payload & 0x70) >> 4)); > + buf += ret; > + blen -= ret; > + } > + if (ret < 0) > + return ret; > + blen -= ret; > + return buf_len - blen; > + } else { > + return snprintf(buf, buf_len, "%s", payload & 0x1 ? > + "COND-SELECT" : "INSN-OTHER"); > + } > + } > case 1: { > size_t blen = buf_len; > > @@ -385,6 +433,23 @@ int arm_spe_pkt_desc(const struct arm_spe_pkt *packet, char *buf, > ret = snprintf(buf, buf_len, " SIMD-FP"); > buf += ret; > blen -= ret; > + } else if (payload & 0x8) { > + if (payload & 0x4) { > + ret = snprintf(buf, buf_len, " PRED"); > + buf += ret; > + blen -= ret; > + } > + if (payload & 0x70) { > + ret = snprintf(buf, buf_len, " EVL %d", > + 32 << ((payload & 0x70) >> 4)); > + buf += ret; > + blen -= ret; > + } > + if (payload & 0x80) { > + ret = snprintf(buf, buf_len, " SG"); > + buf += ret; > + blen -= ret; > + } > } > if (ret < 0) > return ret; > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel