From patchwork Wed Aug 28 23:17:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steve Clevenger X-Patchwork-Id: 13782083 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 F0F75C7114C for ; Wed, 28 Aug 2024 23:19:22 +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=WRFu6mb5HlajtVl+CQjy3ls9uC JYIk8bWlskJCK7gCG0T7Go8f/Kl1T6iM+NB5cvQqQ9AELJrmEzXYhgO1LWP9j9fp2pWTpnFyMG/2O ETiFAO/5lILhe07pgSn8/ypxQIHdCMnpODBlaNrfLb1WAOWXw/fGNacyDs7LiywLt/74lrd1S1sWJ fUrQGzUrSO6NE1bQ9MQx0t1g9N+rLO0QwtmOOJ95nHFbIsKR5M/QzABQelziiXrUkUO8ciGViG128 ijfuOLVC2UPtCE4Qq0QmaYUoJng2N5CZxsNoxnAbvn7up+QScGSMsWMLurklc7ZvnAiAxBQuu63d3 dmZamc6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjRwT-0000000HJlK-1MeC; Wed, 28 Aug 2024 23:19:09 +0000 Received: from mail-dm6nam11on20708.outbound.protection.outlook.com ([2a01:111:f403:2415::708] helo=NAM11-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sjRvd-0000000HJho-01bt for linux-arm-kernel@lists.infradead.org; Wed, 28 Aug 2024 23:18:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qS8SyGpc2a/MD+14mZKcNJK7KwrBSLTGefkcWOdM44Y+bhG/Jrp3Vll6dqcm0nNPhVfEFuEpF0Bzy6nWMVzKwvBpgZoTgEHo3YfU3H9osjLeytcFp5MULTKkFOsgzk4v7PQ0T/DesLOGgQeN0Bhm7cLq1DGq/WTA3Er/KLevTbfEeeL5DIybwlE2U3j5uMy6qoJwqq4bsOQdShLDcP5DKd/pqaWQR3Fwv0zY2fTznDO/xoatTV7GehmFTtBvJHwRFWUWLGOQ4krGnSQMEV2YzueeQuDVbyIB7ByireEzLTI6qa7mjT04ZgIQ4Je+u0XeHPxiQ9za52B2TTJf5Wor3w== 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=ru4ET4lPgPT2/SYTT1G6ce5xn0bIwIS4Qxs/eHQL7iA3spyL8LLch3AhSl9BQe29PEWx+gLxjmBZ0bs0BUPuzymjRRWpjGd/NwThX/42pHzeOaTRejA6obrWYs8Y0zJCVJl1gxux3/Ml8fdN4SHbVcnbu+e7gUbU5bbZAh/X9/zfuwBdoajEDBh3byrpxJap8tlZxFMyGYA+XIGSsuwTjekvN2BG6lLNz9mPY6XW/4BD+Gm7Tl+j3KDlkCYkprEIGggbNueVo9JhvOG0EfnCzIUo/4GmPrw6pjY5bldOqeFEnTh6MFUB7/ulUQ5ETOxsxngZl0cVHA5M5WO1TBuubw== 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=k68RHggu5UCMTLtC5g+VjxrhVe0Pkn9Tnb+AfMoJHeHJcO1D++IvM+x20fV0OX5PYY7Udb8h7r2IDlYBGycslW90e+fwu/eZFN8xazBl5oQjugEQIrnsIsQTiYiG0GVqoud9t6jABmI7OwuKgcIdRjIIwPcuhEXxmvghCiKpodw= 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 PH0PR01MB7895.prod.exchangelabs.com (2603:10b6:510:28a::5) 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 23:18:12 +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 23:18:11 +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 V5 4/4] Adjust objdump start/end range per map pgoff parameter Date: Wed, 28 Aug 2024 17:17:55 -0600 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: X-ClientProxiedBy: BL1PR13CA0109.namprd13.prod.outlook.com (2603:10b6:208:2b9::24) To PH7PR01MB8146.prod.exchangelabs.com (2603:10b6:510:2bd::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR01MB8146:EE_|PH0PR01MB7895:EE_ X-MS-Office365-Filtering-Correlation-Id: 9514fe2f-430a-4bbe-4a47-08dcc7b7af55 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|1800799024|366016|376014|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?QGfI46XM9WIfDj7oFvnTA/7LonotNfa?= =?utf-8?q?tSo7aHJsCmFoPV9/VW6gYENgURinFewZSUXh9ZpWC7Ws85EunoJNLaKynF85kqOLG?= =?utf-8?q?4nFxQOuAF5rr/Hn5uQZcMU8J5gRxDwlIVhRTJpjaq+HY+ziR91dCjBidMSSwOL4fu?= =?utf-8?q?y94/lcEZ1UUhxGTcWgDdmldU10B623/5+2QknldcFVRZ18Pv7qDc4ktw+gSg8Njd8?= =?utf-8?q?fgJ6vHowAi8yoqZqshwa/whKKIiQkFfK429Zz6uR1E2VQZ/OeWVDMnNVVoHTCemu1?= =?utf-8?q?G8PB8Oz+rhCqQRoDJHM33n3d+Ro7VS9vAua+TwbHaYGJsTBg4kCzzsgOUzuXQ78Un?= =?utf-8?q?paFFskPWhjQXiTZC0uMaHIUMdOaB70AU/ku4n/3rbfDyRKNQxAbBpVsooN80w1/iP?= =?utf-8?q?S6v968pVAGtUqsr9T9WUnAN5I7lzT8+jkc1oyRxhhinmkDgsrHKIdVdkBzxfWoHFi?= =?utf-8?q?RU+NHOsCDMs7ODd4WnnjKVWQ2m4Kh1VQj0usczItow5Ar3MkRjNUCxOrfxybsCZ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.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR01MB8146.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(1800799024)(366016)(376014)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?9lPAFQs27SbfH9M992gravm01eUl?= =?utf-8?q?ldNpn+DmI9QZLNZQi6i22DqC3g0ItQB3iCFVymKKYO4mBTnL4+d2k+lF9dfIEYCjs?= =?utf-8?q?07gmreqqybE3RUoudgw+CwdstaK9eFQwYuGFK0mWwYReIL1y3lRw2Oni5yq8EFR/X?= =?utf-8?q?y/SRYQmPRDHAiAWfCBijHH2o4FveGjb8/fnBtsZnK2DhspDFaHj1We4GQxpsYfQ4O?= =?utf-8?q?cjKoVuDtNwmEQjyjHUVTB1FJ6XO4JMvx5/LNZ+QFkuR4ofEVtvpPgJ6tfaOe0C/Lk?= =?utf-8?q?kqEPwacH6XnQh0xefMjeQMe05KioXnmpG9e0cKlxaegMzvkEHnfsRKCT7h0nEANu1?= =?utf-8?q?kzzvxwXCkgRtTRNSQslRhNvAHccYM0qSk1zPu2GSHa/wTgTl+F+511l+LwTMYI8Qq?= =?utf-8?q?7Quf//pc212rE7lZvJQYRNufO0LNFxICOvncxX7Pz4NyQC6XpJjP0MTbMbwe4Hrfd?= =?utf-8?q?PbSmi3yNrKMV1dBLTyO9hXWkc0wfqB1/UoiD+03hBzLYXuy6rOiGiP9PjseipdpBv?= =?utf-8?q?HXKGiewklpjGlKIwZ99/d8m4gn/+Wi4WrCvAzz0YbRs1tqWjmmhvt1XHxIGxFC5bz?= =?utf-8?q?1QiRPcaSj1/Z/+Xy1v4e6dSgiV3nGZJl+2BPCjc4qGGFYZo2jWeDkPUAwfR2EtHfD?= =?utf-8?q?eMkUr6okgT1ZiW9BpLSDk0VmIJHGQnkKf8fjvO+9ullWLHOATfO0wSdX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3iY?= =?utf-8?q?Z8B+dvxUKOf?= X-OriginatorOrg: os.amperecomputing.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9514fe2f-430a-4bbe-4a47-08dcc7b7af55 X-MS-Exchange-CrossTenant-AuthSource: PH7PR01MB8146.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Aug 2024 23:18:11.5787 (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: R5NhCf+aZEO99cWpoTL6TQ3vs3UvrqYT0PBx/9Xpte+0FbgZvV05+fedMzW5lam0tlrzAgTuoUcX9ow/7uLMYurphiiZOcJO6VocxyBy9TQ3VD5nOZL6qix7vhh1/vwH X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR01MB7895 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240828_161817_072277_61AD031D X-CRM114-Status: GOOD ( 11.06 ) 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))