Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4929941pxu; Tue, 13 Oct 2020 10:21:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaqlarVep+yrM6ngkwJ+iZMMH+znk+knRV4ejY8ndklh0/CEZWnMDUuUYAerBR6wmpU4r5 X-Received: by 2002:a17:906:b88f:: with SMTP id hb15mr797341ejb.45.1602609677715; Tue, 13 Oct 2020 10:21:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602609677; cv=none; d=google.com; s=arc-20160816; b=mPUYaz6HqXLdMHCeyCttxw2vT2kGMnjtLhNdLRtdntrhzmAf/9m1fu8tLDbFXL7xv9 0TGl8gbjy14f0i9Z8c0R3XwzyULP70rXPXpv52kSWEou5t+KlAnko2lO0qFmyFwnq4ez FlBkxMw+NXkv0d53zq6VKaum3VxzEuUML6mzgL0qj8jHsXSHhDzHfU0sESM4rTXeHT1G fCOV5FTdmhQgNsUUGPaAGk1LTnm/hWr70Zj0Lvh2azk00k3FXsvHmLyNRGpbtqicISYa 8thQPQTtOXuejbUGW6wP7I+SkpL0nKB1RN94iHmxT+vTOiVvmYJ9dQYrGvF5SVRDoWJK rcwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=97iholkOTA4PfdJqNKEL7tNiOZLtwoButk+dnFIBYlo=; b=XyhaOYywMI0ljwjSezpSJgy4of6iQr09SBslfAkeWIX3bMxLRMdMLIYOF5RAhrkYWJ F3S8mOn165Laj6WF/M2ZQTKw0a160jK4RBimBI6rCXcbuKuVpeGnXXkQTsW+8HK/mkNw P/z9pUUUpRV0YMM58/9WOAbIuitG41aPBBkyzlheK6QoPfslqafWfe3AA3EUOCLQlI3i LNofY7290O6WHe7gorZeW5b9QaAIVYnnp6gS5O38FkqvnYYFsc9nxvAjRaq0EtBLmyWw MBSb1AgNnlOY1SRmGeb5dqaiPCCSWHguYAZXeCMzMVX6tZJS4v/OskY/wnBZbs9+HyCy FgiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=1rXg93Wr; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a18si222207edr.396.2020.10.13.10.20.55; Tue, 13 Oct 2020 10:21:17 -0700 (PDT) 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=@kernel.org header.s=default header.b=1rXg93Wr; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730649AbgJMOxf (ORCPT + 99 others); Tue, 13 Oct 2020 10:53:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:46758 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730236AbgJMOxf (ORCPT ); Tue, 13 Oct 2020 10:53:35 -0400 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 087AE2489C; Tue, 13 Oct 2020 14:53:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602600814; bh=deMf+UyiVh07dVCA51wXAWNWae5FM0SoGd9A67zB4ug=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=1rXg93Wr67Lyf+KSoJQWVW8rz4UfIQsKlyhKRLvsTxqOIBtTqug6vCaPlxuccIQAK fiyYAybDxhgBdpqJdKPSZ0qC/RhM85f5v8sM1T1r7Qm1Q9wywJSkRTQcMnAbpoRl6i nATMoQtLX616HUMIxTCduUz1uWBsJ5fytQ3blztM= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 19F074047F; Tue, 13 Oct 2020 11:53:32 -0300 (-03) Date: Tue, 13 Oct 2020 11:53:32 -0300 From: Arnaldo Carvalho de Melo To: Leo Yan Cc: Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Wei Li , James Clark , Andre Przywara , Dave Martin , linux-kernel@vger.kernel.org, Al Grant Subject: Re: [PATCH v2 00/14] perf arm-spe: Refactor decoding & dumping flow Message-ID: <20201013145332.GG1063281@kernel.org> References: <20200929133917.9224-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200929133917.9224-1-leo.yan@linaro.org> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Tue, Sep 29, 2020 at 02:39:03PM +0100, Leo Yan escreveu: > The prominent issue for the SPE trace decoding and dumping is the packet > header and payload values are hard coded with numbers and it's not > readable and difficult to maintain; and has other minor issues, e.g. the > packet length (header + payload) calculation is not correct for some > packet types, and the dumping flow misses to support specific sub > classes for operation packet, etc. > > So this patch set is to refactor the Arm SPE decoding SPE with: > - Patches 01, 02 are minor cleans up; > - Patches 03, 04 are used to fix and polish the packet and payload > length calculation; > - Patch 05 is to add a helper to wrap up printing strings, this can > avoid bunch of duplicate code lines; > - Patches 06 ~ 12 are used to refactor decoding for different types > packet one by one (address packet, context packet, counter packet, > event packet, operation packet); > - Patch 13 is coming from Andre to dump memory tagging; > - Patch 14 is coming from Wei Li to add decoding for ARMv8.3 > extension, in this version it has been improved to use defined > macros, also is improved for failure handling and commit log. > > This patch set is cleanly applied on the top of perf/core branch > with commit a55b7bb1c146 ("perf test: Fix msan uninitialized use."), > and the patches have been verified on Hisilicon D06 platform and I > manually inspected the dumping result. > > Changes from v1: > - Heavily rewrote the patch 05 for refactoring printing strings; this > is fundamental change, so adjusted the sequence for patches and moved > the printing string patch ahead from patch 10 (v1) to patch 05; > - Changed to use GENMASK_ULL() for bits mask; > - Added Andre's patch 13 for dumping memory tagging; > - Refined patch 12 for adding sub classes for Operation packet, merged > some commit log from Andre's patch, which allows commit log and code > to be more clear; Added "Co-developed-by: Andre Przywara" tag to > reflect this. Ok, so I'll wait for v3, as Leo indicated he'll respin. Thanks, - Arnaldo > > Andre Przywara (1): > perf arm_spe: Decode memory tagging properties > > Leo Yan (12): > perf arm-spe: Include bitops.h for BIT() macro > perf arm-spe: Fix a typo in comment > perf arm-spe: Refactor payload length calculation > perf arm-spe: Fix packet length handling > perf arm-spe: Refactor printing string to buffer > perf arm-spe: Refactor packet header parsing > perf arm-spe: Refactor address packet handling > perf arm-spe: Refactor context packet handling > perf arm-spe: Refactor counter packet handling > perf arm-spe: Refactor event type handling > perf arm-spe: Refactor operation packet handling > perf arm-spe: Add more sub classes for operation packet > > Wei Li (1): > perf arm-spe: Add support for ARMv8.3-SPE > > .../util/arm-spe-decoder/arm-spe-decoder.c | 54 +- > .../util/arm-spe-decoder/arm-spe-decoder.h | 17 - > .../arm-spe-decoder/arm-spe-pkt-decoder.c | 567 +++++++++++------- > .../arm-spe-decoder/arm-spe-pkt-decoder.h | 124 +++- > 4 files changed, 478 insertions(+), 284 deletions(-) > > -- > 2.20.1 > -- - Arnaldo