perf tools: Read the build-ids from the header layer
Keep the build-ids reading implementation in the data mapping but move its call to the headers so that we have a better control on it (offset seeking, size passing, etc..). Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp> LKML-Reference: <1257911467-28276-4-git-send-email-fweisbec@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:

committed by
Ingo Molnar

parent
57f395a7ea
commit
4778d2e4f4
@@ -70,8 +70,8 @@ process_event(event_t *event, unsigned long offset, unsigned long head)
|
||||
}
|
||||
}
|
||||
|
||||
static int perf_header__read_build_ids(const struct perf_header *self,
|
||||
int input, off_t file_size)
|
||||
int perf_header__read_build_ids(const struct perf_header *self,
|
||||
int input, off_t file_size)
|
||||
{
|
||||
off_t offset = self->data_offset + self->data_size;
|
||||
struct build_id_event bev;
|
||||
@@ -163,10 +163,6 @@ int mmap_dispatch_perf_file(struct perf_header **pheader,
|
||||
if (curr_handler->sample_type_check(sample_type) < 0)
|
||||
exit(-1);
|
||||
|
||||
if (perf_header__has_feat(header, HEADER_BUILD_ID) &&
|
||||
perf_header__read_build_ids(header, input, input_stat.st_size))
|
||||
pr_debug("failed to read buildids, continuing...\n");
|
||||
|
||||
if (load_kernel(NULL) < 0) {
|
||||
perror("failed to load kernel symbols");
|
||||
return EXIT_FAILURE;
|
||||
|
Reference in New Issue
Block a user