aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-11-16 13:32:41 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-16 16:05:49 -0500
commit84fe8488ade7922afa9f3aa77c22d2d92beb9660 (patch)
treed2a5e1f091f2459e1ecebd2f286a04e5171f1978 /tools/perf
parent82164161679c448f33092945ea97cb547a13683a (diff)
perf symbols: Pass the offset to perf_header__read_build_ids()
Signed-off-by: Arnaldo 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: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/data_map.c3
-rw-r--r--tools/perf/util/data_map.h2
-rw-r--r--tools/perf/util/header.c2
3 files changed, 3 insertions, 4 deletions
diff --git a/tools/perf/util/data_map.c b/tools/perf/util/data_map.c
index aacb814a4eff..14cb8465eb08 100644
--- a/tools/perf/util/data_map.c
+++ b/tools/perf/util/data_map.c
@@ -70,11 +70,10 @@ process_event(event_t *event, unsigned long offset, unsigned long head)
70 } 70 }
71} 71}
72 72
73int perf_header__read_build_ids(int input, off_t size) 73int perf_header__read_build_ids(int input, off_t offset, off_t size)
74{ 74{
75 struct build_id_event bev; 75 struct build_id_event bev;
76 char filename[PATH_MAX]; 76 char filename[PATH_MAX];
77 off_t offset = lseek(input, 0, SEEK_CUR);
78 off_t limit = offset + size; 77 off_t limit = offset + size;
79 int err = -1; 78 int err = -1;
80 79
diff --git a/tools/perf/util/data_map.h b/tools/perf/util/data_map.h
index 20b4037a8236..ae036ecd7625 100644
--- a/tools/perf/util/data_map.h
+++ b/tools/perf/util/data_map.h
@@ -27,6 +27,6 @@ int mmap_dispatch_perf_file(struct perf_header **pheader,
27 int full_paths, 27 int full_paths,
28 int *cwdlen, 28 int *cwdlen,
29 char **cwd); 29 char **cwd);
30int perf_header__read_build_ids(int input, off_t file_size); 30int perf_header__read_build_ids(int input, off_t offset, off_t file_size);
31 31
32#endif 32#endif
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index ebed4f44ed36..ca0d657eefad 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -359,7 +359,7 @@ static void perf_header__adds_read(struct perf_header *self, int fd)
359 359
360 buildid_sec = &feat_sec[idx++]; 360 buildid_sec = &feat_sec[idx++];
361 lseek(fd, buildid_sec->offset, SEEK_SET); 361 lseek(fd, buildid_sec->offset, SEEK_SET);
362 if (perf_header__read_build_ids(fd, buildid_sec->size)) 362 if (perf_header__read_build_ids(fd, buildid_sec->offset, buildid_sec->size))
363 pr_debug("failed to read buildids, continuing...\n"); 363 pr_debug("failed to read buildids, continuing...\n");
364 } 364 }
365 365