diff options
author | Jiri Olsa <jolsa@kernel.org> | 2020-10-13 22:24:36 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-10-14 14:46:22 +0300 |
commit | bf5411695a31f7bf07c3e9bad27b442c9224f2a9 (patch) | |
tree | cd090bfab920392d0267adeda271f5024558e531 /tools/perf/util/build-id.h | |
parent | 3ff1b8c8cc123f21828ff9538f13f1770a9a4099 (diff) | |
download | linux-bf5411695a31f7bf07c3e9bad27b442c9224f2a9.tar.xz |
perf tools: Pass build_id object to build_id__sprintf()
Passing build_id object to build_id__sprintf function, so it can operate
with the proper size of build id.
This will create proper md5 build id readable names,
like following:
a50e350e97c43b4708d09bcd85ebfff7
instead of:
a50e350e97c43b4708d09bcd85ebfff700000000
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20201013192441.1299447-5-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/build-id.h')
-rw-r--r-- | tools/perf/util/build-id.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/util/build-id.h b/tools/perf/util/build-id.h index 5033e96d5c9d..f293f99d5dba 100644 --- a/tools/perf/util/build-id.h +++ b/tools/perf/util/build-id.h @@ -19,7 +19,8 @@ extern struct perf_tool build_id__mark_dso_hit_ops; struct dso; struct feat_fd; -int build_id__sprintf(const u8 *build_id, int len, char *bf); +void build_id__init(struct build_id *bid, const u8 *data, size_t size); +int build_id__sprintf(const struct build_id *build_id, char *bf); int sysfs__sprintf_build_id(const char *root_dir, char *sbuild_id); int filename__sprintf_build_id(const char *pathname, char *sbuild_id); char *build_id_cache__kallsyms_path(const char *sbuild_id, char *bf, |