Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3780902rwl; Mon, 10 Apr 2023 00:31:10 -0700 (PDT) X-Google-Smtp-Source: AKy350a2faAsy8xzSzYsNwY4P8E6O4cVm0uZlgr/u4PLDLQQKXeyEiZT/Y73r92f+SvsSYEDOadj X-Received: by 2002:a17:906:e15:b0:94a:54ad:b36b with SMTP id l21-20020a1709060e1500b0094a54adb36bmr4631562eji.77.1681111870737; Mon, 10 Apr 2023 00:31:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681111870; cv=none; d=google.com; s=arc-20160816; b=VcMHzbfJkx41NJyVCG7Jn/QeqPI1iA8efiNddlOTdf1E7Sn6QwzUq2xHc7Vqkwo1ai D5oDHXyhhwcPk74Xoj/QJTP5AjKbfh4duny0J9ZdF4j1aqGCeZCN+ykH0p41cGrVijob +Lv1tuj5Iy5Ye9eJAPHats/PKl49ykwd6j41lF77ROD9Dg9gAyWnDtKYGYQbbEeq0/NI SW94MRSWob60MT6dk5TgsgeECHti1qnpblQDGa7aAxQpYcrzJuiDbwx08iYdtYY1QdfG 6rDlYAddpiEbrW9zrjJLoMKJcpl3OkDS1eWEXqlPj/TwNMH31OXWrTm888sVU7hfDskY wpkQ== 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=Yi6SrYzJoTsMGyjKcYO5VNtpEsgjDYKqMjKmdTiav/U=; b=MUAVgQJzmfJjYJ6zJITprx7ESS/3LpRd963ARSP53uSugY/8wakOkS0KfK/4RsW4IM 0tQLeqvtjREoi+0AxCX5LidVkzAbSI5FBYVA4UTmKg3+sG+nd626vAb/s5x6z/CGRiqq B8UQcDYJeeX9vP0Ub8oiR6cC7UEI5W7A5KolNbPP3WGXkoIx7Nh9D5cI7xrXGZKg9ViT txORwCFqyL/k6ira9Cfqth/bkhLZzIpEZeJenZHkqw4OHw/OOjeOHwB9oLabWWs2tAEe d9yjnq2BvVtX9NXbvz3Rvwtn6aCGGwxbHmeoQ2kpsJPNlDF2pen7VaW8WONFfffA7KOD P/Hw== 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 k16-20020a1709065fd000b0094a6f4ddb3csi2495626ejv.263.2023.04.10.00.30.46; Mon, 10 Apr 2023 00:31:10 -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 S229617AbjDJHJU (ORCPT + 99 others); Mon, 10 Apr 2023 03:09:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229502AbjDJHJS (ORCPT ); Mon, 10 Apr 2023 03:09:18 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2C8D30C8; Mon, 10 Apr 2023 00:09:17 -0700 (PDT) Received: from kwepemi500013.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Pw0RZ0pfPzrZnm; Mon, 10 Apr 2023 15:07:54 +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; Mon, 10 Apr 2023 15:09:13 +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 v3 0/2] perf script: Have consistent output for symbol address Date: Mon, 10 Apr 2023 15:08:56 +0800 Message-ID: <20230410070858.4051548-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: dggems704-chm.china.huawei.com (10.3.19.181) 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 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. 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 | 9 ++++++++- tools/perf/util/evsel_fprintf.c | 15 ++++++++------- tools/perf/util/evsel_fprintf.h | 1 + 4 files changed, 18 insertions(+), 9 deletions(-) -- 2.25.1