Skip to contentSkip to conversation

perf tools: Seek to the end of the header area

tip:perfcounters/core tip-bot for Ingo Molnar 1 participant 1 message Sep 3, 2009 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  2e01d1791168bb824226d8cc70e50374767dcc42
Gitweb:     http://git.kernel.org/tip/2e01d1791168bb824226d8cc70e50374767dcc42
Author:     Ingo Molnar <[email protected]>
AuthorDate: Thu, 3 Sep 2009 16:21:11 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Thu, 3 Sep 2009 16:21:11 +0200

perf tools: Seek to the end of the header area

Leave the input fd at the data area.

It does not matter right now - but seeking at the end of it certainly did not make sense.

Cc: Peter Zijlstra <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
LKML-Reference: <new-submission>

---
 tools/perf/util/header.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/perf/util/header.c +1 -1
index a37a222..ec4d4c2 100644
@@ -237,7 +237,7 @@ struct perf_header *perf_header__read(int fd)
 	self->data_offset = f_header.data.offset;
 	self->data_size   = f_header.data.size;
 
-	lseek(fd, self->data_offset + self->data_size, SEEK_SET);
+	lseek(fd, self->data_offset, SEEK_SET);
 
 	self->frozen = 1;