Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp40249rwl; Thu, 13 Apr 2023 20:28:33 -0700 (PDT) X-Google-Smtp-Source: AKy350ZU3ps4sJg0Bcp/8IzbMyZf6vfAmwPxFRgTiHw02Z2ETNEQOkj1KFCQddsUyfVd2taPxWz9 X-Received: by 2002:a05:6a00:1946:b0:627:e577:4331 with SMTP id s6-20020a056a00194600b00627e5774331mr6086955pfk.1.1681442913295; Thu, 13 Apr 2023 20:28:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681442913; cv=none; d=google.com; s=arc-20160816; b=i5cDyqyHsN44F2Aus1fNN3SVvajvMYwJdPH5AGEwmpKsR/bT7IygtKhUiDFMLJrSmX RZ+yROvbKtQAuh8bmUmUv9+ZxlzSQiKvrBXi7vgwyoFoS+VCCIr6nxAuBNtCShRI6ZuD XZKBeVul75qdrYjdf02sbLfHfoLzDmDyail/Hw3v8JSZrysymZMD/yp+spSUjY9/tWhd qgnTKvKAmoJ10B65vV31ynIfMpWSz7ip+lKbwbWo5yct+/PG7XNKlr5rC9/RiYhX5Qio nHb8T9tM0oLyXxjN7wAuxCaTUT4+AFQcxVNGTdisXt2YmuBz0UHUQnZxOKXmrjWhzlZ3 MNyA== 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=xQGK1KFKND0Hwq2LZRGHVB81pWm+Xm6PzLQ8PESJGnI=; b=bF+tHnOBFzLFB9sLdZdfl4VhR59iuJftRpVmtFO5o241tG7xd6trYmEn4/tQ+WKNjd bhgbcL4fyhX1927S0rweHVjmaYkBOoULnxMP14Nsj52lCnipByO6lCKNwzl0Uc3fydBB XuwDOovfqjZ6XngQwUGhd8wyjNd0X5SvU2hHSbHpGv0ZM8WLp5dT71q/TsqyGsU4DTj4 6RtX4+x6srn0MdaVIQRrl5eHEyou4xGlgnrUfZkBtHsLFOGMKYXRI9TNC6JXdFRw/h5H 30VPhrW4dRdZakYAbXI3L/E2VFg41sq4bs6QSLAlJVAkRfEsJ12okmAEduJzm15HRTEh wfcw== 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 193-20020a6218ca000000b00625edf717besi3267554pfy.259.2023.04.13.20.28.21; Thu, 13 Apr 2023 20:28:33 -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 S229814AbjDND0O (ORCPT + 99 others); Thu, 13 Apr 2023 23:26:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjDND0K (ORCPT ); Thu, 13 Apr 2023 23:26:10 -0400 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A2782D57; Thu, 13 Apr 2023 20:26:08 -0700 (PDT) Received: from kwepemi500013.china.huawei.com (unknown [172.30.72.57]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4PyMFc6xQVz17SJk; Fri, 14 Apr 2023 11:22:28 +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, 14 Apr 2023 11:26:04 +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 v4 0/2] perf script: Have consistent output for symbol address Date: Fri, 14 Apr 2023 11:25:45 +0800 Message-ID: <20230414032547.2767909-1-changbin.du@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.110.54.157] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemi500013.china.huawei.com (7.221.188.120) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS 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 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. 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 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 | 25 +++++++++++++++++++++++- tools/perf/util/evsel_fprintf.c | 15 +++++++------- tools/perf/util/evsel_fprintf.h | 1 + 4 files changed, 34 insertions(+), 9 deletions(-) -- 2.25.1