Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp473174pxb; Wed, 11 Nov 2020 08:13:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHPtL3pRFl1NuFd7uiTz/I+LVAn2IiGvuEp2J/GJXkCK72Kxf5g8P3akHQ6T6tdn7Vb/7T X-Received: by 2002:a05:6402:150d:: with SMTP id f13mr122420edw.119.1605111202451; Wed, 11 Nov 2020 08:13:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605111202; cv=none; d=google.com; s=arc-20160816; b=LLD9P3ECFYsz5dozDchM9SbcrSzcS0XShQFFw77r3TTWAwnlsnmg0Oz/48BlvICGH/ jWd0I+YuGD4YPfDlBqqAKk+xA9Ft4z72xlLwTXsN+LkimcInLpkJH4KLVBwfM7hpaZHy zneYJu85mV1KKWs3yEw0AdCVZHVDhv587m+7aIx+iAPfjOUy+p8o8XgFrM5lA+JuHqA3 7TGYd4ZWfHkCXxk3WMBdzDYMRU4rA/eWvzkM7Hc4896ynIbK/oF3+zScoFEWEzRlIind IuFIz/SZDk/ufTd6f+QTupkqGy2ERgwOWr6hR+5t8cWcFVa9BB0NLDReW46jHXjWQ8+T tYSg== 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=rqALC5YQlfE3nyv3ae+oK+/N2s6xMuutEt9J3syj8ns=; b=FUkmmeV4wGuU5r9nCrt2NSvxHJPLMTQ4VcH/MwVjRaVVCp+zYERn0rCZi82ORxbntL h7h3/74D+482qWEtmHqU0sD3umu7bw3Prr2Snpqq2nxkmZqcazWTwe10W19IweVFXHZm vPJxuBaDe6IKbbXd7AvmNyR83RjsdW2cTEwGIgmc2DMq0tY2T98GmKGavpIAVzCd4x1q lk4pJUgJKK6fM+TWY5I+xLF3vX4Ymy49vJ5m9B3HdzZAV1SjrZ8nYg3Uj7Ozx12T4niK EHbmXFxSDxKmGuIV9bA1B4wrn8Rk+pGAwChOCTPl0bWNNUwcNjYqzKggpoTsNaTBO/im qYuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0KSzrLC1; 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 o5si1869034edz.444.2020.11.11.08.12.59; Wed, 11 Nov 2020 08:13:22 -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=@kernel.org header.s=default header.b=0KSzrLC1; 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 S1726736AbgKKQKz (ORCPT + 99 others); Wed, 11 Nov 2020 11:10:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:48956 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725966AbgKKQKz (ORCPT ); Wed, 11 Nov 2020 11:10:55 -0500 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 858E0206A1; Wed, 11 Nov 2020 16:10:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605111054; bh=B8emSrl5cDEqUKAszZCD2s041YBsX8RrpoCViT/4R0c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0KSzrLC19c+McysSPs1fu5TTNA+rf9kFWLw4PPbrMr1/Q+2988f+ygQ3IJs8HyHqL YfF/AyQ0v+dFRdEAEJFyZwdyD4MDxd2N3O9R70MkJJmtK3yTEPUSDiRMznXHjjOYCf ScMBh6i3ywCBdD4XVoRrDrsIlWBt1XM6IEYYgEvQ= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 42466411D1; Wed, 11 Nov 2020 13:10:51 -0300 (-03) Date: Wed, 11 Nov 2020 13:10:51 -0300 From: Arnaldo Carvalho de Melo To: Leo Yan Cc: 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 Subject: Re: [PATCH v8 00/22] perf arm-spe: Refactor decoding & dumping flow Message-ID: <20201111161051.GH355344@kernel.org> References: <20201111071149.815-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201111071149.815-1-leo.yan@linaro.org> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Nov 11, 2020 at 03:11:27PM +0800, Leo Yan escreveu: > This is patch set v8 for refactoring Arm SPE trace decoding and dumping. > > This version addresses Andre's comment to pass parameter '&buf_len' at > the last call arm_spe_pkt_snprintf() in the function arm_spe_pkt_desc(). > > This patch set is cleanly applied on the top of perf/core branch > with commit 644bf4b0f7ac ("perf jevents: Add test for arch std events"). > > I retested this patch set on Hisilicon D06 platform with commands > "perf report -D" and "perf script", compared the decoding results > between with this patch set and without this patch set, "diff" tool > shows the result as expected. With the patches I applied I'm getting: util/arm-spe-decoder/arm-spe-pkt-decoder.c: In function 'arm_spe_pkt_desc': util/arm-spe-decoder/arm-spe-pkt-decoder.c:410:3: error: left shift count >= width of type [-Werror] case 1: ns = !!(packet->payload & NS_FLAG); ^ util/arm-spe-decoder/arm-spe-pkt-decoder.c:411:4: error: left shift count >= width of type [-Werror] el = (packet->payload & EL_FLAG) >> 61; ^ util/arm-spe-decoder/arm-spe-pkt-decoder.c:411:4: error: left shift count >= width of type [-Werror] util/arm-spe-decoder/arm-spe-pkt-decoder.c:416:3: error: left shift count >= width of type [-Werror] case 3: ns = !!(packet->payload & NS_FLAG); ^ CC /tmp/build/perf/util/arm-spe-decoder/arm-spe-decoder.o On: 16 11.70 android-ndk:r12b-arm : FAIL arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease) 17 11.32 android-ndk:r15c-arm : FAIL arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease) That were building ok before, builds still under way, perhaps its just on these old systems... - Arnaldo > Changes from v7: > - Changed to pass '&buf_len' for the last call arm_spe_pkt_snprintf() in > the patch 07/22 (Andre). > > Changes from v6: > - Removed the redundant comma from the string in the patch 21/22 "perf > arm_spe: Decode memory tagging properties" (Dave); > - Refined the return value for arm_spe_pkt_desc(): returns 0 for > success, otherwise returns non zero for failures; handle error code at > the end of function arm_spe_pkt_desc(); this is accomplished in the > new patch 07/22 "perf arm-spe: Consolidate arm_spe_pkt_desc()'s > return value" (Dave). > > Changes from v5: > - Directly bail out arm_spe_pkt_snprintf() if any error occurred > (Andre). > > Changes from v4: > - Implemented a cumulative error for arm_spe_pkt_snprintf() and changed > to condense code for printing strings (Dave); > - Changed to check payload bits [55:52] for parse kernel address > (Andre). > > Changes from v3: > - Refined arm_spe_payload_len() and removed macro SPE_HEADER_SZ() > (Andre); > - Refined packet header index macros (Andre); > - Added patch "perf arm_spe: Fixup top byte for data virtual address" to > fixup the data virtual address for 64KB pages and refined comments for > the fixup (Andre); > - Added Andre's review tag (using "b4 am" command); > - Changed the macros to SPE_PKT_IS_XXX() format to check operation types > (Andre). > > > Andre Przywara (1): > perf arm_spe: Decode memory tagging properties > > Leo Yan (20): > perf arm-spe: Include bitops.h for BIT() macro > perf arm-spe: Fix a typo in comment > perf arm-spe: Refactor payload size calculation > perf arm-spe: Refactor arm_spe_get_events() > perf arm-spe: Fix packet length handling > perf arm-spe: Refactor printing string to buffer > perf arm-spe: Consolidate arm_spe_pkt_desc()'s return value > perf arm-spe: Refactor packet header parsing > perf arm-spe: Add new function arm_spe_pkt_desc_addr() > perf arm-spe: Refactor address packet handling > perf arm_spe: Fixup top byte for data virtual address > perf arm-spe: Refactor context packet handling > perf arm-spe: Add new function arm_spe_pkt_desc_counter() > perf arm-spe: Refactor counter packet handling > perf arm-spe: Add new function arm_spe_pkt_desc_event() > perf arm-spe: Refactor event type handling > perf arm-spe: Remove size condition checking for events > perf arm-spe: Add new function arm_spe_pkt_desc_op_type() > 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 | 59 +- > .../util/arm-spe-decoder/arm-spe-decoder.h | 17 - > .../arm-spe-decoder/arm-spe-pkt-decoder.c | 601 ++++++++++-------- > .../arm-spe-decoder/arm-spe-pkt-decoder.h | 122 +++- > tools/perf/util/arm-spe.c | 2 +- > 5 files changed, 479 insertions(+), 322 deletions(-) > > -- > 2.17.1 > -- - Arnaldo