Received: by 2002:a05:7412:d002:b0:f9:9049:d2ea with SMTP id bd2csp20738rdb; Wed, 20 Dec 2023 02:45:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IE1u7zdXEW/l7NdSFxo+6EVI4d9iHbr/FAs4iggaIjUD2kz7zPLPjLiQAwhlOPv81BqfdGZ X-Received: by 2002:a05:6214:1c45:b0:67f:66d:b573 with SMTP id if5-20020a0562141c4500b0067f066db573mr15678667qvb.5.1703069102904; Wed, 20 Dec 2023 02:45:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703069102; cv=none; d=google.com; s=arc-20160816; b=rxRxsJK3Q99JMnqu2EKSxChUv4G8gjeUTDEXr0CSan0QlaY3kqCxV8TYtV94Ioeaj9 RTLsS17vfKuEviXzi8tYGTD7qPbZ4Uz8AahIlcEf4FgoWXQaPgX+4lUtEq66IQhkxxFd VEFLbtRpxsVy40YePdTUu5n2B6CmP4G3uQzmxURL72uZyF84o4k+CfcNXaJm68ajewTG z6X2WuST4cPPyJ2I6AN1KNHl1cnnackYxhHaOLg122ZGtUOkO5hzog3lCFoZygPa1mE+ KU9hDp+Rfax6hwe1nxQDToIrNc2GVUgHAbglFC7G0+Y0RDdckJjnQ9G0fIyHLIahjhZp uyKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=izVbJYkYMhmzlIMoiw+W9pZuyDLCLCUkrfpdr0spfYA=; fh=ZFKVi2es5n47ouapEVqO1zmV1KHdoZ676SFGRdbsYmk=; b=wAAwAea3/VMrzTs+BZnDpr8EDZ6I4LhGC+wmRb6JBhYgs6BcIJ4QDfS/6F0fV7ImYk bPUdaQLomXH+0hqWURhCTo2kllduaE1nC8z9/L9R6M2vKm6qRsrEtiiSpUwvqlOVonwX /E6uFdN6zAx0ZnHboO0VSjlopj91KfQn5gAZ09/sWMRwIzFKTr9K8eGzgbw8myw6GNUQ Vf6U4AlTOT1qFzOsN9YLOa6lmcXb7dUXHj8VkRbAZx4G+juaP2GW33jI1XFiTrSkuTxa ngHOPBV46DexdWYyvnQ7E+C0ioM7ZvP3+Q7vw1mwCqW1fhWxIbYvHa8eXbWcht2n6srt PmKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-6767-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6767-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id s17-20020a0cdc11000000b0067f2f1c4680si9078135qvk.57.2023.12.20.02.45.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 02:45:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6767-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-6767-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6767-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.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 A46651C2564A for ; Wed, 20 Dec 2023 10:45:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B1D4C20B30; Wed, 20 Dec 2023 10:44:54 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BEF5920B0B; Wed, 20 Dec 2023 10:44:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E1A9D1FB; Wed, 20 Dec 2023 02:45:36 -0800 (PST) Received: from [192.168.1.3] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 779FD3F5A1; Wed, 20 Dec 2023 02:44:50 -0800 (PST) Message-ID: <912a39f4-025e-26a1-7786-091fa211f293@arm.com> Date: Wed, 20 Dec 2023 10:44:49 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH 1/3] perf scripts python: arm-cs-trace-disasm.py: print dso base address To: Ruidong Tian , linux-kernel@vger.kernel.org Cc: 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 References: <20231214123304.34087-1-tianruidong@linux.alibaba.com> <20231214123304.34087-2-tianruidong@linux.alibaba.com> Content-Language: en-US From: James Clark In-Reply-To: <20231214123304.34087-2-tianruidong@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 14/12/2023 12:33, Ruidong Tian wrote: > arm-cs-trace-disasm just print offset for library dso: > > 0000000000002200 : > 2200: d503201f nop > 2204: 8b020024 add x4, x1, x2 > 2208: 8b020005 add x5, x0, x2 > > This print DSO base address to get complete virtual address for > userspace application: > > 0000000000002200 : (base address is 0x0000ffffb4c21000) > 2200: d503201f nop > 2204: 8b020024 add x4, x1, x2 > 2208: 8b020005 add x5, x0, x2 > I believe the output format without the base address is consistent with objdump. For compatibility I would say that it's better to keep it that way. We could add this as an option, but have it disabled by default. I suppose it depends how likely that someone is using this output in a tool and processing it further whether an option is needed or not. Although it's also not that clear what this is useful for, given that all the other output is relative too? Maybe you could add an example to the commit message, even if it's just for debugging. Would an option that turned _all_ the output into virtual addresses not be more useful? Thanks James > Signed-off-by: Ruidong Tian > --- > tools/perf/scripts/python/arm-cs-trace-disasm.py | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/perf/scripts/python/arm-cs-trace-disasm.py b/tools/perf/scripts/python/arm-cs-trace-disasm.py > index d59ff53f1d94..46bf6b02eea1 100755 > --- a/tools/perf/scripts/python/arm-cs-trace-disasm.py > +++ b/tools/perf/scripts/python/arm-cs-trace-disasm.py > @@ -108,6 +108,8 @@ def print_disam(dso_fname, dso_start, start_addr, stop_addr): > m = disasm_re.search(line) > if m is None: > continue > + else: > + line += " (base address is 0x%016x)" % dso_start > print("\t" + line) > > def print_sample(sample):