From mboxrd@z Thu Jan 1 00:00:00 1970 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 BF07EC4707C for ; Wed, 10 Jan 2024 12:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4UN3oz73ECQaolbjdmrVNg+IX5Yg38c6j5J6vG+XoMI=; b=pF39z3KffzTswW XWZEAH+ACtiRJ+sBOL2St0e5qNjSO5VjX9IB0fOzYtM/l8gyrlTg1mKs+gTB8Q19PIwZf4tTQq0bt ErKIH1Scp0I6ofpcQCI5ERzrurE/nt1Zb03vQ9+G88m96IKTi4L8ZA2YkczhDsuDzqqTDzJMbs+o/ t2t72j9xuGIi65wgEaZ3rApEY6R/uUyeiLs+UzVXjenHoSq0vwO6mejcZkKKt2yCb5oiD0B5Gw1VM JATW9WjpknwUEbJyHfQ8G8t3THk5yxgRvH4ca4X/JVUftvmA68C2I9OytLlYQZpX17KdwGfbMYAZU pynxQ4sGRBl49aK6r4jQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rNY7f-00Bpci-2z; Wed, 10 Jan 2024 12:55:55 +0000 Received: from mail-oi1-x235.google.com ([2607:f8b0:4864:20::235]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rNY7c-00BpZa-2I for linux-arm-kernel@lists.infradead.org; Wed, 10 Jan 2024 12:55:54 +0000 Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3bb53e20a43so3394089b6e.1 for ; Wed, 10 Jan 2024 04:55:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704891350; x=1705496150; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=i6TzB+1S72/tbeouoEj+W3sOgNQQ58sp+mssNH666Es=; b=zqEr3UO77W57gd6zJFktCB5HJrd2k5aF82eBAwMTqS/49eb+Q37ZvpVFkO90bw03IQ 9lUmTy3nyg/69x7Jc6wfoLewHsEAngWTyQZQ6/F8eCPXI+USj5j+rD2u8HFMyvq/4gcz 0x17hTf2XKmfc30v9egNnquIP3hFDTFxfZTw9KwysxVxgk6zMV8KEj9XgAT5ecWWiAGP rrJAzSv+9S257B5pkDfzhZe+f4AFmFboS8m55xtGVD4kR29zLehPYtFlNzezcwfOAeoG 1CLH02BXgUN8p+bnOsAn5uFvIOrlHx6Pv5xy+C/Sf2rNbYZSSZQxx1FijKoxLOM5gma3 jEOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704891350; x=1705496150; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=i6TzB+1S72/tbeouoEj+W3sOgNQQ58sp+mssNH666Es=; b=ozpfhVzWn1pXfnXKuMrMSHla6BcwkIzEirDXxku65mAovXoBqac4gakOEYn/d1lKZX b0yhtAlOd2mwJI5Q4jw/AwTJ9jxJHNeJywdZ1bINpWEpY6jr8mGf/T0qkU+7p6l71ryq MZRut6uZARUNShELUgMeFk670qCCrr2GtCc40oFvkZpVJkxySjkaCCQMSeSlcyuf3RQD 1vEYPrLiKEHzlIlWmU/S/C6j3p9BeBlq9dM1JGcx9sX4TgY9qxIJwIfZK+ecGWXz88gp gIMsD6tSTmDGllFo4Zy8imsukBAXPUxKOpbT/7tDERhkrfTMeaYEdxEcnUbSfneoscyn /ofg== X-Gm-Message-State: AOJu0YyVwGYEjyzZs76HJtl4FZqUim4BD5a6SASDmWyf6Bp53c+7B0A7 YhFShYnWA78/Vj/Dy6aymvaT8r44EURG1A== X-Google-Smtp-Source: AGHT+IEgtcj5HA/BznSC6a3oApaQxYzWJ2JZ5y0CrJqTQizybxpFHZlmbrOs2X7X9QrtSXq4r+wWVQ== X-Received: by 2002:a05:6808:1a03:b0:3bc:3046:94b1 with SMTP id bk3-20020a0568081a0300b003bc304694b1mr1309823oib.99.1704891350471; Wed, 10 Jan 2024 04:55:50 -0800 (PST) Received: from debian-dev (211-75-219-200.hinet-ip.hinet.net. [211.75.219.200]) by smtp.gmail.com with ESMTPSA id ff26-20020a056a002f5a00b006da73b90fe4sm3539241pfb.14.2024.01.10.04.55.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 04:55:49 -0800 (PST) Date: Wed, 10 Jan 2024 20:55:44 +0800 From: Leo Yan To: Ruidong Tian Cc: linux-kernel@vger.kernel.org, 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, al.grant@arm.com, mathieu.poirier@linaro.org, tor@ti.com, acme@redhat.com Subject: Re: [PATCH v2 1/1] perf scripts python: arm-cs-trace-disasm.py: add option to print virtual address Message-ID: <20240110125544.GG44@debian-dev> References: <20231214123304.34087-1-tianruidong@linux.alibaba.com> <20240110025617.66646-1-tianruidong@linux.alibaba.com> <20240110025617.66646-2-tianruidong@linux.alibaba.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240110025617.66646-2-tianruidong@linux.alibaba.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240110_045552_805152_97066A6D X-CRM114-Status: GOOD ( 20.94 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Ruidong, On Wed, Jan 10, 2024 at 10:56:17AM +0800, Ruidong Tian wrote: > arm-cs-trace-disasm just print offset for library dso now: > > 0000000000002200 : > 2200: d503201f nop > 2204: 8b020024 add x4, x1, x2 > 2208: 8b020005 add x5, x0, x2 > > Add a option `-a` to print virtual offset other than offset: > > # perf script -s scripts/python/arm-cs-trace-disasm.py -- -d llvm-objdump -a > ... > ffffb4c23200 : > ffffb4c23200: d503201f nop > ffffb4c23204: 8b020024 add x4, x1, x2 > ffffb4c23208: 8b020005 add x5, x0, x2 > ... > > Signed-off-by: Ruidong Tian > Signed-off-by: Leo Yan I only gave suggestion, it's no need to add my SoB and this might break the SoB chain and rejected by maintainers. So with removing my SoB, the patch is fine for me: Reviewed-by: Leo Yan I would like to suggest you to resend patch set v2 with all patches - though patches 02 and 03 have no any change, but it would be easier for maintainers to pick up the whole patches (especially this can save time with b4 tool). Thanks, Leo > --- > tools/perf/scripts/python/arm-cs-trace-disasm.py | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/tools/perf/scripts/python/arm-cs-trace-disasm.py b/tools/perf/scripts/python/arm-cs-trace-disasm.py > index d973c2baed1c..78419498237e 100755 > --- a/tools/perf/scripts/python/arm-cs-trace-disasm.py > +++ b/tools/perf/scripts/python/arm-cs-trace-disasm.py > @@ -36,7 +36,10 @@ option_list = [ > help="Set path to objdump executable file"), > make_option("-v", "--verbose", dest="verbose", > action="store_true", default=False, > - help="Enable debugging log") > + help="Enable debugging log"), > + make_option("-a", "--vaddr", dest="vaddr", > + action="store_true", default=False, > + help="Enable virtual address") > ] > > parser = OptionParser(option_list=option_list) > @@ -108,6 +111,14 @@ def print_disam(dso_fname, dso_start, start_addr, stop_addr): > m = disasm_re.search(line) > if m is None: > continue > + > + # Replace offset with virtual address > + if (options.vaddr == True): > + offset = re.search(r"^\s*([0-9a-fA-F]+)", line).group() > + if offset: > + virt_addr = dso_start + int(offset, 16) > + line = line.replace(offset.lstrip(), "%x" % virt_addr) > + > print("\t" + line) > > def print_sample(sample): > -- > 2.33.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel