CHROMIUM: Add CLOCK_SYSTEM_TRACE to export the trace clock to user space.
authorSam Leffler <sleffler@chromium.org>
Thu, 26 Apr 2012 23:54:35 +0000 (16:54 -0700)
committerOlof Johansson <olofj@chromium.org>
Wed, 20 Jun 2012 19:07:58 +0000 (12:07 -0700)
commit1ec17e46b7d23014c65eb28508af7624ac5f47a4
treeeabb88b6ff906a88ae37bbb2900f6260b96734ee
parent834a2375a81ebcf997a04d0f754fd103992a07b3
CHROMIUM: Add CLOCK_SYSTEM_TRACE to export the trace clock to user space.

Add a new clock type CLOCK_SYSTEM_TRACE to retrieve the current trace
clock value (if CONFIG_TRACING is not defined then CLOCK_SYSTEM_TRACE
returns the same value as CLOCK_MONOTONIC_RAW).  This allows user event
tracing to timestamp data with the same clock as the kernel.  This is
in-lieu of sending event data through trace_write (which is not a viable
option when there are lots of user-space events).

BUG=chromium-os:27809
TEST=manual:run test app to collect trace time and compare to data generated by the system (e.g. reading from trace)

Signed-off-by: Sam Leffler <sleffler@chromium.org>
Change-Id: If2167ed99291e05f8c298638f4118b10b3e710f8
Reviewed-on: https://gerrit.chromium.org/gerrit/21404
Reviewed-by: Olof Johansson <olofj@chromium.org>
Commit-Ready: Sam Leffler <sleffler@chromium.org>
Tested-by: Sam Leffler <sleffler@chromium.org>
Reviewed-on: https://gerrit-int.chromium.org/18564
Reviewed-by: Olof Johansson <olofj@google.com>
Tested-by: Sam Leffler <sleffler@google.com>
Commit-Ready: Sam Leffler <sleffler@google.com>
include/linux/kernel.h
include/linux/time.h
kernel/posix-timers.c
kernel/trace/trace.c