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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3A65AC4332F for ; Tue, 14 Dec 2021 13:28:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=BNqVM54rBGNLhswXKqbhQCGRTsCotZhj3ENv+GOHaaM=; b=Jrvj5yjHZzWRIc /jvbhK+pyJcO0Ib1FPKjMS8JUJBUXJFcSQsnt/RSHfUBWC79ahNXEpIJPxsjp0KLWv2Nn7oEYQ6Dk 7P2WyYqp8knvtniUMy8JEcLFG8UJ80Ke7bWbKGjAmUj3G80/R0ZLQBYt9G6UhqBW38l3ZdmtjPSQE 5/KeAI0epukdELk+/zPOGkx7wR3tk3yqx0dTYL57ctMmWFeavCETajNWpmbTeWdQYI7nl1Netgmj9 v2/vh4pqiVr5ednEEtuo8U/emzoCb/KDyBlax+aQ/h9jT0XkEJexiN0Nsws+Zy9cQcHn5Kt9RT1QN dfcUmUlpsXnLCg7XbR4A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mx7pR-00E9fH-Dr; Tue, 14 Dec 2021 13:26:49 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mx7pO-00E9eI-O2; Tue, 14 Dec 2021 13:26:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=vxz07dSiazO9HmdV8Hglnktlulvl/wG755OUImbhI/U=; b=lWWkVB+rYo29XpGER/PoG08562 HF5wzy8jTsjBDCNLiaqInGFaWWo3fQy0lKFhRFcjOztHxgwMh9JUn6MHnxZP+61FsVudowPyU3o/D ohwomxmnfCsluAmf59VCPxf/3SqAmXT3ZWsmGRfG90M6HUzzTP2JyrSEUnHPc6apyRap08PaqeqTu 4nOYVeW3vzt0ogqBoNBJ+521C+dqqubObvDi8G7aYjoElFf9JMcpADeOU+9G/xeB+0QjwlLH3O2PJ BT/jCMse9CFuHUzQ7nHzGPKLZvsO41jDGzp0SArqTo1ZJm4OI2644VDUErzt4LEZl8RoUNanoiVBc 8N8QU8XA==; Received: from [179.97.37.151] (helo=quaco.ghostprotocols.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mx7pM-00Djua-AD; Tue, 14 Dec 2021 13:26:45 +0000 Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 91DEF405D8; Tue, 14 Dec 2021 10:26:40 -0300 (-03) Date: Tue, 14 Dec 2021 10:26:40 -0300 From: Arnaldo Carvalho de Melo To: Athira Rajeev Cc: German Gomez , Linux Kernel Mailing List , linux-perf-users@vger.kernel.org, John Garry , Will Deacon , Mathieu Poirier , Leo Yan , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-riscv@lists.infradead.org Subject: Re: [PATCH v2 0/3] Support register names of all architectures Message-ID: References: <20211207180653.1147374-1-german.gomez@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Em Tue, Dec 14, 2021 at 02:20:26PM +0530, Athira Rajeev escreveu: > > > > On 07-Dec-2021, at 11:36 PM, German Gomez wrote: > > > > The following changeset applies some corrections to the way system > > registers are processed and presented when reading perf.data files using > > the various perf tools. > > > > The commit message from [3/3] shows how register names aren't correctly > > presented when performing x-arch analysis of perf.data files (recording > > in one arch, then reading the file from a different arch). > > > > - [PATCH 1/3] Fixes a potential out-of-bounds access when reading the > > values of the registers in the perf.data file. > > - [PATCH 2/3] Fixes an issue of ARM and ARM64 registers having the > > same enum name. > > - [PATCH 3/3] Refactors the function "perf_reg_name" declared in the > > "tools/perf/util/perf_regs.h" header, in order to support every arch. > > > > Thanks, > > German > > Looks good to me. Tested this patchset in powerpc by capturing regs in powerpc and doing > perf report to read the data from x86. > > Reviewed-and-Tested-by: Athira Rajeev Thanks, added to the commit log message. - Arnaldo > > -- > > Changes since v1 > > > > - Added "Reported-by" tags. > > - Removed [PATCH 2/4] because it's not needed (suggested by Athira > > Rajeev). > > - Removed [PATCH 3/4] which created additional header files with the > > register names of every arch. > > - Introduced [PATCH 2/3] to deal with ARM and ARM64 registers having the > > same enum name across "/tools/perf/". > > - Reworked the refactor of "perf_reg_name" function (now implemented in > > perf_regs.c, rather than in the header file) in [PATCH 3/3]. > > > > German Gomez (3): > > perf tools: Prevent out-of-bounds access to registers > > perf tools: Rename perf_event_arm_regs for ARM64 registers > > perf tools: Support register names from all archs > > > > tools/perf/arch/arm/include/perf_regs.h | 42 -- > > tools/perf/arch/arm64/include/perf_regs.h | 78 +- > > tools/perf/arch/csky/include/perf_regs.h | 82 --- > > tools/perf/arch/mips/include/perf_regs.h | 69 -- > > tools/perf/arch/powerpc/include/perf_regs.h | 66 -- > > tools/perf/arch/riscv/include/perf_regs.h | 74 -- > > tools/perf/arch/s390/include/perf_regs.h | 78 -- > > tools/perf/arch/x86/include/perf_regs.h | 82 --- > > tools/perf/builtin-script.c | 18 +- > > tools/perf/util/event.h | 5 +- > > tools/perf/util/libunwind/arm64.c | 2 + > > tools/perf/util/perf_regs.c | 671 +++++++++++++++++- > > tools/perf/util/perf_regs.h | 10 +- > > .../scripting-engines/trace-event-python.c | 10 +- > > tools/perf/util/session.c | 25 +- > > 15 files changed, 709 insertions(+), 603 deletions(-) > > > > -- > > 2.25.1 > > -- - Arnaldo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel