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>