aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-11-20 17:51:26 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-21 08:11:33 -0500
commit78075caad99dc36ec6ef5826b7a5273ea14295fc (patch)
tree35ea84516cedd4ab69a41b32e21f9165292e38e2 /tools/perf/util/symbol.c
parentfd7a346ea292074e9f6cdb5232a57c56bf98fdc9 (diff)
perf symbols: Introduce dso__build_id_equal
Will be used in more places. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frédéric Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <1258757489-5978-3-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/symbol.c')
-rw-r--r--tools/perf/util/symbol.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index d22030828c21..c324bdf8baba 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -884,6 +884,11 @@ out_close:
884 return err; 884 return err;
885} 885}
886 886
887static bool dso__build_id_equal(const struct dso *self, u8 *build_id)
888{
889 return memcmp(self->build_id, build_id, sizeof(self->build_id)) == 0;
890}
891
887bool dsos__read_build_ids(void) 892bool dsos__read_build_ids(void)
888{ 893{
889 bool have_build_id = false; 894 bool have_build_id = false;
@@ -1099,8 +1104,7 @@ more:
1099 sizeof(build_id)) < 0) 1104 sizeof(build_id)) < 0)
1100 goto more; 1105 goto more;
1101compare_build_id: 1106compare_build_id:
1102 if (memcmp(build_id, self->build_id, 1107 if (!dso__build_id_equal(self, build_id))
1103 sizeof(self->build_id)) != 0)
1104 goto more; 1108 goto more;
1105 } 1109 }
1106 1110