From 836231b4b0fb3d8958db694c4b8e6939e7935585 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 16 Nov 2009 16:32:41 -0200 Subject: [PATCH] --- yaml --- r: 169627 b: refs/heads/master c: 84fe8488ade7922afa9f3aa77c22d2d92beb9660 h: refs/heads/master i: 169625: 3f9b1a883c61bf15c2dd623bf331a7e84fd0d515 169623: 4081ef3a953c6011732447797daea2aac4621086 v: v3 --- [refs] | 2 +- trunk/tools/perf/util/data_map.c | 3 +-- trunk/tools/perf/util/data_map.h | 2 +- trunk/tools/perf/util/header.c | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 0ae1f9550a0e..980fabe63c9d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 82164161679c448f33092945ea97cb547a13683a +refs/heads/master: 84fe8488ade7922afa9f3aa77c22d2d92beb9660 diff --git a/trunk/tools/perf/util/data_map.c b/trunk/tools/perf/util/data_map.c index aacb814a4eff..14cb8465eb08 100644 --- a/trunk/tools/perf/util/data_map.c +++ b/trunk/tools/perf/util/data_map.c @@ -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; char filename[PATH_MAX]; - off_t offset = lseek(input, 0, SEEK_CUR); off_t limit = offset + size; int err = -1; diff --git a/trunk/tools/perf/util/data_map.h b/trunk/tools/perf/util/data_map.h index 20b4037a8236..ae036ecd7625 100644 --- a/trunk/tools/perf/util/data_map.h +++ b/trunk/tools/perf/util/data_map.h @@ -27,6 +27,6 @@ int mmap_dispatch_perf_file(struct perf_header **pheader, int full_paths, int *cwdlen, 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 diff --git a/trunk/tools/perf/util/header.c b/trunk/tools/perf/util/header.c index ebed4f44ed36..ca0d657eefad 100644 --- a/trunk/tools/perf/util/header.c +++ b/trunk/tools/perf/util/header.c @@ -359,7 +359,7 @@ static void perf_header__adds_read(struct perf_header *self, int fd) buildid_sec = &feat_sec[idx++]; 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"); }