perf tools: Pass build_id object to dso__build_id_equal()
Passing build_id object to dso__build_id_equal(), so we can properly check build id with different size than sha1. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20201013192441.1299447-7-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
8dfdf440d3
commit
39be8d0115
@@ -1332,9 +1332,10 @@ void dso__set_build_id(struct dso *dso, struct build_id *bid)
|
||||
dso->has_build_id = 1;
|
||||
}
|
||||
|
||||
bool dso__build_id_equal(const struct dso *dso, u8 *build_id)
|
||||
bool dso__build_id_equal(const struct dso *dso, struct build_id *bid)
|
||||
{
|
||||
return memcmp(dso->bid.data, build_id, sizeof(dso->bid.data)) == 0;
|
||||
return dso->bid.size == bid->size &&
|
||||
memcmp(dso->bid.data, bid->data, dso->bid.size) == 0;
|
||||
}
|
||||
|
||||
void dso__read_running_kernel_build_id(struct dso *dso, struct machine *machine)
|
||||
|
Reference in New Issue
Block a user