From: Jiri Olsa <jolsa@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Ingo Molnar <mingo@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Namhyung Kim <namhyung@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Michael Petlan <mpetlan@redhat.com>,
Ian Rogers <irogers@google.com>,
Stephane Eranian <eranian@google.com>
Subject: [PATCHv2 0/9] perf tools: Add support for build id with different sizes
Date: Tue, 13 Oct 2020 21:24:32 +0200 [thread overview]
Message-ID: <20201013192441.1299447-1-jolsa@kernel.org> (raw)
hi,
currently we support only one storage size (20 bytes) for build
ids. That fits for SHA1 build ids, but there can in theory be
any size. The gcc linker supports also MD5, which is 16 bytes.
Currently the MD5 build id will be stored in .debug cache with
additional zeros, like:
$ find ~/.debug
.../.debug/.build-id/a5/0e350e97c43b4708d09bcd85ebfff700000000
...
.../buildid-ex-md5/a50e350e97c43b4708d09bcd85ebfff700000000
.../buildid-ex-md5/a50e350e97c43b4708d09bcd85ebfff700000000/elf
.../buildid-ex-md5/a50e350e97c43b4708d09bcd85ebfff700000000/probes
And the same reflected in buildid-list as well:
$ perf buildid-list
17f4e448cc746582ea1881528deb549f7fdb3fd5 [kernel.kallsyms]
a50e350e97c43b4708d09bcd85ebfff700000000 .../buildid-ex-md5
This will cause problems in future when we will ask debuginfod
for binaries/debuginfo based on build id.
This patchset is adding 'struct build_id' object, that holds
the build id data and size and use it to store build ids and
changes all related functions to use it.
Also available in:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/build_id_size
v2 changes:
- rebased on current perf/core
- updated test to build its own binaries [Namhyung]
thanks,
jirka
---
Jiri Olsa (9):
perf tools: Use build_id object in dso
perf tools: Pass build_id object to filename__read_build_id
perf tools: Pass build id object to sysfs__read_build_id
perf tools: Pass build_id object to build_id__sprintf
perf tools: Pass build_id object to dso__set_build_id
perf tools: Pass build_id object to dso__build_id_equal
perf tools: Add size to struct perf_record_header_build_id
perf tools: Align buildid list output for short build ids
perf tools: Add build id shell test
tools/lib/perf/include/perf/event.h | 12 +++++++++++-
tools/perf/bench/inject-buildid.c | 4 ++--
tools/perf/builtin-buildid-cache.c | 25 ++++++++++++------------
tools/perf/builtin-inject.c | 4 +---
tools/perf/tests/pe-file-parsing.c | 10 +++++-----
tools/perf/tests/sdt.c | 6 +++---
tools/perf/tests/shell/buildid.sh | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tools/perf/util/annotate.c | 3 +--
tools/perf/util/build-id.c | 48 +++++++++++++++++++++++++++-------------------
tools/perf/util/build-id.h | 8 +++++++-
tools/perf/util/dso.c | 23 ++++++++++------------
tools/perf/util/dso.h | 7 +++----
tools/perf/util/dsos.c | 9 +++++----
tools/perf/util/header.c | 15 ++++++++++-----
tools/perf/util/map.c | 4 +---
tools/perf/util/probe-event.c | 9 ++++++---
tools/perf/util/probe-finder.c | 8 +++++---
tools/perf/util/scripting-engines/trace-event-python.c | 2 +-
tools/perf/util/symbol-elf.c | 35 +++++++++++++++++++--------------
tools/perf/util/symbol-minimal.c | 31 +++++++++++++++---------------
tools/perf/util/symbol.c | 15 +++++++--------
tools/perf/util/symbol.h | 5 +++--
tools/perf/util/synthetic-events.c | 2 +-
23 files changed, 260 insertions(+), 126 deletions(-)
create mode 100755 tools/perf/tests/shell/buildid.sh
next reply other threads:[~2020-10-13 19:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-13 19:24 Jiri Olsa [this message]
2020-10-13 19:24 ` [PATCH 1/9] perf tools: Use build_id object in dso Jiri Olsa
2020-10-13 19:24 ` [PATCH 2/9] perf tools: Pass build_id object to filename__read_build_id Jiri Olsa
2020-10-13 19:24 ` [PATCH 3/9] perf tools: Pass build id object to sysfs__read_build_id Jiri Olsa
2020-10-13 19:24 ` [PATCH 4/9] perf tools: Pass build_id object to build_id__sprintf Jiri Olsa
2020-10-13 19:24 ` [PATCH 5/9] perf tools: Pass build_id object to dso__set_build_id Jiri Olsa
2020-10-14 11:51 ` Arnaldo Carvalho de Melo
2020-10-14 11:59 ` Jiri Olsa
2020-10-13 19:24 ` [PATCH 6/9] perf tools: Pass build_id object to dso__build_id_equal Jiri Olsa
2020-10-13 19:24 ` [PATCH 7/9] perf tools: Add size to struct perf_record_header_build_id Jiri Olsa
2020-10-14 11:59 ` Arnaldo Carvalho de Melo
2020-10-14 13:21 ` Jiri Olsa
2020-10-14 15:32 ` Arnaldo Carvalho de Melo
2020-10-14 14:24 ` Arnaldo Carvalho de Melo
2020-10-13 19:24 ` [PATCH 8/9] perf tools: Align buildid list output for short build ids Jiri Olsa
2020-10-13 19:24 ` [PATCH 9/9] perf tools: Add build id shell test Jiri Olsa
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=20201013192441.1299447-1-jolsa@kernel.org \
--to=jolsa@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@kernel.org \
--cc=mpetlan@redhat.com \
--cc=namhyung@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.