lkml.org 
[lkml]   [2010]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
DateThu, 20 May 2010 06:41:50 -0700
From"H. Peter Anvin" <>
SubjectRe: [tip:perf/core] perf: Use read() instead of lseek() in trace_event_read.c:skip()
On 05/20/2010 06:39 AM, Pekka Enberg wrote:
> On Thu, May 20, 2010 at 3:54 PM, tip-bot for Tom Zanussi
> <tzanussi@gmail.com> wrote:
>> Commit-ID: cbb5cf7ff6b298beacfe23db3386335b0b9c0a2d
>> Gitweb: http://git.kernel.org/tip/cbb5cf7ff6b298beacfe23db3386335b0b9c0a2d
>> Author: Tom Zanussi <tzanussi@gmail.com>
>> AuthorDate: Tue, 4 May 2010 23:02:10 -0500
>> Committer: Frederic Weisbecker <fweisbec@gmail.com>
>> CommitDate: Thu, 20 May 2010 08:37:17 +0200
>>
>> 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 d00a47cce569a3e660a8c9de5d57af28d6a9f0f7 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.
>
> Out of curiosity: why doesn't lseek() work and why can't we fix that?

Presumably because we're reading from a nonseekable stream?

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.



\
 
 \ /
  Last update: 2010-05-20 15:51    [from the cache]
©2003-2010