All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] perf: User/kernel time correlation and event generation
@ 2014-11-06 16:51 Pawel Moll
  2014-11-06 16:51 ` [PATCH v4 1/3] perf: Use monotonic clock as a source for timestamps Pawel Moll
                   ` (2 more replies)
  0 siblings, 3 replies; 58+ messages in thread
From: Pawel Moll @ 2014-11-06 16:51 UTC (permalink / raw)
  To: Richard Cochran, Steven Rostedt, Ingo Molnar, Peter Zijlstra,
	Paul Mackerras, Arnaldo Carvalho de Melo, John Stultz,
	Masami Hiramatsu, Christopher Covington, Namhyung Kim,
	David Ahern, Thomas Gleixner, Tomeu Vizoso
  Cc: linux-kernel, linux-api, Pawel Moll

This is a second version of the post-LPC series. The changes are limited
to the first patch, adding a backward-compatibility kernel parameter.

The v3 cover letter:

I've organised a session on the subject during the tracing minisummit
at LPC 2014 in Dusseldorf. Notes taken from the discussion taken by
Steven Rostedt (thanks Steve!)

http://www.linuxplumbersconf.org/2014/wp-content/uploads/2014/10/LPC2014_Tracing.txt

The following three patches address three main topics. They are pretty
much orthogonal and (subject to small and obvious modifications) could
be applied independently from each other.

An executive summary of both discussion and the patches:

1. User/kernel perf timestamps correlation

Thomas suggested that, instead of jumping through loops of correlation,
perf should simply generate monotonic clock timestamps, instead of
using sched clock. Peter and I pointed out that Ingo didn't like this
idea as monotonic can be slow, but apparently the cases when it is are
irrelevant. Thomas offered to fly to Budapest to physically convince
Ingo - I hope it won't be necessary and he will be able to achieve
this here, on mailing lists :-)

Setting aside potential performance problems, it would be a really
great solution, unifying all trace systems (perf, ftrace and LTTng)
in this respect. I'm more than happy to work on potential improvements
in the are of monotonic clock if it was to help the cause.

If it is a definite no-go, we still have the third patch, allowing post-
capture correlation based on synchronisation events.

2. User event generation

Everyone present agreed that it would be a very-nice-to-have feature.
There was some discussion about implementation details, so I welcome
feedback and comments regarding my take on the matter.

3. Correlation with external timestamps

This is a new issue, which surfaced recently while I was working on
hardware trace infrastructure. It can timestamp trace packets, but is
using yet another, completely different time source to do this.

Thomas suggested solution which gets down to my original proposal for
sched/monotonic clock correlation - an additional sample type so events
can be "double stamped" using different clock sources providing
synchronisation points for later time approximation. I've just extended
the implementation with configuration value to select the clock source.
If the first patch (making perf timestamps monotonic) gets accepted,
there will be no immediate need for this one, but I'd like to gain some
feedback anyway.


That's all for this series. Previous versions:

- RFC: http://www.spinics.net/lists/kernel/msg1824419.html
- v1: http://thread.gmane.org/gmane.linux.kernel/1790231
- v2: http://thread.gmane.org/gmane.linux.kernel/1793272
- v3: http://thread.gmane.org/gmane.linux.kernel.api/5681


Pawel Moll (3):
  perf: Use monotonic clock as a source for timestamps
  perf: Userspace event
  perf: Sample additional clock value

 Documentation/kernel-parameters.txt |   9 +++
 include/linux/perf_event.h          |   6 ++
 include/uapi/linux/perf_event.h     |  37 +++++++++-
 include/uapi/linux/prctl.h          |  10 +++
 kernel/events/core.c                | 138 ++++++++++++++++++++++++++++++++++++
 kernel/sys.c                        |   5 ++
 6 files changed, 203 insertions(+), 2 deletions(-)

-- 
2.1.0


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

end of thread, other threads:[~2015-02-13  7:09 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-06 16:51 [PATCH v4 0/3] perf: User/kernel time correlation and event generation Pawel Moll
2014-11-06 16:51 ` [PATCH v4 1/3] perf: Use monotonic clock as a source for timestamps Pawel Moll
2014-11-27 15:05   ` Pawel Moll
2014-11-27 15:05     ` Pawel Moll
2014-12-11 13:39     ` Pawel Moll
2014-12-11 13:39       ` Pawel Moll
2015-01-05 13:01       ` Peter Zijlstra
2015-01-05 13:01         ` Peter Zijlstra
2015-01-21 15:47         ` Pawel Moll
2015-01-05 13:00   ` Peter Zijlstra
2015-01-21 15:52     ` Pawel Moll
2015-01-21 15:52       ` Pawel Moll
2015-01-21 19:48       ` Pawel Moll
2015-01-21 19:48         ` Pawel Moll
2015-01-21 20:07         ` Pawel Moll
2015-01-21 20:07           ` Pawel Moll
2015-01-16 12:41   ` Adrian Hunter
2015-01-16 12:41     ` Adrian Hunter
2015-01-21 20:27   ` [PATCH v5] " Pawel Moll
2015-01-21 20:27     ` Pawel Moll
2015-02-02 16:52     ` Pawel Moll
2015-02-02 16:52       ` Pawel Moll
     [not found]       ` <CAN+dfcT_6zZZ4oeyngUE5N0Wtx2B9CvXsfU71m+cuyXpq2KBdw@mail.gmail.com>
2015-02-03  9:20         ` Pawel Moll
2015-02-03  9:20           ` Pawel Moll
2015-02-11 16:12           ` Peter Zijlstra
2015-02-11 16:12             ` Peter Zijlstra
2015-02-12 10:04             ` Adrian Hunter
2015-02-12 10:04               ` Adrian Hunter
2015-02-12 10:28               ` Peter Zijlstra
2015-02-12 10:28                 ` Peter Zijlstra
2015-02-12 15:38                 ` Peter Zijlstra
2015-02-12 15:38                   ` Peter Zijlstra
2015-02-13  0:25                   ` John Stultz
2015-02-13  0:25                     ` John Stultz
2015-02-13  7:07                 ` Adrian Hunter
2015-02-13  7:07                   ` Adrian Hunter
2014-11-06 16:51 ` [PATCH v4 2/3] perf: Userspace event Pawel Moll
2014-11-06 16:51   ` Pawel Moll
2015-01-05 13:12   ` Peter Zijlstra
2015-01-05 13:12     ` Peter Zijlstra
2015-01-21 16:01     ` Pawel Moll
2015-01-21 16:01       ` Pawel Moll
2014-11-06 16:51 ` [PATCH v4 3/3] perf: Sample additional clock value Pawel Moll
2015-01-05 13:45   ` Peter Zijlstra
2015-01-05 13:45     ` Peter Zijlstra
2015-01-05 19:17     ` John Stultz
2015-01-21 17:12     ` Pawel Moll
2015-01-21 17:12       ` Pawel Moll
2015-01-21 17:44       ` John Stultz
2015-01-21 17:44         ` John Stultz
2015-01-21 17:54         ` Pawel Moll
2015-01-21 17:54           ` Pawel Moll
2015-01-21 18:05           ` John Stultz
2015-01-21 18:05             ` John Stultz
2015-01-23 17:06     ` Pawel Moll
2015-01-23 17:06       ` Pawel Moll
2015-01-23 18:05       ` David Ahern
2015-01-23 18:05         ` David Ahern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.