From patchwork Fri Apr 7 05:52:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Changbin Du X-Patchwork-Id: 7862 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp75650vqo; Thu, 6 Apr 2023 23:03:56 -0700 (PDT) X-Google-Smtp-Source: AKy350bc7phLfU/qxZUPuSLMMBZhtUS548+xZMmlkXqnRj+R/4siwIO5hWP16Vw7j5rQ0NTdqNTr X-Received: by 2002:a17:902:ec85:b0:19e:7880:1c2 with SMTP id x5-20020a170902ec8500b0019e788001c2mr1682464plg.47.1680847435801; Thu, 06 Apr 2023 23:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680847435; cv=none; d=google.com; s=arc-20160816; b=ubUW5HhLG/F7Yzq4QvYSurgHTjDBI9fya/LgYzBl/5Ovt2me5FmkCoOp4SRX+1jQgS C4bYjX+e0lmpkl2efzF8tmusfGSTta++ibbZQ1Ge3sUvbXQi5qvKx0Lbi8cDc86aaNI5 08tsi0hsPl+cRc+7N+8b5IturL1bm4zsk2Cn7FQy6qVxBSRRRDUis4lKrjYhEJ5eDmn2 nngI6n1XjIws1XQ4IcgXQn5KTiuw4lZh2XaK8M0kOXcHoqZepVovUszJEBAN4dDYID+6 Us1X5d2mlPzGtibpf0iI4TYEBmMVqWzr/CY9jFqp/6ppQni3Em9GeNTCptMtCyIR91z/ mMRQ== 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 :message-id:date:subject:cc:to:from; bh=igm62VcCHOhf0C4oCPdftpXr4K4RBQ6GcvYLJurwG7Y=; b=WySeNBxiW9V33r85YmO0iAHbaer86BpuEo7NYC19+NG9WVkShSCPGc7VwGzdi0Oqrt MIfVY3IM4Lv7B4bvDpCraCJ/balTFHCc8O2kpAHFx8hsB91LMfR1EMK2T96ZTO2XnEOL QWfqFc3JQnMIrinpN0GcP5cqBeX17HxAq0KJ6S8J85lWxM1lFU5fgGfKRJ8aFjyhqUTC ErStKdAhVV9VTHZ9YkwkADO4vduovwWjK4Lu3rutRLJbjqb23dSW83G/8ztQjQ0XLrA8 QtYbpzYmWLXmwZDYGjQNj/cVm/glpDdEYbeBAkFK2ea6xotJIYLDjGCzeeRjSov9TB+j z3Lw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i5-20020a17090332c500b001a1b08aacedsi3520532plr.40.2023.04.06.23.03.43; Thu, 06 Apr 2023 23:03:55 -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 S231987AbjDGFwk (ORCPT + 99 others); Fri, 7 Apr 2023 01:52:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229506AbjDGFwj (ORCPT ); Fri, 7 Apr 2023 01:52:39 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 580559768; Thu, 6 Apr 2023 22:52:37 -0700 (PDT) Received: from kwepemi500013.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Pt6r24q8KznYFL; Fri, 7 Apr 2023 13:49:06 +0800 (CST) Received: from M910t.huawei.com (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; Fri, 7 Apr 2023 13:52:33 +0800 From: Changbin Du To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar CC: Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , , , Hui Wang , Changbin Du Subject: [PATCH v2 0/2] perf script: Have consistent output for symbol address Date: Fri, 7 Apr 2023 13:52:10 +0800 Message-ID: <20230407055212.2701635-1-changbin.du@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.110.54.157] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemi500013.china.huawei.com (7.221.188.120) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762496281291005030?= X-GMAIL-MSGID: =?utf-8?q?1762496281291005030?= 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. v2: o split into two patches. o do not print offset for unresolved symbols. Changbin Du (2): perf script: print raw ip instead of binary offset for callchain perf: script: add new output field 'dsoff' to print dso offset tools/perf/Documentation/perf-script.txt | 2 +- tools/perf/builtin-script.c | 5 +++++ tools/perf/util/evsel_fprintf.c | 15 ++++++++------- tools/perf/util/evsel_fprintf.h | 1 + 4 files changed, 15 insertions(+), 8 deletions(-)