Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5949136rdb; Thu, 14 Dec 2023 04:33:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IF5vK05CoHYlokllJOqgsOJ58xuqm0EpyF+TI+52GA+NfmnEM3YrbUJB/WutnMBAfToFtxh X-Received: by 2002:a17:902:7242:b0:1d0:c7e0:c826 with SMTP id c2-20020a170902724200b001d0c7e0c826mr4846372pll.17.1702557216947; Thu, 14 Dec 2023 04:33:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702557216; cv=none; d=google.com; s=arc-20160816; b=DZNW5g+ElD+d+WJgx6Jgq7IbemR416PDc2AGJty6aIwkBdPtuflo64E3JZXw2ck7sw tjQYh57gVUUFHwMi/xL9/kkTGm2t4UUPTB7C/G573O/QZ/9DDkznl7TwEyNejdjw//5W WEKRXFvoAPVVWGMAxOZ2yKLqisc15Zb7t2gJ7bpoAqmlfLEExgp+jNvqNLHfAVFCnfnZ LKp9fGgjXaGxOGecmksPG/z6GVKtjILaH4sI6aW+bf10gKaDdNa7FPcdhinGBBAiR9jL BB5KooK+Y6GON6fDP6jv5SrDz04sZ/slKFG9YmkvHX2kvemI+rXLGLdEEwvAZVb3GHpL usEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=m3mUXWMvE1CbiBSf6/fyaZFBnvN1JIgT1dnBWraAosw=; fh=2C1f0j/nzSygmX2ABc+8OQYD53hkUy28AVWbjAwc8E0=; b=AIjSRKa5QptTd0vLoUXhGxfiKpB6ojvZySENCLSq1Nrjm5L+doxyd6O0zONRaTx0wj CR9E66m4Qf+n1bEFMFGTTVQA3tmV/sjR2NWE07rLTS9wwoV7Flv86zCWzuIs4d5qTUmQ 6ZXjGC+sGhERbs7IUfeqLGnWunYZr1XH7Cgp3xTzhkFbz47xVElukweLLdSQNw88oaWN /rxI8NWcvM1RfcVt5bfEdPckG25gOSnWIC7eKd2wdUAR4/fyqXj+kOZxbfXrdZEFATou Oo4MAPJYzm2j5+7d4NFXgQzV59+l8wNHGSOazpc5Do2Ng1CPIzQ4HTjxLBN7sY2rNm9A 0LMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id d9-20020a170902b70900b001cfb1e21bcdsi11229776pls.539.2023.12.14.04.33.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 04:33:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7D2178025D42; Thu, 14 Dec 2023 04:33:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573055AbjLNMdV (ORCPT + 99 others); Thu, 14 Dec 2023 07:33:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573076AbjLNMdU (ORCPT ); Thu, 14 Dec 2023 07:33:20 -0500 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E0DF116; Thu, 14 Dec 2023 04:33:24 -0800 (PST) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R571e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=tianruidong@linux.alibaba.com;NM=1;PH=DS;RN=15;SR=0;TI=SMTPD_---0VyUUufW_1702557199; Received: from localhost(mailfrom:tianruidong@linux.alibaba.com fp:SMTPD_---0VyUUufW_1702557199) by smtp.aliyun-inc.com; Thu, 14 Dec 2023 20:33:21 +0800 From: Ruidong Tian To: linux-kernel@vger.kernel.org Cc: james.clark@arm.com, coresight@lists.linaro.org, suzuki.poulose@arm.com, mike.leach@linaro.org, alexander.shishkin@linux.intel.com, linux-arm-kernel@lists.infradead.org, adrian.hunter@intel.com, linux-perf-users@vger.kernel.org, leo.yan@linaro.org, al.grant@arm.com, mathieu.poirier@linaro.org, tor@ti.com, acme@redhat.com, Ruidong Tian Subject: [PATCH 2/3] perf scripts python: arm-cs-trace-disasm.py: set start vm addr of exectable file to 0 Date: Thu, 14 Dec 2023 20:33:03 +0800 Message-Id: <20231214123304.34087-3-tianruidong@linux.alibaba.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20231214123304.34087-1-tianruidong@linux.alibaba.com> References: <20231214123304.34087-1-tianruidong@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 14 Dec 2023 04:33:35 -0800 (PST) For exectable ELF file, which e_type is ET_EXEC, dso start address is a absolute address other than offset. Just set vm_start to zero when dso start is 0x400000, which means it is a exectable file. Signed-off-by: Ruidong Tian --- tools/perf/scripts/python/arm-cs-trace-disasm.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/perf/scripts/python/arm-cs-trace-disasm.py b/tools/perf/scripts/python/arm-cs-trace-disasm.py index 46bf6b02eea1..c9e14af5b58c 100755 --- a/tools/perf/scripts/python/arm-cs-trace-disasm.py +++ b/tools/perf/scripts/python/arm-cs-trace-disasm.py @@ -260,8 +260,9 @@ def process_event(param_dict): if (options.objdump_name != None): # It doesn't need to decrease virtual memory offset for disassembly - # for kernel dso, so in this case we set vm_start to zero. - if (dso == "[kernel.kallsyms]"): + # for kernel dso and executable file dso, so in this case we set + # vm_start to zero. + if (dso == "[kernel.kallsyms]" or dso_start == 0x400000): dso_vm_start = 0 else: dso_vm_start = int(dso_start) -- 2.33.1