Re: Using sched_clock for mmio-trace

Thomas Gleixner
2007-02-17T15:15:13Z

On Sat, 2007-02-17 at 15:56 +0100, Andi Kleen wrote:
> > This is one of the reasons why we don't just use good old
> > do_gettimeofday(), since it takes locks and can lead to lock recursion
> > if parts of itself are probed.
>
> do_gettimeofday doesn't take locks.
>
> Only restriction is that you can't single step it with long
> pauses between instructions.

Err, it uses read side of xtime lock, so you can not call it from a
place which write locks xtime lock.

tglx