提交 78075caa 编写于 作者: A Arnaldo Carvalho de Melo 提交者: Ingo Molnar

perf symbols: Introduce dso__build_id_equal

Will be used in more places.
Signed-off-by: NArnaldo 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: NIngo Molnar <mingo@elte.hu>
上级 fd7a346e
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册