aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/bench
diff options
context:
space:
mode:
authorJiri Olsa2020-10-13 21:24:34 +0200
committerArnaldo Carvalho de Melo2020-10-14 08:45:16 -0300
commitf766819cd5290d42efa55c505b9bed184fec17bf (patch)
treefaace7f54816f983cd14bcbee4479712a853d44c /tools/perf/bench
parent0aba7f036a56675b7fdc536757b4c49fc76a2208 (diff)
perf tools: Pass build_id object to filename__read_build_id()
Pass a build_id object to filename__read_build_id function, so it can populate the size of the build_id object. Changing filename__read_build_id() code for both ELF/non-ELF code. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20201013192441.1299447-3-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/bench')
-rw-r--r--tools/perf/bench/inject-buildid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/bench/inject-buildid.c b/tools/perf/bench/inject-buildid.c
index 3d048a8139a7..280227e3ffd7 100644
--- a/tools/perf/bench/inject-buildid.c
+++ b/tools/perf/bench/inject-buildid.c
@@ -84,7 +84,7 @@ static int add_dso(const char *fpath, const struct stat *sb __maybe_unused,
if (typeflag == FTW_D || typeflag == FTW_SL)
return 0;
- if (filename__read_build_id(fpath, bid.data, sizeof(bid.data)) < 0)
+ if (filename__read_build_id(fpath, &bid) < 0)
return 0;
dso->name = realpath(fpath, NULL);