From patchwork Wed Aug 28 01:50:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Clevenger X-Patchwork-Id: 13780339 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 12259C54749 for ; Wed, 28 Aug 2024 03:00:47 +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-Transfer-Encoding:Content-Type: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=YigPosKCyA+QVqyfOxzq74WG+dtaoYHC96nYTYgVgG8=; b=P5I88F5PRulJvCPcu5l+7dhY2B plaksABN63ELV4HrJQ5eBg8eQnPUYv81Nop5AZnXz97NbtZ8hoj4I4UK63XdeEV8ta2lwj0FVcZmQ 30adYL64qYo5gTHPegamHYE973QocMBukdw2c3xG0xVRP0HLXWQ3JLNW8koIJvmiWjjxTw6fkxEM9 TsMMqXV/qmGhkvLmV0a2btj3i0Yj+/Ch3d9crAGl12BPQ07ZDErbj+JwjPgbdjZU6y8HOuzyWqqnw tw4u81ef6MRFTi/q63lThK98qWRJvTreJx9FD1YrPnpRUDmnREJpwIisSfzWAw/sx6xH4ActVhdGl c6M0AI4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sj8vE-0000000DYb3-1i0R; Wed, 28 Aug 2024 03:00:36 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sj7pf-0000000DP9q-2Yls for linux-arm-kernel@bombadil.infradead.org; Wed, 28 Aug 2024 01:50:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=MIME-Version:Content-Transfer-Encoding :Content-Type:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=YigPosKCyA+QVqyfOxzq74WG+dtaoYHC96nYTYgVgG8=; b=IJnGOFFZ01ro+1PGxKFtUs46po lRW733PYOUT7TW1HICfC4hfsDwGyfBXGGZ2M2dFrqv85KSXC8Nr0KhT9ZRk0mbd5/ErPxOBl8Yi1Q 7tyntZ/WVo/xVIO1jB14I30m0ZELomlNToQKkHXXg9JKskYi4NS6jcjaVr4PayCIlTBewjpdQXyhs iL582jsYpSOfxYVLoKsIzPHvY2SKLdgg8WaOlTObL1f5PneWcFpTP4EmiHXkLSda6r+T2clHeDwKi mCmKc9hZ3dHKGYIcjEhVWhFOu7oNooiV/QYp5GOpLZP6Ot//6JrbsmpoCnpvqtU9PnuB7yIbN95Ii Z8oyxuYw==; Received: from mail-centralusazlp170110009.outbound.protection.outlook.com ([2a01:111:f403:c111::9] helo=DM5PR21CU001.outbound.protection.outlook.com) by desiato.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sj7pb-0000000Azbp-3sLA for linux-arm-kernel@lists.infradead.org; Wed, 28 Aug 2024 01:50:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TOIN5BFgNPzhwtA4SYO4Cc0HBDrZ6Tya1AQr4JHarh/L7ZOjUYnklDEef9qgicZ9jNgDwtjfmCm7n91FO4J7r24vvVVSsZZtCckgL5/K2JJ1p4jsgloEJOWBDw1d7tA9VIcdNAmg8mIt/MTF48+3qvVj9+W1YSp0lMqoroizCLxomU/crfUS4Wu7KsaFL7de5HdAto66y2a2jHoiXfK6v8mT7Iv2F9XFdtD/IDqz20/fY1H51M690EI+5HF4u0rrlsEDeSnKz2oPlUAfFiaiB1Yh/rgdPKr74/3t+iZg9qSzduzZ9SLn1TddESaqJd77ErC/VcEu2ctBciyYaV6DWA== 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=YigPosKCyA+QVqyfOxzq74WG+dtaoYHC96nYTYgVgG8=; b=LFGcknnEH4Ty3nrMb+QBwW9KqW8+Y1+fs+gXJe98stNq34Ntxzfs8D4Yl1plMv/CMBu6NuxwzX+vQXMJqKS+3lPe8G4crv/dvrrZ28PkP5UgzT/bVfUnJyo/6l8U6PtyMpE5CLJfPmkCnl1opxJHda7izgYGGjYitKU94iPQHljjcBldTfy6P4X79DGBIufbwfVa/UzTdebmPwoTXeWYtPoSixA2zrDJN7CSpg3TZvUvVgClMLmMMQ8M8zgxC4EN7xJbi0oLVY8MVdFT+Y+jNcdA1RxSX4Q6QC2WP3pc5z8B0QoIyuV3VTc2wtB4rUrqk5SLKb8ZLfPJIwmWrcdm8w== 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=YigPosKCyA+QVqyfOxzq74WG+dtaoYHC96nYTYgVgG8=; b=f0Nx2w2dOBZnRkurLyQYMLYF3npO4dTc0TZpmoxsT7k+UB9wRA57l1moyuRc6+3KV5cPZv+Qyp+fNWcHxC+AUJEJ24iYVrcC+rqfqP2GWq7SgjP2+dTtVag7iDW9G0fjEAfaKqwR9frcCBxa0kriOtNPhBLborbAkgdFUAxZRrE= 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 LV2PR01MB7576.prod.exchangelabs.com (2603:10b6:408:17c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.21; Wed, 28 Aug 2024 01:50:34 +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.021; Wed, 28 Aug 2024 01:50:33 +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 V3 4/4] Adjust objdump start/end range per map pgoff parameter Date: Tue, 27 Aug 2024 19:50:13 -0600 Message-Id: <2c8d8f931a1484939fe0251424477f2e53423417.1724808513.git.scclevenger@os.amperecomputing.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: X-ClientProxiedBy: BY1P220CA0004.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:59d::15) To PH7PR01MB8146.prod.exchangelabs.com (2603:10b6:510:2bd::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR01MB8146:EE_|LV2PR01MB7576:EE_ X-MS-Office365-Filtering-Correlation-Id: 1d692de0-3c00-4c7e-a574-08dcc703cdc4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?mHXVEkfE4hYP9vHTkchaLYS2+znnPaW?= =?utf-8?q?eIs+MqxBmqu21LNarv2WqXh3JfNUKHwEomDes2Lm8A34knefHFrSGzgE9qaLeurpc?= =?utf-8?q?cVLg66stCDxShlJU5ZFeNiFNPhQ6Ye/uxe0xHNZG/OQcW8PdnWNtgG8Sq7cP/VitM?= =?utf-8?q?Vzkox+aJLD6MeSWf9oi/SqISqh5RDOX21p0NZuI86nFXJvaAaq5fdyNyk7t/uCZL3?= =?utf-8?q?0tNoAN9/OmnbV3yG3wK+DrYai4NWSBSoQoJpWIIyyMHgaZ64YcVHQhftCUSMlChpg?= =?utf-8?q?crfoF0fxrBffk/vRtcZgSgW52PFbJZU+OqxZxBuQM4RhClYkbjs671weOVhKXIrC8?= =?utf-8?q?7GTN3h8NyUg4SLVQgwJRov8Hsnhzen4uM5rufd+2SicTHWbVxunBbrRPN1akgs7eA?= =?utf-8?q?8ZKp/tjvQlxNgT6Xmw3Mjiylwjcqf2EMz/5CMjpPrJ60ay1ThLUTcmV8tUU1t9VDJ?= =?utf-8?q?Qb541KRZ/+0CmUOCxtTDikBbdMDewBtEEMeWFWix3QY8j7cawM2QI/jZ4GKj853VB?= =?utf-8?q?brZoBnALQCdvpc8qRjfNLpg6itgop0AzouXo45nZIk3gypi6M3bM61i6w1j7jSert?= =?utf-8?q?QtfmjYenTbCgS+iIJXnDkQiYnV06u/DuXwx6SIUwVaHfS6e+CdO5JhiWN3dI/CcgB?= =?utf-8?q?mfgkU49DdEJvjAae1BJibqege6echzQgGwmf9NVY1wwGaWtR+QRd0rlDdXn07GrXS?= =?utf-8?q?q6L6vtaUfMEUq7gxhiUmvws/TASN/Tc9oKTknb8GRIF0UVhA7/E0vxE3N2gHGNsnk?= =?utf-8?q?/1KQ41KApTDfdTe23/HXjDkhpWiuIFuUT5f2wldrblb2N4sHzEwsWcQPBU0kDjMph?= =?utf-8?q?8/DuMlnH/rWMPA6Zx2739ltZfuMig274Z+RIQesasizWmZAnG8aFYFU29blL+GIyr?= =?utf-8?q?3um/skj2z8+ar+5GlptzNxnmlvTtB5XlZrkFjEiane/BXwec1gYNV5A2xJkzO4oQe?= =?utf-8?q?nWdkLd0skTuosi5EbgUqPxl8PNCT+42Nzh49D8pM6HPxxc3jgpoZ7gA2gA1ZvtCq9?= =?utf-8?q?zASNLmPK9CBIy9RNpzA2giHyDFSQU7wKldYiCZptQNniNQDi7hRMbBbyEYNeQb2/k?= =?utf-8?q?UqDUP4Esuw8nmlVF6ft2h2bWGA+LoJL9xfGnUJfSqDyQJtsjCfIllfNkqmIOVLLrN?= =?utf-8?q?ew7dI78g3G8TCDLzi2DlClUWPAx6KVpGR0gNDeRiOcGULTmdtT1Gnrwjwds0aRJDj?= =?utf-8?q?694pwTrKFUom0uih7Mx6XWLg1Hk8TKgza40JZ8qSI+ZhDMEvA1gK45Unkho/uIui7?= =?utf-8?q?0o3v9m0xRYWEpCAVmc+j6pqxXMr7bGc0t8AhaJ9zf34L6WLNb/FzBb/eC1zixpdny?= =?utf-8?q?F8QgtSVm36FQwKpT9OmDHODh11r5YJ0azw=3D=3D?= 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)(366016)(376014)(52116014)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?BMoxJq3skQ5zrHwabLXOXKW7SQCn?= =?utf-8?q?hv6B6aPh93VkG0SECUBxqu+l3j3cOz9TaqiMK0xaNgjOFKHUHA7xzQBvyUottzsS7?= =?utf-8?q?ykZ4UjMlAgc+2VfV/wdxzJ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/xAg40uDu5nbns5IDAQMvnD?= =?utf-8?q?8uVMN1VqFO9DkKzn6kZKEBSiJ5qXiQs93dEUxfDbumekSEcvcCKViu68WQmrKl2rx?= =?utf-8?q?HbTYTonBQPX5U6qRx9f2vS8Ql9NZgweiJHN//2JbuiL8u86w4d1ap4jeM/1ToHooA?= =?utf-8?q?4S2eOk3ujWslhxXKrdLPqtNCn6Chojt0UuPNHgb8TcGGpzS6crAzZNNAJqByHihvI?= =?utf-8?q?qwAcyVdzq36sxtyfu42uY32a3E4uNxsSi9i0pzOAhzMHSRNq/RfioZnxbph3L4DDz?= =?utf-8?q?Q3kuIhlOzUZansUpuCbF2oChGwgAq5X8fLH/ATnkacDsWoeAxjQ5S7DQwR15Dbk1a?= =?utf-8?q?iqNMA7G3hfWL3KIE3aJVooT0t6IUEgcKJQqGHDy5N8Wq2VjixGKGzy9FkknO0KkEN?= =?utf-8?q?poWrXZhVdqJuYI5YRbjx1A0olGiIMMtrD5JdPEKOOWJgPQhLxrgkGUTvBE+8ASnyb?= =?utf-8?q?QeWpV8GyZmfrcT+sGwgUPru+/aTHL8R7/UXtifXcmSTTtA3WgeTXjvh5QKvU20g7Y?= =?utf-8?q?RuJOtyTEOeq30dQjS3SylAn6sDTeWYSbDHMO9Oc6y8rjrvCFXavoy+QezrCTzRO4z?= =?utf-8?q?NAat0x2MJ9E?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1d692de0-3c00-4c7e-a574-08dcc703cdc4 X-MS-Exchange-CrossTenant-AuthSource: PH7PR01MB8146.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2024 01:50:33.1787 (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: 0RcPW+w4KeqCwm+zfwCLhLLDUPSiwOO4BSSQKY5QOEbI+XN8pVQWOs2fo2cR60jkLI/vqko7ytin1pGPYhhGofc79iNzI7ldNrTwcVbEP7UqsUag1SkzDtN37H8CfX3h X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR01MB7576 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240828_025044_475964_2534A2CF X-CRM114-Status: GOOD ( 11.13 ) 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 Extract map_pgoff parameter from the dictionary, and adjust start/end range passed to objdump based on the value. The start_addr/stop_addr address checks are changed to print a warning only if verbose == True. This script repeatedly sees a zero value passed in for       start_addr = cpu_data[str(cpu) + 'addr'] These zero values are not a new problem. The start_addr/stop_addr warning clutters the instruction trace output, hence this change. Signed-off-by: Steve Clevenger --- tools/perf/scripts/python/arm-cs-trace-disasm.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/perf/scripts/python/arm-cs-trace-disasm.py b/tools/perf/scripts/python/arm-cs-trace-disasm.py index 7aff02d84ffb..e8cf5d80d850 100755 --- a/tools/perf/scripts/python/arm-cs-trace-disasm.py +++ b/tools/perf/scripts/python/arm-cs-trace-disasm.py @@ -187,6 +187,7 @@ def process_event(param_dict): dso_start = get_optional(param_dict, "dso_map_start") dso_end = get_optional(param_dict, "dso_map_end") symbol = get_optional(param_dict, "symbol") + map_pgoff = get_optional(param_dict, "map_pgoff") cpu = sample["cpu"] ip = sample["ip"] @@ -249,11 +250,13 @@ def process_event(param_dict): return if (start_addr < int(dso_start) or start_addr > int(dso_end)): - print("Start address 0x%x is out of range [ 0x%x .. 0x%x ] for dso %s" % (start_addr, int(dso_start), int(dso_end), dso)) + if (options.verbose == True): + print("Start address 0x%x is out of range [ 0x%x .. 0x%x ] for dso %s" % (start_addr, int(dso_start), int(dso_end), dso)) return if (stop_addr < int(dso_start) or stop_addr > int(dso_end)): - print("Stop address 0x%x is out of range [ 0x%x .. 0x%x ] for dso %s" % (stop_addr, int(dso_start), int(dso_end), dso)) + if (options.verbose == True): + print("Stop address 0x%x is out of range [ 0x%x .. 0x%x ] for dso %s" % (stop_addr, int(dso_start), int(dso_end), dso)) return if (options.objdump_name != None): @@ -267,7 +270,7 @@ def process_event(param_dict): dso_fname = get_dso_file_path(dso, dso_bid) if path.exists(dso_fname): - print_disam(dso_fname, dso_vm_start, start_addr, stop_addr) + print_disam(dso_fname, dso_vm_start, start_addr + map_pgoff, stop_addr + map_pgoff) else: print("Failed to find dso %s for address range [ 0x%x .. 0x%x ]" % (dso, start_addr, stop_addr))