From patchwork Wed Aug 28 05:09:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Clevenger X-Patchwork-Id: 13780571 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 59015C5472D for ; Wed, 28 Aug 2024 05:14:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=inrivzrO2TQ3fiHjUu/vhMGnzDUZat+IEmtcKkCXFF0=; b=E9OYmqkeGMv5H5yUlU5v9wt+WZ NNe/zG/sfeyhaJDK2TDqiG+WZa4ZDyomr86wnPS5Ws9ifhLF3n0rhDg/tBCUPbv/f7X+ZHkO8LpJ2 +3bbU1Q+FudtaPxaMxs9qaiHNZ01a31jexrV+vN+Ps59cbug9fyB45iYprNAOvX1pWhiI+V0xRBzS K6cM8yns+ceiLnJEjltJ+d3ncTDXDpoKbyu1XQEyfdJ3KkBZsz0IACSYEDvcBXjdCSvjDtH+R1Whm oUdA1yrIYvaA8GVYHBDbD/H0YMq1jKHyYlcJ7dV61ACdzCv4LEguszM+87muQUBXWJYHwxCia4qU/ pjnjeqRQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjB0q-0000000DssF-0XY9; Wed, 28 Aug 2024 05:14:32 +0000 Received: from mail-northcentralusazlp170100001.outbound.protection.outlook.com ([2a01:111:f403:c105::1] helo=CH1PR05CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjAwa-0000000DrsB-0w3F for linux-arm-kernel@lists.infradead.org; Wed, 28 Aug 2024 05:10:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pEtPPlO00jSrRRxM1OW3SCCqdIz8ucyQfrYq7Nz2pM6vehwYECGjz3wAEOY3KYg9zXyv0RQvHw58h52SRceaODq/oBKEVYrtG5UJuatRpkuKrV2N4dcUQ6V7VPi8BaJsmPfoDOhIsZvetD8DdqLe2mCI+FJjVYFWX6SUeWPdJYuSbn0GK7AZx7PAM4F649Twg6Sm+pQWn5Wf4Fl6YW2Fr/20A8vkxeUksKnQE5bLYS7bw+JBJ8qjr77C/GnyWDKA0un5TLQfhKTKCcWrjdubjydFrp2sqX3Ta8sq8JAwTHzKusRWCaUuquLj2zFc0VFGnIE4V+AVyLur0fjgMM7WmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=inrivzrO2TQ3fiHjUu/vhMGnzDUZat+IEmtcKkCXFF0=; b=GC8myhrEKIfPOo8/wsxnRbWgDVO5rkBuh3z5nf2Hr0QE36f3+PFtwbwRwImo/BTmOE7ytFfDyLczvi1Hgr0viu+tAKwR74WzaNDfiXywouhA+IIlwcg4qdh3g26ieQGon8EVpQk4CyTUGqGTDLSgOrX0tDKX4ZH47am9hEEG55hSJCdaVRDCF/qr6FntXoSAPZZrXo5Gnn02TRR4wnbWE+RDSYfChGElEaOzZDCnhTGl1uKZ6/Q7G2+A/jP6CFbTsdm7JEAQw/uAgLR1+498kGniy1qhod+yNOFlIDLuVxwkOvmEZgxDBNRon888DsthCG5tzo2BaNrpEvLvxtVAXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=os.amperecomputing.com; dmarc=pass action=none header.from=os.amperecomputing.com; dkim=pass header.d=os.amperecomputing.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=os.amperecomputing.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=inrivzrO2TQ3fiHjUu/vhMGnzDUZat+IEmtcKkCXFF0=; b=RPqOSoI0auwMCnA3acgZmHi3JdKf3AlrgwFjLnSbL23qz2w67xDs2rVKQZk7wsej1kFPorQRzqIxcCO39qxbgqrc7IMeNzFB6OEzxA+tpsWHNHoX2lGMkqABmbQmjs0YmB/asHYsR0kAgr0oD9IKluEYgVik8bX5rxxrQAQGqEU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=os.amperecomputing.com; Received: from PH7PR01MB8146.prod.exchangelabs.com (2603:10b6:510:2bd::18) by SA0PR01MB6506.prod.exchangelabs.com (2603:10b6:806:eb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.25; Wed, 28 Aug 2024 05:10:03 +0000 Received: from PH7PR01MB8146.prod.exchangelabs.com ([fe80::2972:642:93d1:e9d4]) by PH7PR01MB8146.prod.exchangelabs.com ([fe80::2972:642:93d1:e9d4%4]) with mapi id 15.20.7897.027; Wed, 28 Aug 2024 05:10:03 +0000 From: Steve Clevenger To: james.clark@linaro.org, mike.leach@linaro.org Cc: suzuki.poulose@arm.com, leo.yan@arm.com, ilkka@os.amperecomputing.com, coresight@lists.linaro.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH V4 0/4] arm-cs-trace-disasm.py/perf must accommodate non-zero DSO text offset Date: Tue, 27 Aug 2024 23:09:40 -0600 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: X-ClientProxiedBy: CH5PR04CA0011.namprd04.prod.outlook.com (2603:10b6:610:1f4::27) To PH7PR01MB8146.prod.exchangelabs.com (2603:10b6:510:2bd::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR01MB8146:EE_|SA0PR01MB6506:EE_ X-MS-Office365-Filtering-Correlation-Id: 049300b9-dc90-4bfe-9290-08dcc71fac85 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|52116014|376014|366016|38350700014; X-Microsoft-Antispam-Message-Info: mDg+Je1Pt3EuZQ8kSMxlBShte8vu4QpBwIRXi36U+TgfLKDKf9ur1ZS/xQnl6tW7n86/dXS9maF5Tap1BaCFCqdbJGmlhvAs3xqQBlX4OHgynkqmAJhmC61tW+gKShvaQ2g0a2zj+IIs01BPP7uD+BjRCx67znJgIz3Tnt7wqQGSE9d9HhIOPduLnK/SgzQ67I8oXNHNFFI2Acu3LX8Yd7MFlRv9z0Bq5OokQqODhrUA8c+jq55RzrkuR7fVgzr0Sz0SFSM5OO+9NSrY4YdVID0Z+BldRdTvpjcWWuvCMG/1rEdR5WiuYGpZinVGHgaxZp72ygq0VBuWq0HxOwcV/VFcf6YH0/XTmaGNMYNQePyEYZ6kicCjlXuojNxRZrhupRYNmnukFTL2SCnjuS6uueFS6hnMMpsonEijn5YK38219yWeh2KAYgE/wjjkneLLZ0i+/Bbk8H2d0eXrGRFyp374xEydBHM8OovihKAL1B2YNL6skcFc8/JxwC9sNSkjy8SnKZB5j/FcYcqRUSs6jb85GEqM4r4r9FltnLyQLM+NjRwen9BeEWYDacgi2G1jEyzt5QAKvobvnz+ErHx1Bu/rGBVx4LTFEtd4/1ihsaawq6bAx6qClsjeJ21WKsowBp6owm+q3EJ8GN4ebfG0zTZAq4MFtiaFySkc6w0ng6+F0WNm+TLr/ZrtTsO4mdzTQOVFft26NUKnCXe5d81kMFaNSxN2pZ12lXj2VlIvBSxGoWrmRsdAOkJJSOdKOGC0td1I3/X32L2bPuwGgVQSzj5qJCpe6pslJAUy1E4cOK5UvJ3XrYm22sVDUOktWGJ9z5as3YxqPrpZr0I7fXfxTxUw+iAP5ZtRnxOXAya7FqUyC+3rpcI7S6Bpp5qFa2IWtNNBC7t1Jvj9rvjN8xq0NAg0sppmSqXczZjnusxIwSja4KGxm4jAAV1Rtdr1GtPRV+kdRx7h2JhSgNYUPAyHMcMOhIAxDSE9b/aCv32lhftPF/4p+0uWCT9DDSG72uLCYRtjDGWicGvkYmhCNl4oNFQwH2/s9dePGDtqhqVfZT40XRejG8rnAjaYlr2DMjDFDh3shn756uwAYac3K856N3WagfD+PhifNBY72/vl9lXqoQ0XYcxyiSfV+xO9OenSecrqsy355OO8idC9JW/goF7Zh59nsfV6Or63AaCHKUqtVOhG22TqxFfSDgsgQe/XwWdI5jdO2O5CD7cSI4t2PjEsRTC92fLEZfxRHjhknWcY82AhXXy50+JPwhCJfLpyUPrCd5ZKh2kvKo0E2qk6FbejYl3I/jNXedDQKNXXJST0fXLdI93staE1SRPwPRINosz4IsbnjBnKf0iw8nnAPrDbjZydJ7PEj6JMGaD233o= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR01MB8146.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hqso3zikENlmTJannEn05XXyTXT/MBrYq4MmzhwmbJZ9ViRj2Y0vWmdql18neNR5DC78O0zZR9KrXZNCBay73YfbpmYlWAsxcUQ95ADCAgERwPFCaJdr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D+6hixwmafW6+ncLfBmNCJRSygm2Y/AaJxmI72LzfuZsZUdD6ralR5XWsH/tMfmNErjxjxhGsIX0/zrVi6PSF0nWLAkpcdU5stfvufyhtEYFmvKreSZIMOe0Cce97yOzdaOYh4Vwn6RlXjJKO7C1de0EQHAqMJ6xcD1kIXpnvGHtEr8q3s8GUxGV4MAdiB+JMT256+khdXPQhc/5DgGSNGx6OVXJnEUNBLUUTZBdsJq5K+VK8/X7uXgeHQn6O+WfesAhz8DrqhPa0dSiZ2t+nOU5Pf5xQPIbRlbnEzvcMox0spNx+4zAg90BKHFJ61hHiorqbIgR4Q1o9z+56GejuOb8A+o/tQASidTsAmfpVl1K9u0DIntTnoD507jd2tFpeNZBjuWwsyZf1p/1j7GfoaXfOyAMKCZq8z3jyy9xB2kvS+35VNpCo5jVnJX4c+igeO75LQ4ldKiWW/ X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 049300b9-dc90-4bfe-9290-08dcc71fac85 X-MS-Exchange-CrossTenant-AuthSource: PH7PR01MB8146.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2024 05:10:03.3955 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3bc2b170-fd94-476d-b0ce-4229bdc904a7 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6KhSrFEtJtAiC0Hpmzo4alx71RFd2fZ0463oxTW8xZyq4HUcjln4bEl+kZ3a12DHvQmfmrIWOxIu56qM3s6DflKe7+NVdIJxB+tebrSebBQaeOo+k3DortgvBWiYCXr0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR01MB6506 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_221008_284341_EE3D7DBF X-CRM114-Status: UNSURE ( 8.68 ) X-CRM114-Notice: Please train this message. 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Changes in V4: - In trace-event-python.c, fixed perf-tools-next merge problem. Changes in V3: - Rebased to linux-perf-tools branch. - Squash symbol-elf.c and symbol.h into same commit. - In map.c, merge dso__is_pie() call into existing if statement. - In arm-cs-trace-disasm.py, remove debug artifacts. Changes in V2: - In dso__is_pie() (symbol-elf.c), Decrease indentation, add null pointer checks per Leo Yan review. - Updated mailing list distribution Steve Clevenger (4): Add dso__is_pie call to identify ELF PIE Force MAPPING_TYPE__IDENTIY for PIE Add map pgoff to python dictionary based on MAPPING_TYPE Adjust objdump start/end range per map pgoff parameter .../scripts/python/arm-cs-trace-disasm.py | 9 ++- tools/perf/util/map.c | 4 +- .../scripting-engines/trace-event-python.c | 13 +++- tools/perf/util/symbol-elf.c | 60 +++++++++++++++++++ tools/perf/util/symbol.h | 1 + 5 files changed, 79 insertions(+), 8 deletions(-)