diff options
author | Jiri Olsa <jolsa@kernel.org> | 2020-10-13 22:24:34 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-10-14 14:45:16 +0300 |
commit | f766819cd5290d42efa55c505b9bed184fec17bf (patch) | |
tree | faace7f54816f983cd14bcbee4479712a853d44c /tools/perf/builtin-inject.c | |
parent | 0aba7f036a56675b7fdc536757b4c49fc76a2208 (diff) | |
download | linux-f766819cd5290d42efa55c505b9bed184fec17bf.tar.xz |
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/builtin-inject.c')
-rw-r--r-- | tools/perf/builtin-inject.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c index a35cdabe5bd4..452a75fe68e5 100644 --- a/tools/perf/builtin-inject.c +++ b/tools/perf/builtin-inject.c @@ -522,10 +522,8 @@ static int dso__read_build_id(struct dso *dso) return 0; nsinfo__mountns_enter(dso->nsinfo, &nsc); - if (filename__read_build_id(dso->long_name, dso->bid.data, - sizeof(dso->bid.data)) > 0) { + if (filename__read_build_id(dso->long_name, &dso->bid) > 0) dso->has_build_id = true; - } nsinfo__mountns_exit(&nsc); return dso->has_build_id ? 0 : -1; |