linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: mingo@redhat.com, hpa@zytor.com, acme@redhat.com,
	paulus@samba.org, linux-kernel@vger.kernel.org,
	tzanussi@gmail.com, a.p.zijlstra@chello.nl, tglx@linutronix.de,
	mingo@elte.hu, linux-tip-commits@vger.kernel.org
Subject: Re: [tip:perf/core] perf: Use read() instead of lseek() in trace_event_read.c:skip()
Date: Thu, 20 May 2010 15:43:58 +0200	[thread overview]
Message-ID: <20100520134356.GA10080@nowhere> (raw)
In-Reply-To: <AANLkTikqkbScJOVxynoOzejKnaNIucrAczgtGIDqXLCO@mail.gmail.com>

On Thu, May 20, 2010 at 04:39:37PM +0300, 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?


Because depending on the mode we are, that may or may not work.

We have the normal mode, when the input in a regular file (perf.data)
where it works. And we have the pipe mode, where the seek fails.


      parent reply	other threads:[~2010-05-20 13:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-05  4:02 [PATCH] perf/trace: use read() instead of lseek() in trace_event_read.c:skip() Tom Zanussi
2010-05-14 16:12 ` Borislav Petkov
2010-05-14 16:22   ` Frederic Weisbecker
2010-05-20 12:54 ` [tip:perf/core] perf: Use " tip-bot for Tom Zanussi
2010-05-20 13:39   ` Pekka Enberg
2010-05-20 13:41     ` H. Peter Anvin
2010-05-20 13:43     ` Frederic Weisbecker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100520134356.GA10080@nowhere \
    --to=fweisbec@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=tglx@linutronix.de \
    --cc=tzanussi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).