aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/bench
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2020-10-13 21:24:33 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-10-14 08:44:47 -0300
commit0aba7f036a56675b7fdc536757b4c49fc76a2208 (patch)
tree02ec0c96f9e8f6d50aeaad0f29ea67ef0b0fd1a9 /tools/perf/bench
parentperf config: Export the perf_config_from_file() function (diff)
downloadlinux-dev-0aba7f036a56675b7fdc536757b4c49fc76a2208.tar.xz
linux-dev-0aba7f036a56675b7fdc536757b4c49fc76a2208.zip
perf tools: Use build_id object in dso
Replace build_id byte array with struct build_id object and all the code that references it. The objective is to carry size together with build id array, so it's better to keep both together. This is preparatory change for following patches, and there's no functional change. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20201013192441.1299447-2-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/bench/inject-buildid.c b/tools/perf/bench/inject-buildid.c
index e9a11f4a1109..3d048a8139a7 100644
--- a/tools/perf/bench/inject-buildid.c
+++ b/tools/perf/bench/inject-buildid.c
@@ -79,12 +79,12 @@ static int add_dso(const char *fpath, const struct stat *sb __maybe_unused,
int typeflag, struct FTW *ftwbuf __maybe_unused)
{
struct bench_dso *dso = &dsos[nr_dsos];
- unsigned char build_id[BUILD_ID_SIZE];
+ struct build_id bid;
if (typeflag == FTW_D || typeflag == FTW_SL)
return 0;
- if (filename__read_build_id(fpath, build_id, BUILD_ID_SIZE) < 0)
+ if (filename__read_build_id(fpath, bid.data, sizeof(bid.data)) < 0)
return 0;
dso->name = realpath(fpath, NULL);