diff options
author | 2020-10-13 21:24:35 +0200 | |
---|---|---|
committer | 2020-10-14 08:46:02 -0300 | |
commit | 3ff1b8c8cc123f21828ff9538f13f1770a9a4099 (patch) | |
tree | 49e0feac476f5bbd3a3355cae92afdf24e7665b1 /tools/perf/util/dso.c | |
parent | perf tools: Pass build_id object to filename__read_build_id() (diff) | |
download | linux-3ff1b8c8cc123f21828ff9538f13f1770a9a4099.tar.gz linux-3ff1b8c8cc123f21828ff9538f13f1770a9a4099.tar.bz2 linux-3ff1b8c8cc123f21828ff9538f13f1770a9a4099.zip |
perf tools: Pass build id object to sysfs__read_build_id()
Passing build id object to sysfs__read_build_id function, so it can
populate the size of the build_id object.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20201013192441.1299447-4-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/dso.c')
-rw-r--r-- | tools/perf/util/dso.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index d2c1ed08c879..e87fa9a71d9f 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -1346,8 +1346,7 @@ void dso__read_running_kernel_build_id(struct dso *dso, struct machine *machine) if (machine__is_default_guest(machine)) return; sprintf(path, "%s/sys/kernel/notes", machine->root_dir); - if (sysfs__read_build_id(path, dso->bid.data, - sizeof(dso->bid.data)) == 0) + if (sysfs__read_build_id(path, &dso->bid) == 0) dso->has_build_id = true; } @@ -1365,8 +1364,7 @@ int dso__kernel_module_get_build_id(struct dso *dso, "%s/sys/module/%.*s/notes/.note.gnu.build-id", root_dir, (int)strlen(name) - 1, name); - if (sysfs__read_build_id(filename, dso->bid.data, - sizeof(dso->bid.data)) == 0) + if (sysfs__read_build_id(filename, &dso->bid) == 0) dso->has_build_id = true; return 0; |