Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp930627pxb; Thu, 5 Nov 2020 17:43:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVgX/VkqKcdb8y4NcMhCbpt9bhyUInBS3lhaHhWgxxXjU+x3fJN6eRAbW/HAj43FhuiQQP X-Received: by 2002:a17:906:7c4b:: with SMTP id g11mr5399914ejp.469.1604627025502; Thu, 05 Nov 2020 17:43:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604627025; cv=none; d=google.com; s=arc-20160816; b=IUcYDouNE0ceThfixopjbs8mzzL/yT5HTsj0ZHPDgbtL/bY3QwrowovU5IY68yfaPZ DxHtsuTlYx5IfKkHWayJeEBJZP19p0gN9QQmIST5tFsFwaTHfDp+9nDwdvlJLfWzB9Uo XFERAqInJWnyyfd/WdekELsvxs8An9kt20R3YbYf7kw/GrxX7yuItj6t/99Q86aooCxS hyOwS73rNOg0VMKQbOgJkzpFSYMwuG99axSZZpVSGNfcp7cO6P6bF9AttGFSwHyyMfq2 QhI9PyTLrLMeqIteTZBy3LKPCtlN5Wdb1j5hA5c8yN67bFPcj66bstqi1UY2XpBXL21t wTLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=sjQ2H9YOVTeVxNU5zD3a+u4W6ygBgt3MbjFKD0M5Cuc=; b=ppWIOZ9kS7AO9TjDBDbnB30N7StLyFImwbr9X9CT3dKAp05/RvivzW2YxTW0kXH6CQ 1gF8jhZye/G7V3xXhXITZ+29hSADP8pTivX7mBQUzbOh9lClDTEkYImprahFqNZr/JpF YkJ6hQ0UbRPddRHyvh903DR69l9GWumqmjVKDcAHEYyWXiWw7dvVtR50EQLDcYPWWyYZ WDOVyQhs/IR13ku8Y1oNLruRH1MjhuXz8Afi87n+ZR8GNhGO55DLbIr4WFd7/TU4m74L WZ2zKNRjyRwkvwTAtWp4X28Mv1VRjXCezeNRSaKxuM7WPBPdJeHS2fQ7Ma+L6YwtCXvd zL2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NuqI2DON; 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 e20si2722949edq.501.2020.11.05.17.43.22; Thu, 05 Nov 2020 17:43:45 -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=NuqI2DON; 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 S1732778AbgKFBmA (ORCPT + 99 others); Thu, 5 Nov 2020 20:42:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732746AbgKFBl7 (ORCPT ); Thu, 5 Nov 2020 20:41:59 -0500 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 330CFC0613CF for ; Thu, 5 Nov 2020 17:41:58 -0800 (PST) Received: by mail-pf1-x442.google.com with SMTP id y7so1792379pfq.11 for ; Thu, 05 Nov 2020 17:41:58 -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; bh=sjQ2H9YOVTeVxNU5zD3a+u4W6ygBgt3MbjFKD0M5Cuc=; b=NuqI2DONgBZIwLep997PRYKcf7OgJf4SN4aju9G4Cr2TAtbNxfissF8NvoxOSzIfzl ONMU4J6V38R+MaFMpoPPn0ifxHfc/AubROc2SML0WrzmMvN/KRr+Sgdkd5+ggZXRZm5i oaePGHMmBXONzhtU7zgFMQyEDeVDdfJQ9y/OkPhm4At6QgToD5MFTbRIllqO0rGNdChe bnvX6kDSpSb+86mz8AQmNfcvDF5dqcRkJFAw5ULUA9P0U5fFNSHhANwYO0N+sm4GRhft CZhJhlPElcB7/zZpFmtGTPPFNb3luuNQ50/3ob7j6N8fHMjTwACceN6hz7HvVZGg2puC 18Pg== 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; bh=sjQ2H9YOVTeVxNU5zD3a+u4W6ygBgt3MbjFKD0M5Cuc=; b=dy7S4sl6GUANQA2THW0O2BtAeR5WwlOV4gtVTrZk0wBPnZRk1FnJhsUBk8kFqpBAWI ZouwAIN9MmeAaKpQUILImgIInQ1Ol4JFd9ORdnM01PPk04p5NrXv/7ArAdkXh37FLym1 mPt08bPn+6ksaUEUrY2knilAKIPG2EsH0l9x/2iDrCjBQ14DvhtSadaKnUTgybbK34t8 uOImzbvss5WGzvVM3OoSj6ksY6kmIieKchIALTO203uesmiq8GfDVeTon+rZBeDF5X9c DL+vMzOa9Sru67ZArL412nNPHmgaoL4ZGu2H2Ii1Kk4CVANkepeLBlcm/oWYOophf0c7 bZ4w== X-Gm-Message-State: AOAM5326p9qbWv/1uUU9zjpY2BmpBMH4RB/bE5nj0UoWJP2eIyf7AqE8 svibIeVZW/ZjrFL72qBJvrLS/w== X-Received: by 2002:a63:4960:: with SMTP id y32mr4911405pgk.369.1604626917636; Thu, 05 Nov 2020 17:41:57 -0800 (PST) Received: from localhost ([2400:8904::f03c:91ff:fe8a:adf7]) by smtp.gmail.com with ESMTPSA id h5sm3476135pjs.41.2020.11.05.17.41.56 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Nov 2020 17:41:56 -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 , linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v7 00/22] perf arm-spe: Refactor decoding & dumping flow Date: Fri, 6 Nov 2020 09:41:14 +0800 Message-Id: <20201106014136.14103-1-leo.yan@linaro.org> X-Mailer: git-send-email 2.17.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is patch set v7 for refactoring Arm SPE trace decoding and dumping. It follows Dave's comment to consolidate the return value for arm_spe_pkt_desc(). This patch set is cleanly applied on the top of perf/core branch with commit 7b3bcedf5ee5 ("perf scripting python: Avoid declaring function pointers with a visibility attribute"). Have tested 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, didn't find issue with "diff" tool. 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