From patchwork Wed Aug 28 05:09:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Clevenger X-Patchwork-Id: 13780567 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 45941C5474A for ; Wed, 28 Aug 2024 05:11:27 +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=UsjQDh+OwwSyuEw9qo6BURtbUx EwEo2YBBSEioqWzBMUj8pywI4HHZitdDalbSdVcfVdtDWAaaZknUnFZCECCMVLloN6emYHddDqJo9 04z1yMhW0rVP7z6RodPmZ+e7hbGlzS4wsHRf1XXR1XAaOj5bRJs66oWYl1LxHNjtV5ghXsDw/o+u8 xHg0Sp/uc9+q0G5xnJP0JTPHepjXKYmHVzeaimeXx77nQFZ7AprceR8o/D25w+7wU/RAKQjJOKX8y gP915Oy94n+nRc3MLX9kfWY9UJMg+mysX/L6AJRt2Gz8Dr6Lnam80IsmDIb3H3JE7bnvoFfag4dNT 9AjcR1pw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjAxe-0000000Ds1H-1lOL; Wed, 28 Aug 2024 05:11:14 +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 1sjAwT-0000000DrsB-2HLw for linux-arm-kernel@lists.infradead.org; Wed, 28 Aug 2024 05:10:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=paanykcPn+0K3fiOIA3+g4hmVynyCu/oGNlUdRk+tU5v72Zf06AG2tGBW4Vc1KLaqellaKVGyj30ixUIR7dcGNsX0KQjS+hIC5RkoCyaGEexmWwjRxaodEkxm1uOgMESirW409HG6QXC63RfRfbp36ImmFuYZd/KwN3uoFRnHCBsxORYRjwkh1e6FwKSJkzlTOfIHHtj7koADOvCjuD25b9dC7lSl2TjL+knVx1Yyt1/xFQXA4PlHOXbOe6+2wY2CwJtDCikzmEqgKPj7qF6TL8j9GntsLWMRk71uF9dKozhOqW98SVK0eA3Tsc3v9l9PuaIYoyY1hxnaqtqvZy+XQ== 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=CGPU7trQcp0sIfwDkEyvq0QdWcCvbHzAZxKBYDwLBgnzkJtne6VcwJezOO63tRfJDDn10W8xB1uaaKaQ9p9rJ9CTG1zu98w6cFo/tQhLukslixfKdS6WZav544Z7ZTegYvmfBjrv+tq2Q47LHoiUQ2RCGJQmvFTicqzjB4ibAPXxZeoSiprt1TMePBm4Lc2uYhwlF0/GAGEbHu8zdJD7HKBLw0DvSmqiPP+HhaluZq+jbBL2v3u/yHpBkm+25LfQX3wNClF14BCC/fOS34zrCsrhKVB9LIrstonm0UzQlbxccktIHEXifz/n13g4yWNYjYOlaYN8gA3KqMKnjBzxIg== 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=rJHIszSQVRGSFcHwSvMEmSPA14UuALXeNi2Yxr6aRqLtjDC2KALlCftqNfrKf+VPCGhlVolS9gjC/IzDMPI6G0tfXfizhf53GxxsnjsEFlQHAGguE70ntEMK910dhgxFdz7W3o1oW2B7+6bKfGgImER59v84PDzKFsae+2NBoTU= 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:09:55 +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:09:55 +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 4/4] Adjust objdump start/end range per map pgoff parameter Date: Tue, 27 Aug 2024 23:09:36 -0600 Message-Id: <4db11c591f56f4746b17fbd3468007cc89048881.1724820993.git.scclevenger@os.amperecomputing.com> 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: 4e62a766-71a2-4848-fd65-08dcc71fa7c2 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: =?utf-8?q?W2e0bqUqWkimoJG/NgIQ2LrIrraYRPw?= =?utf-8?q?1jFRUnjxjaGnus6JBgGbqnxENqJzgE8CBTKx14EbX91UTmkuoNgEVKzwcIYjJMxk+?= =?utf-8?q?9mFjfN5At7CT5/+mBXzuIGFtxLgid5y/0MbQyGUBzqNKLNV+FURPVa1XbDV8ieQnX?= =?utf-8?q?SBf4Y1HU3NdX7ygE4H6uxnr9F0AtEj8ASrMdykCLu8TIJX4qXxKO24FrUFCaFysJO?= =?utf-8?q?9WjIAa/NVs3Nv7V6SJG+Rt3QgIeaK9DgzZZrft2HdpCtheKYhvQWUZ2Zxk3W4dqZ/?= =?utf-8?q?zC/2eaOwftqIz/VcLShW8zOhWuXYeNZqr/q4OUnT8jV1Q1GUYdIkJmGSRD4h9zR7f?= =?utf-8?q?ugQ2Jjg2LbnI1z8opYAa8lcbVM4V3QW1nIh4gbi0Osa7AGM3RZGApJzmEaU/Zv4Dq?= =?utf-8?q?ruI5NUPLIe7em4bGY9xkDgGYsWlgA6p1JKaTvr6moqVAojRx18UZN496QpKEMV3/w?= =?utf-8?q?S+yqEDiJ9z90EvZC3aB7Uoq0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Bl40ZKSj0w=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)(52116014)(376014)(366016)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?JSmCp/X6nq3GlNch7Jj/g+iFg3mm?= =?utf-8?q?2oqjh5lYkAAJOhhE44jgtlWiuheTa0eT2ncP5kl67aqgIyjqfNieKzFyJs02TGIqU?= =?utf-8?q?3S5vdaoSIetjVdoSqB4R48ct7wvfy1EmlHKDgDeVOzGsV6oU0kcoI1b3Nte943ib9?= =?utf-8?q?o8apMbUKCfEjEFu9EOWqx4qm/ifrJtGQcE9AOTd/db6doC+t8E0xGJ4eBm6tOVe1s?= =?utf-8?q?T3I+YigHvDmNJQ5Va4OHW14rc1vOaswQs6nDKypODdH2vJ94lQn0QoDKAWH00OvVN?= =?utf-8?q?G3i/dK1nJNYlEDJSuulXwqjDGi2TIFiW9emvgGJ9aG49EF07RQ8OZjzBBqnnyCG7f?= =?utf-8?q?D4W0f5s9yk6b2WgiNOZ1Jc2M8hyVWyC+kRVke2TpQjSyOFE+yQB4/0HC72cOg/mEN?= =?utf-8?q?XGFtquoPpCJJvV85fbwEkdIvGM0P+osiGrvGouplz/BxMCrfY0oxa+h8o8RdqnD32?= =?utf-8?q?zevout0jg1pzu9qepdPaAxbW2ImuLY/RQr0tcUyckk3sZ2PtYuQ+NRX4wTE3rxlJc?= =?utf-8?q?G0Pz9UhgDOOjc5ZvH1uOZOMsfr5TqO3lnJgWBmsurn+0KUTZYWo8Aa836A1BBIabC?= =?utf-8?q?SYbYCS7rhLWIvCyHj7gT2Q6t2mzzg+wQxGMt6dekJ22JPmKq5oFf35zcn3CdHf7Y8?= =?utf-8?q?KRMX6WA4d0PrELgd5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YbgUMTuhhpPfV/JFn60d4iHTZhDaHINLpyoq8BnCg1w/hS?= =?utf-8?q?BtxYdpeMxYT?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4e62a766-71a2-4848-fd65-08dcc71fa7c2 X-MS-Exchange-CrossTenant-AuthSource: PH7PR01MB8146.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2024 05:09:55.3272 (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: ezxBxmp8cWtJGbZ0jHAX2NV4li9u+cPJ0mYtFeQpVEHU7obgLJr5FMDiYUioRfIHLQzHq1TDfF9629Y+P598inuYKID3zlxz5A1GXH4JAxzaWki374+1argoFpqyHZuH X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR01MB6506 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_221001_612284_565B776E X-CRM114-Status: GOOD ( 11.17 ) 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 Reviewed-by: Leo Yan --- 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))