Received: by 2002:a05:7412:8d09:b0:fa:4c10:6cad with SMTP id bj9csp194684rdb; Mon, 15 Jan 2024 18:09:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKjPTbKRvYfZMlMXjS7xFOFNSZWPwhHpxuRtxJsaoGaUS0Kg3jFz9WHSQySRm2Gg9MNwyM X-Received: by 2002:a05:622a:1648:b0:429:d91b:89f0 with SMTP id y8-20020a05622a164800b00429d91b89f0mr6859450qtj.128.1705370996685; Mon, 15 Jan 2024 18:09:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705370996; cv=none; d=google.com; s=arc-20160816; b=NpBdw+rNyg+c+4aYSbe5CUjr4IOgmaEFXKEYws9KoEVuLj7R9dsSdxq1MGKW7/g6nx 2Z39X/jvOJX+CiTw4XSst9NaFTeP3S6iw/KZ5PYRaW7MTNrdG6EA2Eq4dXARPykakA7q LRI8iY3o0maZNTOpzDbh3StNuPhSbatP3s3RBHhnxQ1/gZ8N05AqeOjbhsbl8q7kRsfq C4G5Lip0dA5m8dB4kzd//110IdJXOxB2CJIbJXK6mbbii5RJ0FlSs7DGc+R7LOZrOnSU yTvtzHT64hfWjJuhc/4pD/v6IK7Ro8NyCNDHzV1BRs0XkTOX6r5A6GQOVUyGusNhuqJQ UzUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=m3mUXWMvE1CbiBSf6/fyaZFBnvN1JIgT1dnBWraAosw=; fh=2C1f0j/nzSygmX2ABc+8OQYD53hkUy28AVWbjAwc8E0=; b=J0k8I+dF/+y+WQBnlxpA1g8+KOIKMv0aLiwdfyNB/+mEaG8p10B3OLp0vpizf4Pfub 72eL7xPzPKS8s7zR5OnwsfXpvSjT/Q6KHVlllZwBtrMLobrsPLoZJbbzakolhRQaUTMp /0PHOR359lzwCUfFI58S5Mepvzp6ZJl1tZ4yX9x3u3Zl2k5UViS0l8SUDo/gCg61ANza Cdms8tsXC41KBxoeTc++c2m4U5OoCpm0dMjpUBWBYjP/hRIk6ip/dFIcjVD1DuPTLUvE QzYJxisB9nIgnEdWDkJApU1kODkfQA2aky5lHtsZYvTXlmUNiZnDsOVaI1HjPwg9LfKQ W0oQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-26920-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26920-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a15-20020ac85b8f000000b00429f4fe7740si2263125qta.517.2024.01.15.18.09.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 18:09:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26920-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-26920-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26920-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 736541C22D17 for ; Tue, 16 Jan 2024 02:09:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F07208826; Tue, 16 Jan 2024 02:09:12 +0000 (UTC) Received: from out30-110.freemail.mail.aliyun.com (out30-110.freemail.mail.aliyun.com [115.124.30.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B1F7613C; Tue, 16 Jan 2024 02:09:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R401e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=tianruidong@linux.alibaba.com;NM=1;PH=DS;RN=15;SR=0;TI=SMTPD_---0W-kLked_1705370944; Received: from localhost(mailfrom:tianruidong@linux.alibaba.com fp:SMTPD_---0W-kLked_1705370944) by smtp.aliyun-inc.com; Tue, 16 Jan 2024 10:09:06 +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 v3 2/3] perf scripts python: arm-cs-trace-disasm.py: set start vm addr of exectable file to 0 Date: Tue, 16 Jan 2024 10:08:53 +0800 Message-Id: <20240116020854.56030-3-tianruidong@linux.alibaba.com> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20240116020854.56030-1-tianruidong@linux.alibaba.com> References: <20231214123304.34087-1-tianruidong@linux.alibaba.com> <20240116020854.56030-1-tianruidong@linux.alibaba.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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