From: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
To: Richard Cochran
<richardcochran-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Steven Rostedt <rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org>,
Ingo Molnar <mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Paul Mackerras <paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>,
Arnaldo Carvalho de Melo
<acme-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
John Stultz <john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Masami Hiramatsu
<masami.hiramatsu.pt-FCd8Q96Dh0JBDgjK7y7TUQ@public.gmane.org>,
Christopher Covington
<cov-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
Namhyung Kim <namhyung-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
David Ahern <dsahern-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
Tomeu Vizoso <tomeu-XCtybt49RKsYaV1qd6yewg@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Pawel Moll <mail-g3xvULXeDMYS+FvcfC7Uqw@public.gmane.org>
Subject: [PATCH v3 0/3] perf: User/kernel time correlation and event generation
Date: Tue, 4 Nov 2014 00:28:35 +0000 [thread overview]
Message-ID: <1415060918-19954-1-git-send-email-pawel.moll@arm.com> (raw)
From: Pawel Moll <mail-g3xvULXeDMYS+FvcfC7Uqw@public.gmane.org>
Hello again,
Back to the subject, this time with a slightly different angle...
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
Pawel Moll (3):
perf: Use monotonic clock as a source for timestamps
perf: Userspace event
perf: Sample additional clock value
include/linux/perf_event.h | 7 +++
include/uapi/linux/perf_event.h | 37 +++++++++++++-
include/uapi/linux/prctl.h | 10 ++++
kernel/events/core.c | 105 +++++++++++++++++++++++++++++++++++++++-
kernel/sys.c | 5 ++
kernel/sysctl.c | 7 +++
6 files changed, 168 insertions(+), 3 deletions(-)
--
1.8.3.2
next reply other threads:[~2014-11-04 0:28 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-04 0:28 Pawel Moll [this message]
2014-11-04 0:28 ` [PATCH v3 2/3] perf: Userspace event Pawel Moll
2014-11-04 6:33 ` Namhyung Kim
[not found] ` <87ppd35vbk.fsf-vfBCOVm4yAnB69T4xOojN9BPR1lH4CV8@public.gmane.org>
2014-11-04 16:42 ` Pawel Moll
[not found] ` <1415119331.24819.19.camel-5wv7dgnIgG8@public.gmane.org>
2014-11-04 18:40 ` Peter Zijlstra
[not found] ` <20141104184031.GM10501-IIpfhp3q70z/8w/KjCw3T+5/BudmfyzbbVWyRVo5IupeoWH0uzbU5w@public.gmane.org>
2014-11-05 6:36 ` Namhyung Kim
[not found] ` <1415060918-19954-1-git-send-email-pawel.moll-5wv7dgnIgG8@public.gmane.org>
2014-11-04 0:28 ` [PATCH v3 1/3] perf: Use monotonic clock as a source for timestamps Pawel Moll
[not found] ` <1415060918-19954-2-git-send-email-pawel.moll-5wv7dgnIgG8@public.gmane.org>
2014-11-04 7:23 ` Peter Zijlstra
[not found] ` <20141104072308.GE10501-IIpfhp3q70z/8w/KjCw3T+5/BudmfyzbbVWyRVo5IupeoWH0uzbU5w@public.gmane.org>
2014-11-04 15:25 ` Pawel Moll
[not found] ` <1415114727.24819.8.camel-5wv7dgnIgG8@public.gmane.org>
2014-11-04 15:30 ` Peter Zijlstra
2014-11-04 0:28 ` [PATCH v3 3/3] perf: Sample additional clock value Pawel Moll
2014-11-04 0:58 ` [PATCH v3 0/3] perf: User/kernel time correlation and event generation Andy Lutomirski
[not found] ` <CALCETrXGoevmD_avz5sQfbbD624vpLW5=-8ovzTPT_5wzNFnVA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-04 1:11 ` John Stultz
[not found] ` <CALAqxLXfy5P0kg-W7hL+Jf1iYv758+-2cTdZwsY8kAns1nvEmg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-04 1:25 ` Andy Lutomirski
[not found] ` <CALCETrUAkXKyXzZy4xaYcW2f65Lh=APrU4cFU1zm-qmc6EwB8g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-04 15:07 ` Pawel Moll
2014-11-04 8:01 ` Arnd Bergmann
2014-11-04 8:27 ` Richard Cochran
[not found] ` <20141104082728.GB4253-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-11-04 10:49 ` Thomas Gleixner
2014-11-04 16:11 ` Arnd Bergmann
2014-11-04 16:04 ` John Stultz
2014-11-04 8:24 ` Richard Cochran
2014-11-04 9:24 ` Masami Hiramatsu
[not found] ` <54589B58.7080102-FCd8Q96Dh0JBDgjK7y7TUQ@public.gmane.org>
2014-11-04 15:51 ` Pawel Moll
[not found] ` <1415116269.24819.14.camel-5wv7dgnIgG8@public.gmane.org>
2014-11-05 8:06 ` Masami Hiramatsu
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=1415060918-19954-1-git-send-email-pawel.moll@arm.com \
--to=pawel.moll-5wv7dgnigg8@public.gmane.org \
--cc=acme-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=cov-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=dsahern-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mail-g3xvULXeDMYS+FvcfC7Uqw@public.gmane.org \
--cc=masami.hiramatsu.pt-FCd8Q96Dh0JBDgjK7y7TUQ@public.gmane.org \
--cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=namhyung-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=paulus-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org \
--cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
--cc=richardcochran-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=rostedt-nx8X9YLhiw1AfugRpC6u6w@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=tomeu-XCtybt49RKsYaV1qd6yewg@public.gmane.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;
as well as URLs for NNTP newsgroup(s).