Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp4828034rwe; Mon, 17 Apr 2023 20:19:53 -0700 (PDT) X-Google-Smtp-Source: AKy350bSVAgS/tK0DF6peIz3dMXHEq6VIaFS16YykTa2ZFvOaI1NzGfBK/yMAnpgf6yMdC64kFbI X-Received: by 2002:a17:903:32ce:b0:1a4:f7c9:33e7 with SMTP id i14-20020a17090332ce00b001a4f7c933e7mr844842plr.1.1681787993004; Mon, 17 Apr 2023 20:19:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681787992; cv=none; d=google.com; s=arc-20160816; b=YSIRzB67JdokKK9bmtQ1wDYfG/+z1ZVBLTT5b0OyXp/g3cZa8bxRXR481GV+hocZxD Y2X5cNJzsFKdfCD8hIwLhKDnC7o1YJ8Jd46Un0y8LbNtxIrPkxk4eKP1e9Z5wTqPj3Ua iMSyAKFqxRQoWlA2hFsnM8XtN5fEzjx9LhaFv6Klp7hh81cvYNhEDqpk4GoVBMfQ984H gyH3i0DiVl4D8MY05jvOQ1P1SgtfuJ5lG4gsowZV35+Ac1eKAmXlsYFMJV5xy9wITolF omDoqqXkSLvcIq4QKDV+4WyDGIiIdfB0M2Pn56hSpwER1XBzEQ0Gyka5XmrmAxGbFn7N bVBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Im3cDw6FuKoOYlwLK+ZiBYqmoYTB/8t5oDuMYhOPpYY=; b=VEfmYGNVSCOlTMNdU7LryFu9UgEBubXH3Cfe8YKmcm7/8kZEdPsl1UckSr4jo+bl7z 2eHB3OQvIlLD6FHM5kspc5yDOGf6CiHwUMmAuEevevK6j6a6MnySad5Nzm1bsBQgszkE udma8eYOzBJml56X0KL5sCW1btAyY48NdNWNITtD9MvD7SlHOOKdUHN3ggcUxELtQmXY +5OodoTjL6CWHjbWGmlFW1UgiFG6g/QD9AV8jvIE0W1pERvF5kv4ybdM7Sl1qQ4Zmk9Q CUtqdxEiT3fkogVqxP1Z97nv3x0H9vTqlQ3XeP/1X5vLiaZbN630/kcospx5aDtn8Sz2 15QQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u9-20020a170902b28900b00194bcc88b52si12678853plr.363.2023.04.17.20.19.41; Mon, 17 Apr 2023 20:19:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230245AbjDRDSp (ORCPT + 99 others); Mon, 17 Apr 2023 23:18:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230053AbjDRDSf (ORCPT ); Mon, 17 Apr 2023 23:18:35 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5D1E19A7; Mon, 17 Apr 2023 20:18:34 -0700 (PDT) Received: from kwepemi500013.china.huawei.com (unknown [7.221.188.120]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Q0pyG74F3zKsPW; Tue, 18 Apr 2023 11:17:42 +0800 (CST) Received: from M910t (10.110.54.157) by kwepemi500013.china.huawei.com (7.221.188.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 18 Apr 2023 11:18:31 +0800 Date: Tue, 18 Apr 2023 11:18:16 +0800 From: Changbin Du To: Changbin Du CC: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , , , Hui Wang Subject: Re: [PATCH v5 0/2] perf script: Have consistent output for symbol address Message-ID: <20230418031816.cm7yzbnvfonwdoub@M910t> References: <20230418031519.1261310-1-changbin.du@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230418031519.1261310-1-changbin.du@huawei.com> X-Originating-IP: [10.110.54.157] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To kwepemi500013.china.huawei.com (7.221.188.120) X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 oops, I missed one patch. please ignore this. On Tue, Apr 18, 2023 at 11:15:17AM +0800, Changbin Du wrote: > The goal of this change is to achieve consistent output for symbol address. > Before this, the raw ip is printed for non-callchain and dso offset for > callchain. Mostly what we expect is the raw ip. > > This patch does two changes: > - Always print raw ip for resolved symbols. > - Add a new 'dsoff' field if we really need the dso offset, and the > offset is appended to dso name. > > v5: > o add helper map__fprintf_dsoname_dsoff() to eliminate repeated dso printing code. (Adrian) > o do not print offset for kernel dso (a.k.a [kernel.kallsyms]) > v4: > o also print 'dsoff' for brstack,brstacksym,brstackoff,etc. > v3: > o 'dsoff' implys 'dso' field. (Namhyung) > v2: > o split into two patches. (Adrian) > o do not print offset for unresolved symbols. (Adrian) > > Changbin Du (2): > perf: add helper map__fprintf_dsoname_dsoff > perf: script: add new output field 'dsoff' to print dso offset > > tools/perf/Documentation/perf-script.txt | 2 +- > tools/perf/builtin-script.c | 60 ++++++++++-------------- > tools/perf/util/evsel_fprintf.c | 16 +++---- > tools/perf/util/evsel_fprintf.h | 1 + > tools/perf/util/map.c | 13 +++++ > tools/perf/util/map.h | 1 + > 6 files changed, 46 insertions(+), 47 deletions(-) > > -- > 2.25.1 > -- Cheers, Changbin Du