public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Richter <robert.richter@amd.com>
To: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"dsahern@gmail.com" <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	"acme@redhat.com" <acme@ghostprotocols.net>,
	"mingo@elte.hu" <mingo@elte.hu>,
	"ak@linux.intel.com" <ak@linux.intel.com>
Subject: Re: [PATCH] perf: make perf.data more self-descriptive (v8)
Date: Mon, 19 Dec 2011 10:26:16 +0100	[thread overview]
Message-ID: <20111219092616.GC16765@erda.amd.com> (raw)
In-Reply-To: <CABPqkBRbdJ0tG2+V-CvEdPnwm5YqQuv7FKrUHoTM8=wa8V=kHQ@mail.gmail.com>

On 18.12.11 20:49:42, Stephane Eranian wrote:
> On Dec 6, 2011 10:29 AM, "Robert Richter" <robert.richter@amd.com> wrote:
> >
> > On 05.12.11 11:24:05, Stephane Eranian wrote:
> > > The one thing I realized last week, is that all that header information,
> incl.
> > > the features bits do not seem to appear in the file perf.data file when you
> > > use the perf record pipe mode. We need to fix that otherwise, if you
> > > depend on information in those bits, it won't always be present. That's
> > > a major issue.
> >
> > Yes, this is because pipes are not seakable, which is necessary to
> > write the features.

> Yes, but we should have those headers regardless. They contain very useful info
> about the measurement. The seeks should not be required. The features can be at
> the end of data. We should not have to care how the perf.data file was created
> by the time we call perf report. Something looks broken to me here.

It must not necessarilly at the end of the file. Using lseek() makes
the implementation much more easy. If you have to write data
sequentially you must store later parts temporarilly in memory until
earlier parts are complete. E.g. you write a size value of null, write
all remaining data and then seek back to size to write the actuall
size.

I aggree, having the header information (or at least parts of it) not
in the pipe stream will cause some implications, such as that the
information get lost if piping through the network to a different
system.

We would have to rewrite large portions of the code to write data
without seeks.

-Robert

-- 
Advanced Micro Devices, Inc.
Operating System Research Center


      parent reply	other threads:[~2011-12-19  9:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-30 13:40 [PATCH] perf: make perf.data more self-descriptive (v8) Stephane Eranian
2011-10-04  4:50 ` David Ahern
2011-11-29 18:22 ` Robert Richter
2011-11-29 18:35   ` Stephane Eranian
2011-11-30 15:08     ` Robert Richter
2011-11-30 16:49       ` acme
2011-12-01 15:01         ` Frederic Weisbecker
2011-12-01 15:15           ` Robert Richter
2011-12-01 17:53             ` Stephane Eranian
2011-12-05 13:23               ` Robert Richter
2011-12-05 19:24                 ` Stephane Eranian
2011-12-06  9:29                   ` Robert Richter
     [not found]                     ` <CABPqkBRbdJ0tG2+V-CvEdPnwm5YqQuv7FKrUHoTM8=wa8V=kHQ@mail.gmail.com>
2011-12-19  9:26                       ` Robert Richter [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=20111219092616.GC16765@erda.amd.com \
    --to=robert.richter@amd.com \
    --cc=acme@ghostprotocols.net \
    --cc=ak@linux.intel.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    /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