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=-12.4 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,URIBL_BLOCKED, 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 68336C4346E for ; Sun, 27 Sep 2020 03:32: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 EF79521531 for ; Sun, 27 Sep 2020 03:32:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="V2vJRXyE"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CE5Hv2JB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF79521531 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=mXuQ9y1LFV1ATG+VUmCHDUG/DuxWS0B+ZVlQ3tkxmt8=; b=V2vJRXyE7At/L51x/suRVTon9 BqENdFL2t1Ye8tW8k1JqLYJ6nHYjznsGKkxDkbp5lJZB8Q3zbzJWE6A+j7ZKKCBBBMfQUF6bEDSsN 8NcvNCJxZ+s1dIObHhmJfwYGeFdZAaNrFY0+PJW+D2DiInzPaKzhk2WbniIiK9dTNjyD9DpWyIMgg X7TT3QxgbOLm16pgnTq3pcPY27acoHDMgldtfzjRQ+0H8c7ul5bl145Ua4VzmIPkJg3+AF0cls7kV NSUd00nbQK8HLFL86QpnctXhNsU7zzldwN2W6vVYlLY9DdEUbxKai7vice9rT1L75QkDqoegSqfkw B2YPcoFdQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kMNOk-0004RY-19; Sun, 27 Sep 2020 03:30:50 +0000 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kMNOg-0004Qm-I3 for linux-arm-kernel@lists.infradead.org; Sun, 27 Sep 2020 03:30:48 +0000 Received: by mail-pf1-x443.google.com with SMTP id b124so6388367pfg.13 for ; Sat, 26 Sep 2020 20:30:45 -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=3K1i/39gs/1aIs4bF2Mo38xKHGoVp+y8wUqaA4xOLDk=; b=CE5Hv2JBdLDwVG1wWdgfaq4I825/wpS9dQECV5O/hpikSp+Xzxd+LsAodLz0MYy0vc xLX6300XzXEMvVsVEGW40LLnataiEzcaY98n/FTwScXmCxJSB3cOD8P7nypVDZXuTbpt IMGSyn5xD65d1apDeZRc7SG2ReNCEtkER325hKh1QnP63COWCjRQ0684qqvP/Lqu3R4K Qwzw50q2G0IXXGBzhYZ64k56PoGP8Tqb9pnJH3szw1gRaLFNtJP7gBaxFg831/zk5hUZ 7WG8vzStUCgy6I1Y9oKKwGFF/7goYWcNPJ7nIlQ+HFMr6jxNFjRowFHFQPy093qfPxT1 l1Rg== 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=3K1i/39gs/1aIs4bF2Mo38xKHGoVp+y8wUqaA4xOLDk=; b=ujAjkeZ4tSDv4DXo0DhDr0/Iw4Uag0XcBG7iOKW+5olddT1K+9AYyNkIFxKdDo063m u3N3mNk8S3c1507UvU5wZiKfcIkyIdn9GjpqcUgohs3Lt+F3/91tgUwoOYCmsSCpdfbN AIXF4BOEyV2qcrx+sx1s15BOP80cYRvxE4jMKsuHuAYeevFhSd3gNfyhJ8UWgLH462nt ToCB/BT0DCt6ldQ9mUJAqBRAIqG0QQV+mKZ/NpYXmw0mLATh0KvF5bjNlLuP6L3wttLP J4hXb7TMsO4zhtnFDu40kYuig/YKogLeNvR2nWpXN2NoqaKX7QniwyfWBkhvzIgAoB/s irAg== X-Gm-Message-State: AOAM5334HVact51TjcWYOEtoMhGWiQbE1yD5qIyyHEj5OlNjRmMN+1PH T4PWvJuxcbI1Emlx9yc9+uJ7hg== X-Google-Smtp-Source: ABdhPJxVsMoz6p3mpIexGgYww17zE4ZhFd9E1yos95NmZo1H5jUPUoG2nh2EbV4KWGDB44FFwz05uA== X-Received: by 2002:a63:1644:: with SMTP id 4mr4654361pgw.232.1601177444268; Sat, 26 Sep 2020 20:30:44 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([2600:3c01::f03c:91ff:fe8a:bb03]) by smtp.gmail.com with ESMTPSA id w14sm6505117pfu.87.2020.09.26.20.30.39 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 26 Sep 2020 20:30:43 -0700 (PDT) Date: Sun, 27 Sep 2020 11:30:35 +0800 From: Leo Yan To: Andre Przywara Subject: Re: [PATCH 5/5] perf: arm_spe: Decode SVE events Message-ID: <20200927033035.GE9677@leoy-ThinkPad-X240s> References: <20200922101225.183554-1-andre.przywara@arm.com> <20200922101225.183554-6-andre.przywara@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200922101225.183554-6-andre.przywara@arm.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-20200926_233046_911189_DF49E532 X-CRM114-Status: GOOD ( 26.57 ) 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 , Suzuki K Poulose , Peter Zijlstra , Catalin Marinas , Jiri Olsa , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo , Alexander Shishkin , Ingo Molnar , James Clark , Namhyung Kim , Will Deacon , Tan Xiaojun , 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 Andre, On Tue, Sep 22, 2020 at 11:12:25AM +0100, Andre Przywara wrote: > The Scalable Vector Extension (SVE) is an ARMv8 architecture extension > that introduces very long vector operations (up to 2048 bits). > The SPE profiling feature can tag SVE instructions with additional > properties like predication or the effective vector length. > > Decode the new operation type bits in the SPE decoder to allow the perf > tool to correctly report about SVE instructions. > > Signed-off-by: Andre Przywara > --- > .../arm-spe-decoder/arm-spe-pkt-decoder.c | 48 ++++++++++++++++++- > 1 file changed, 47 insertions(+), 1 deletion(-) > > 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 a033f34846a6..f0c369259554 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 > @@ -372,8 +372,35 @@ 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 ? > + case 0: { > + size_t blen = buf_len; > + > + if ((payload & 0x89) == 0x08) { > + ret = snprintf(buf, buf_len, "SVE"); > + buf += ret; > + blen -= ret; > + if (payload & 0x2) > + ret = snprintf(buf, buf_len, " FP"); > + else > + ret = snprintf(buf, buf_len, " INT"); > + buf += ret; > + blen -= ret; > + if (payload & 0x4) { > + ret = snprintf(buf, buf_len, " PRED"); > + buf += ret; > + blen -= ret; > + } > + /* Bits [7..4] encode the vector length */ > + ret = snprintf(buf, buf_len, " EVLEN%d", > + 32 << ((payload >> 4) & 0x7)); > + buf += ret; > + blen -= ret; > + return buf_len - blen; > + } > + > + return snprintf(buf, buf_len, "%s", payload & 0x1 ? > "COND-SELECT" : "INSN-OTHER"); > + } > case 1: { > size_t blen = buf_len; > > @@ -403,6 +430,25 @@ int arm_spe_pkt_desc(const struct arm_spe_pkt *packet, char *buf, > ret = snprintf(buf, buf_len, " NV-SYSREG"); > buf += ret; > blen -= ret; > + } else if ((payload & 0x0a) == 0x08) { > + ret = snprintf(buf, buf_len, " SVE"); > + buf += ret; > + blen -= ret; > + if (payload & 0x4) { > + ret = snprintf(buf, buf_len, " PRED"); > + buf += ret; > + blen -= ret; > + } > + if (payload & 0x80) { > + ret = snprintf(buf, buf_len, " SG"); > + buf += ret; > + blen -= ret; > + } > + /* Bits [7..4] encode the vector length */ > + ret = snprintf(buf, buf_len, " EVLEN%d", > + 32 << ((payload >> 4) & 0x7)); > + buf += ret; > + blen -= ret; The changes in this patch has been included in the patch [1]. So my summary for patches 02 ~ 05, except patch 04, other changes has been included in the patch set "perf arm-spe: Refactor decoding & dumping flow". I'd like to add your patch 04 into the patch set "perf arm-spe: Refactor decoding & dumping flow" and I will respin the patch set v2 on the latest perf/core branch and send out to review. For patch 01, you could continue to try to land it in the kernel. (Maybe consolidate a bit with Wei?). Do you think this is okay for you? Thanks, Leo [1] https://lore.kernel.org/patchwork/patch/1288413/ > } else if (payload & 0x4) { > ret = snprintf(buf, buf_len, " SIMD-FP"); > buf += ret; > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel