LKML Archive on
help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <>
To: Adrian Hunter <>
Cc: "Namhyung Kim" <>,
	"David Ahern" <>, "Jiri Olsa" <>,
	"Ingo Molnar" <>,
	"Frédéric Weisbecker" <>,
	"Linux Kernel Mailing List" <>
Subject: Re: heads up/RFC: 'perf trace' using ordered_events
Date: Mon, 9 Mar 2015 10:21:35 -0300	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Em Sat, Mar 07, 2015 at 02:45:24PM +0200, Adrian Hunter escreveu:
> On 4/03/2015 3:07 a.m., Arnaldo Carvalho de Melo wrote:
> >Em Wed, Mar 04, 2015 at 10:01:23AM +0900, Namhyung Kim escreveu:
> >>On Tue, Mar 03, 2015 at 01:49:40PM -0300, Arnaldo Carvalho de Melo wrote:
> >>>	Just a preview, but this is something David had mentioned at some
> >>>point, a major problem with 'perf trace' was that it wasn't using
> >>>'perf_session' event reordering mechanism, so I've been working on making it
> >>>use it, refactoring the ordered_events code so that it can be used by tools
> >>>that don't deal with files.

> >>At a conceptual level, I think event processing should be done with
> >>session.  Even if perf trace does not do anything with a data file it
> >>can have a (live) session like perf top does.  This way we can avoid

> >perf top is another one I want to move away from perf_session, as it
> >doesn't use any file, but needs to have events ordered.

> >But then I really need to look at what you done in your patchset,
> >probably I am missing something (or a lot).
> The change appears to conflict substantially with the patches I have for
> adding instruction tracing support. I will send them again soon, so you
> can see what I mean.

Ok, I'll check your patchkit
> My first thought would be that iterating over events from an event
> source would be the natural abstraction which would not differentiate
> from where the events came. i.e. it should not matter if the back end
> is a file, pipe, or mmap.

> Generally there is a need for a top level data structure. It avoids having
> to use global variables and reduces the number of parameters that get
> passed around.

I agree with that, that is why perf_session was introduced in the first
place :-)

But that was long ago, when the main use case was for processing files, as time went on it was being stuffed with many other

What I've been trying to do is to better separate those things into
multiple classes, so that tools can use parts of it as they see fit.

My recent work on ordered_samples was with the intent of using that
reordering class in 'trace', but as I went on doing that I think it is
too tied to the design of, with its shortcomings.

And then I've been trying to do it in a way that the existing API isn't
changed too much, keeping assumptions existing tools have.

For trace I need to take advantage of the fact that each mmap is ordered
already and then just sort by the timestamp in the mmap head, etc.

In retrospect, the file should have kept that ordering, i.e.
have one file per mmap, that would be saved in parallel, without any of

But I have to experiment with that, leaving the existing code around to
deal with older files.

- Arnaldo

  reply	other threads:[~2015-03-09 13:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 16:49 Arnaldo Carvalho de Melo
2015-03-04  1:01 ` Namhyung Kim
2015-03-04  1:07   ` Arnaldo Carvalho de Melo
2015-03-07 12:45     ` Adrian Hunter
2015-03-09 13:21       ` Arnaldo Carvalho de Melo [this message]
2015-03-10  6:06         ` Namhyung Kim
2015-03-10 14:25           ` David Ahern
2015-03-11  0:33             ` Namhyung Kim

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: heads up/RFC: '\''perf trace'\'' using ordered_events' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).