From bf5411695a31f7bf07c3e9bad27b442c9224f2a9 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Tue, 13 Oct 2020 21:24:36 +0200 Subject: 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 Acked-by: Ian Rogers Link: https://lore.kernel.org/r/20201013192441.1299447-5-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/header.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tools/perf/util/header.c') diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index cde8f6eba479..fe220f01fc94 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c @@ -2095,8 +2095,7 @@ static int __event_process_build_id(struct perf_record_header_build_id *bev, free(m.name); } - build_id__sprintf(dso->bid.data, sizeof(dso->bid.data), - sbuild_id); + build_id__sprintf(&dso->bid, sbuild_id); pr_debug("build id event received for %s: %s\n", dso->long_name, sbuild_id); dso__put(dso); -- cgit v1.2.3-59-g8ed1b