Commit 84fe8488 authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by Ingo Molnar

perf symbols: Pass the offset to perf_header__read_build_ids()

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <1258396365-29217-1-git-send-email-acme@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 82164161
...@@ -70,11 +70,10 @@ process_event(event_t *event, unsigned long offset, unsigned long head) ...@@ -70,11 +70,10 @@ process_event(event_t *event, unsigned long offset, unsigned long head)
} }
} }
int perf_header__read_build_ids(int input, off_t size) int perf_header__read_build_ids(int input, off_t offset, off_t size)
{ {
struct build_id_event bev; struct build_id_event bev;
char filename[PATH_MAX]; char filename[PATH_MAX];
off_t offset = lseek(input, 0, SEEK_CUR);
off_t limit = offset + size; off_t limit = offset + size;
int err = -1; int err = -1;
......
...@@ -27,6 +27,6 @@ int mmap_dispatch_perf_file(struct perf_header **pheader, ...@@ -27,6 +27,6 @@ int mmap_dispatch_perf_file(struct perf_header **pheader,
int full_paths, int full_paths,
int *cwdlen, int *cwdlen,
char **cwd); char **cwd);
int perf_header__read_build_ids(int input, off_t file_size); int perf_header__read_build_ids(int input, off_t offset, off_t file_size);
#endif #endif
...@@ -359,7 +359,7 @@ static void perf_header__adds_read(struct perf_header *self, int fd) ...@@ -359,7 +359,7 @@ static void perf_header__adds_read(struct perf_header *self, int fd)
buildid_sec = &feat_sec[idx++]; buildid_sec = &feat_sec[idx++];
lseek(fd, buildid_sec->offset, SEEK_SET); lseek(fd, buildid_sec->offset, SEEK_SET);
if (perf_header__read_build_ids(fd, buildid_sec->size)) if (perf_header__read_build_ids(fd, buildid_sec->offset, buildid_sec->size))
pr_debug("failed to read buildids, continuing...\n"); pr_debug("failed to read buildids, continuing...\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment