From 954b09fd91acb1695b212a213874e4a8dd929ee6 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 20 Nov 2009 20:51:26 -0200 Subject: [PATCH] --- yaml --- r: 169708 b: refs/heads/master c: 78075caad99dc36ec6ef5826b7a5273ea14295fc h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/tools/perf/util/symbol.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 5cdc96ac884c..aa59be8c42a8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fd7a346ea292074e9f6cdb5232a57c56bf98fdc9 +refs/heads/master: 78075caad99dc36ec6ef5826b7a5273ea14295fc diff --git a/trunk/tools/perf/util/symbol.c b/trunk/tools/perf/util/symbol.c index d22030828c21..c324bdf8baba 100644 --- a/trunk/tools/perf/util/symbol.c +++ b/trunk/tools/perf/util/symbol.c @@ -884,6 +884,11 @@ static int dso__load_sym(struct dso *self, struct map *map, const char *name, return err; } +static bool dso__build_id_equal(const struct dso *self, u8 *build_id) +{ + return memcmp(self->build_id, build_id, sizeof(self->build_id)) == 0; +} + bool dsos__read_build_ids(void) { bool have_build_id = false; @@ -1099,8 +1104,7 @@ int dso__load(struct dso *self, struct map *map, symbol_filter_t filter) sizeof(build_id)) < 0) goto more; compare_build_id: - if (memcmp(build_id, self->build_id, - sizeof(self->build_id)) != 0) + if (!dso__build_id_equal(self, build_id)) goto more; }