Thread (7 messages) flat view 7 messages, 4 authors, 2015-02-13

Re: [PATCH v5] perf: Use monotonic clock as a source for timestamps

From: Peter Zijlstra <hidden>
Date: 2015-02-12 10:28:27
Also in: lkml

Possibly related (same subject, not in this thread)

On Thu, Feb 12, 2015 at 12:04:54PM +0200, Adrian Hunter wrote:
On 11/02/15 18:12, Peter Zijlstra wrote:
quoted
How about something like the below? I _think_ it should mostly work for
x86, where the tsc is a 64bit wide cycle counter.
It would have to be based on CLOCK_MONOTONIC_RAW not CLOCK_MONOTONIC 
Why?
and you would have to check the clocksource is TSC.
It implicitly does that; it has that sched_clock_stable() thing, but
yeah I suppose someone could change the clocksource even though the tsc
is stable.

Not using TSC when its available is quite crazy though.. but sure.
Why is CLOCK_MONOTONIC preferred anyway - I would have thought any
adjustment would skew performance timings?
Because you can do inter-machine stuff with MONOTONIC and that's
entirely impossible with MONO_RAW.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help