From: Changbin Du <changbin.du@huawei.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
<linux-perf-users@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, Hui Wang <hw.huiwang@huawei.com>,
Changbin Du <changbin.du@huawei.com>
Subject: [PATCH v5 0/3] perf script: Have consistent output for symbol address
Date: Tue, 18 Apr 2023 11:18:22 +0800 [thread overview]
Message-ID: <20230418031825.1262579-1-changbin.du@huawei.com> (raw)
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 (3):
perf script: print raw ip instead of binary offset for callchain
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 | 25 ++++------
tools/perf/util/evsel_fprintf.h | 1 +
tools/perf/util/map.c | 13 +++++
tools/perf/util/map.h | 1 +
6 files changed, 48 insertions(+), 54 deletions(-)
--
2.25.1
next reply other threads:[~2023-04-18 3:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 3:18 Changbin Du [this message]
2023-04-18 3:18 ` [PATCH v5 1/3] perf script: print raw ip instead of binary offset for callchain Changbin Du
2023-04-24 5:24 ` Adrian Hunter
2023-04-18 3:18 ` [PATCH v5 2/3] perf: add helper map__fprintf_dsoname_dsoff Changbin Du
2023-04-19 18:58 ` Adrian Hunter
2023-04-20 2:55 ` Changbin Du
2023-04-20 8:39 ` Adrian Hunter
2023-04-21 5:04 ` Changbin Du
2023-04-21 7:30 ` Adrian Hunter
2023-04-23 4:32 ` Changbin Du
2023-04-24 5:25 ` Adrian Hunter
2023-04-24 5:25 ` Adrian Hunter
2023-04-18 3:18 ` [PATCH v5 3/3] perf: script: add new output field 'dsoff' to print dso offset Changbin Du
2023-04-24 5:26 ` Adrian Hunter
2023-04-29 1:40 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230418031825.1262579-1-changbin.du@huawei.com \
--to=changbin.du@huawei.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=hw.huiwang@huawei.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®