]> git.baikalelectronics.ru Git - kernel.git/commit
perf: Use read() instead of lseek() in trace_event_read.c:skip()
authorTom Zanussi <tzanussi@gmail.com>
Wed, 5 May 2010 04:02:10 +0000 (23:02 -0500)
committerFrederic Weisbecker <fweisbec@gmail.com>
Thu, 20 May 2010 06:37:17 +0000 (08:37 +0200)
commit0d26bc6ca1cc4ddc4656a6f988d5f71287e74467
tree153901937a7ce3acffc536c48652e0d87a52685b
parentcd465fdfb4dfd1219ffe8752e1b17c81a196004e
perf: Use read() instead of lseek() in trace_event_read.c:skip()

This is a small fix for a problem affecting live-mode, introduced
recently:

root@tropicana:~# perf trace rwtop
perf trace started with Perl
script /root/libexec/perf-core/scripts/perl/rwtop.pl

  Fatal: did not read header event

commit 85fe510f7a22cd0b98e021b50296d321e40b0826 added a skip()
function to skip over e.g. header_page, but this doesn't work for
live mode.  This patch re-implements skip() to use read() instead of
lseek() to fix that.

Signed-off-by: Tom Zanussi <tzanussi@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1273032130.6383.28.camel@tropicana>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
tools/perf/util/trace-event-read.c