diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-05-03 08:29:35 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-05-03 08:29:35 +0200 |
commit | 0806ebd974590ab24ab357d5d87db744e56bfe13 (patch) | |
tree | baf96726e3d9f8c2316e509e0a4cbc99ba5fe67a /tools/perf/util/trace-event-read.c | |
parent | 090f7204dfdb5d7f18208ea81dfdba845897cedd (diff) | |
parent | feef47d0cb530e8419dfa0b48141b538b89b1b1a (diff) | |
download | linux-0806ebd974590ab24ab357d5d87db744e56bfe13.tar.gz linux-0806ebd974590ab24ab357d5d87db744e56bfe13.tar.bz2 linux-0806ebd974590ab24ab357d5d87db744e56bfe13.zip |
Merge branch 'perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into perf/core
Diffstat (limited to 'tools/perf/util/trace-event-read.c')
-rw-r--r-- | tools/perf/util/trace-event-read.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/perf/util/trace-event-read.c b/tools/perf/util/trace-event-read.c index 43f19c1fed3a..cb54cd002f49 100644 --- a/tools/perf/util/trace-event-read.c +++ b/tools/perf/util/trace-event-read.c @@ -53,6 +53,12 @@ static unsigned long page_size; static ssize_t calc_data_size; static bool repipe; +/* If it fails, the next read will report it */ +static void skip(int size) +{ + lseek(input_fd, size, SEEK_CUR); +} + static int do_read(int fd, void *buf, int size) { int rsize = size; @@ -184,7 +190,6 @@ static void read_ftrace_printk(void) static void read_header_files(void) { unsigned long long size; - char *header_page; char *header_event; char buf[BUFSIZ]; @@ -194,10 +199,7 @@ static void read_header_files(void) die("did not read header page"); size = read8(); - header_page = malloc_or_die(size); - read_or_die(header_page, size); - parse_header_page(header_page, size); - free(header_page); + skip(size); /* * The size field in the page is of type long, |