From patchwork Fri Oct 11 17:17:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Clevenger X-Patchwork-Id: 13832783 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 A1A46D0EE12 for ; Fri, 11 Oct 2024 17:22:05 +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=7DEw92mpbvvAFSQRclhbLrT8kKBotlHTwXEZrx9zQO8=; b=AJENzPLZMxHM7XdFZ08K/Rk6Kg E3bwpqizsy1k/tykiOh3ljYaytYAza14npdRTpYI3brC82TKeGRsVzA2kBl5f2aQLLN3lCILkDMO0 ZGIcAC+9jOfxISZ6PaR5voMzEevpo5GRagf5quhQPpufmeDdW6IidRQYxDpvmEeQ4BaK8VZJcT/wM EIcdTgorxxO2Egab+YqLoOM4m6vHUJo6vew1+4VTMIa4tsKz5vLrC6+T7bpg5qAeYN43UNVfbGLf9 Cc8j3mi7WLM2vhbUHvrlgHOCS7JEU0YDNU3KigyhghQx+ybAuC8ECcD0HMj2rsYe6ZkMDO4tN7dFL wQnfh6Jw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1szJKk-0000000H60f-1d4f; Fri, 11 Oct 2024 17:21:46 +0000 Received: from mail-westcentralusazlp170100000.outbound.protection.outlook.com ([2a01:111:f403:c112::] helo=CY4PR05CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1szJGo-0000000H5JH-0Xgn for linux-arm-kernel@lists.infradead.org; Fri, 11 Oct 2024 17:17:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uQB5y3vSAt0K3+PbC8nZ2MipLzLo/QSQJPLekKQ1uMAfs2Ofo+b/KNBMiHTQqercXAcolkuXVKY9UKGub0NQJGMncfBkJvRisfatYcujh6WE9hGcy+a3VJtJt3zGuG+rc1cRhHOykJWcxqJTM6jdL7z8wqMWJXe8lDVtnnwbqnIdTEUgHncTDSSaxeRBIBZs6eG3EOmMjtIxKkUo5mwGBWWB/LnsMiuXq58eug2KVmN5F7POLeOrGplshPkBCGXq4vGbWjgtEoicyZ2kYdHW/+9sqWCX+oeu2jB8JCnnj4Jj2+e/HCLBzjiaUcDwtAloG/Ack+8+ZvZ+v2Gg0wkpTQ== 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=7DEw92mpbvvAFSQRclhbLrT8kKBotlHTwXEZrx9zQO8=; b=o8R5ATeJe6XMc+YG8EZfvElldw8mg52ZdlxXUqZP7Dllz2YI7am7HHAuDBvyz8yL3LH9cYx7IMitWt1/dYfm94MWCw3fzQlKxgsyAcUnVtAUNk1d7X7IkjZM/vIpO5VWNTCmr1OuZ8RATeHTkIYO7NtPOdQUdnvDqM0DEEWH/d+1PQBI9mFc6QfExIFagu3QjMXDabGoS8Zwqkr9PKZywUcVlCTwB746UJPygTndZ+VdDjcYo4oq8AQXnlDpcP1glxiBAKMuJR0l2rScfiCf6RrZQhfrH55WGpgTfcxW8yqX77y0eF5NsXoCOi8D7LNSQwr/wSsnh4GxcLV5IPZdpA== 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=7DEw92mpbvvAFSQRclhbLrT8kKBotlHTwXEZrx9zQO8=; b=RUx11BTh5CQs8O/nyaFMBOTEwKSG/gX9NPi5W3JPWs6VFppl8RzV2tKQKwkit0qScdf91e63+vW4qB88ZWHTbqcHth76xfgfsdLdB0qYZCnn2yWDDEPJnNLfCyYNmKkEK68EvCEr+pnwfbrsVKoG5gLf+nlounvV0tpODP7SqGQ= 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 IA0PR01MB8306.prod.exchangelabs.com (2603:10b6:208:480::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.34; Fri, 11 Oct 2024 17:17:34 +0000 Received: from PH7PR01MB8146.prod.exchangelabs.com ([fe80::2972:642:93d1:e9d4]) by PH7PR01MB8146.prod.exchangelabs.com ([fe80::2972:642:93d1:e9d4%5]) with mapi id 15.20.7982.031; Fri, 11 Oct 2024 17:17:30 +0000 From: Steve Clevenger To: leo.yan@arm.com, james.clark@linaro.org, mike.leach@linaro.org Cc: suzuki.poulose@arm.com, ilkka@os.amperecomputing.com, coresight@lists.linaro.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH V9 0/2] arm-cs-trace-disasm.py/perf must accommodate non-zero DSO text offset Date: Fri, 11 Oct 2024 11:17:10 -0600 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: X-ClientProxiedBy: CH0PR03CA0311.namprd03.prod.outlook.com (2603:10b6:610:118::13) To PH7PR01MB8146.prod.exchangelabs.com (2603:10b6:510:2bd::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR01MB8146:EE_|IA0PR01MB8306:EE_ X-MS-Office365-Filtering-Correlation-Id: c461d289-a722-455c-6f42-08dcea1896a4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|52116014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: qN0B6hA/I9qOvi/b/gKZLId2v9BFv0CMyBeZqLuiX7sn2SGQYd+mphDHaLCzyQjSDnLX236am5RnTSFyw/EcAIBm5JpKnuhCMYYwORavGVWPCpTtMWs7FtJ+wtYOiA+3N8LmCEkw2UAnrw7ccV2/xMg9hxipZ12iyQ+3XPwT6H1HLrEDpTZqNfQRqVE3gNcrce3iZK8CoiF5ygdmTEeLsGmPzSwsYq9zPcVLiP8TkHkhMziAzWFeLkvr5vFS0MyRW4L9j3cIsxzS27Fw7JqwB7LwVuiO7YJgJeg9Q4dmmYa8x46JFfz+n0oFGW+cjTmuczB77DwBm2oGusvXZqBf1UguOubHozDYIVV0Sw30jDTq1PXC+batstXWTDOjcCRMHuNYN3c3cGlewLdm1uFeNMLxS5lhCzZ5GCwF4MuV378jTfyaO6Ure1HEo+9YbznHSs7sa0Zq44nPtKhZX+A0g6upTTNiB7mb/xy2hd2299hb1VK42Ju6dqfWmLtnEHbeRYYIU9w+8weq3G6mcBwW0kmAWMQipBMWAlLz8fBYv1zQTVYo1R4S1xzmw4JxneJWnzYU2oC7eTgn+iVRV+9Ixpg0vp9mUQf+w9DNi9hypCVqBEk99NpblkKkZrPBsg3rZHkl3etevRjimxUZKhsbUsO7+LjR4v6tr7HbK1TYWihS7hy6Wz3oU0VXCNYs6v1V2MJcUtIhfs1TIBgIEgU69gqkYXYHydbwDiSdr+0rXlagIy4S2YZwNYimqeAqDcI2fii2Nce4M7r3tJSllfY6Kt6oklvoDY7ETrHNjWW0ijOwwlaNQJYTSidI56xsdkRhXLZtKnpoKtgfYqGcKh7GKRzS8JIUyBTcSGURUTiYPHO6wkyRjnrLOnL/X42KxtdEcKoDfB/HqZjGqlMl8aGLDVA6h/Hby17tRz7R+B9u0JhbnGJNmdGXnpU+klICvWwjs7NI9KxoZWTzUItt3kRWT8d3dqJUh199Any2kisN+eOjhX7+AewNTwv0iLfnAY7ArPP/bm7d6I9ek5JGY6SxB4d1DFEuKSKcxVovsSPIc2A7syKIfy8lRAKQsFojce/27zbHO5a/da3kYwJDaLkqSrZy5m5e/76VfQmpRXlGGYuTlEHI8DKqeIeY222saIqb5mX4wKKV4JmGxOkC8/n6kRJ7rrxa1DtbWG6HyxSwU08VqSu3MqUGUOxzEAxy+LO7LWJ5CmurJ4awLMLtIz3luCXEPHB676iLab2akS/38VLF7YuCHfGLrvk50dhNRut+7F2GDoUMmXruSIfY3lYMDtTe4796PsqTHNLkxwAKwOw= 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)(376014)(52116014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: UluqeZoGAqSEUucc3i6YLufr7Up91vbE4Q7NTuTUArZSP23fRz+1wXKBjEpOyf1y84uZ6HJ4mrSYWlfu93AhVpNJN+kCf8p74QT3/UW+rkO3y8A8ZS4MSEXp7dcY5YwxM9KjRf0ONRMFhDdUGt7e411Fb3lrK4OnJvNpiEMH0jllJIya7HMlZCLwMA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1ZKPAfoIBi8odTrDyJmoP3YPXBxMCIEau5liHtshzZHMINyzFKTQNIVLTfsW8Zgp3/v6h3igWNMQYR5Iv7VjimfLHZKJLDUc8uaO9q8fFf55HONl51c4wTBY30osf4L541ocs/1nGOAkPTfy+5rrA3k18p+/4a5++6YQljO9/YKxM5OoF+9tNUi3EnI2kFzV8+WYGJfcYq24dej8wnfJ9kZJVnTm/DSYGjamA50lv5nSN3uQtq/wuEw6hFXDB/FmBR1Olo6+ylXAuelxgQr2Ro7tKCcsq83KCjPQwQJEdHLLUDVO/fsRFK8zTSSGX6q2NsJpFt4XInO4Xz1HSjMT9sZ7mhDHk0zCmZpSiEASSN9as89Wk11jjHPFE7QrBwJr1COBQIEJn2yW2ZyZ++0IYtnxVPTvYATQY34JD3V1 X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: c461d289-a722-455c-6f42-08dcea1896a4 X-MS-Exchange-CrossTenant-AuthSource: PH7PR01MB8146.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Oct 2024 17:17:30.8572 (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: ApCz399VyOhUrmCO7unbSm3FP4+zNXmvp57tFI1xVd1yURt6+uR1dzeANPQntN8DPWp11C6/o+bDeNZIVtSOIdZuWoT7lU3YzKFZnIRVE7TSKbY4UKBMUU+vRCquV/oh X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR01MB8306 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241011_101742_201767_8E1676CC X-CRM114-Status: GOOD ( 10.43 ) 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 V9: - Removed V8 patch files 1/4 and 2/4. - Modified set_sym_in_dict (trace-event-python.c) to add map_pgoff in dictionary as-is without regard to MAPPING_IDENTITY. This patch file is now patch 2/2. Changes in V8: - in arm-cs-trace-disasm.py, ensure map_pgoff is not converted to string. - Remove map_pgoff integer conversion in dso not found print message. Changes in V7: - In arm-cs-trace-disasm.py, fix print message core dump resulting from mixed type arithmetic. - Modify CS_ETM_TRACE_ON filter to filter zero start_addr. The CS_ETM_TRACE_ON message is changed to print only in verbose mode. - Removed verbose mode only notification for start_addr/stop_addr outside of dso address range. Changes in V6: - In arm-cs-trace-disasm.py, zero map_pgoff for kernel files. Add map_pgoff to start/end address for dso not found message. - Added "Reviewed-by" trailer for patches 1-3 previously reviewed by Leo Yan in V4 and V5. Changes in V5: - In symbol-elf.c, branch to exit_close label if open file. - In trace_event_python.c, correct indentation. set_sym_in_dict call parameter "map_pgoff" renamed as "addr_map_pgoff" to match local naming. 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 (2): Add map_pgoff to python dictionary Adjust objdump start/end address per map_pgoff parameter tools/perf/scripts/python/arm-cs-trace-disasm.py | 16 +++++++++++----- .../util/scripting-engines/trace-event-python.c | 9 ++++++--- 2 files changed, 17 insertions(+), 8 deletions(-)