public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] perf report: ordered events and flushing bug
@ 2015-03-12  3:32 Stephane Eranian
  2015-03-12  7:57 ` Namhyung Kim
  2015-03-12  9:02 ` Adrian Hunter
  0 siblings, 2 replies; 15+ messages in thread
From: Stephane Eranian @ 2015-03-12  3:32 UTC (permalink / raw)
  To: LKML
  Cc: Arnaldo Carvalho de Melo, Namhyung Kim, Jiri Olsa, David Ahern,
	Peter Zijlstra, mingo@elte.hu

Hi,

I am working on the JIT support to improve the flow and have
perf record inject the MMAPs at the end of the collection. For
that I piggyback on the buildid pass. To avoid rewriting the entire perf.data
file, I simply append the the MMAP records at the end of the file. And that
puts them out-of-order in time systematically. But I thought it would be okay
because perf report would sort them by timestamps again.

Well, it does not in all cases! Why?

Because of the round flushing. Based on how far out-of-order an event is,
it may not be processed correctly because of round flushing. I believe this
may only impact MMAP records.  This is a serious issue because
mmaps drive symbolization of samples. If samples are processed without the
proper dso mapping, then samples may not be symbolized or may be wrongly
symbolized.

So far, the workaround I found was to set the oe->next_flush = 0 for
the ROUND mode.
In other words, do not flush anything until FINAL. To me, this is the
only sensible
way of avoiding this kind of problems. I am not sure I understand the
point of flushing
anyway, except to minimize memory footprint, maybe. But it does not
work with vastly
out-of-order mmaps.

Do you have a better solution?
Thanks.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-03-16  1:16 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-12  3:32 [BUG] perf report: ordered events and flushing bug Stephane Eranian
2015-03-12  7:57 ` Namhyung Kim
2015-03-12  9:02 ` Adrian Hunter
2015-03-12 19:05   ` Stephane Eranian
2015-03-12 19:13     ` David Ahern
2015-03-12 19:23       ` Stephane Eranian
2015-03-12 19:34         ` David Ahern
2015-03-12 19:39           ` Stephane Eranian
2015-03-12 19:53             ` David Ahern
2015-03-12 20:06               ` Stephane Eranian
2015-03-12 20:50                 ` Arnaldo Carvalho de Melo
2015-03-16  1:11                   ` Namhyung Kim
2015-03-12 20:16               ` Arnaldo Carvalho de Melo
2015-03-12 20:24                 ` Stephane Eranian
2015-03-12 20:27       ` Adrian Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox