Re: wrong timestamps in ftrace?

From: Ingo Molnar
Date: Tue Mar 17 2009 - 11:28:20 EST



* Miklos Szeredi <miklos@xxxxxxxxxx> wrote:

> I've started playing with ftrace and timestamps seem to be
> misbehaving.
>
> # echo 0 > /sys/kernel/debug/tracing/tracing_enabled
> # echo nop > /sys/kernel/debug/tracing/current_tracer
> # echo 131072 > /sys/kernel/debug/tracing/buffer_size_kb
> # echo sched_switch > /sys/kernel/debug/tracing/current_tracer
> # echo 1 > /sys/kernel/debug/tracing/tracing_enabled
> # sleep 10
> # echo 0 > /sys/kernel/debug/tracing/tracing_enabled
> # cat /sys/kernel/debug/tracing/trace > /tmp/trace.txt
> # ls -lh /tmp/trace.txt
> -rw-r--r-- 1 root root 96K Mar 17 16:11 /tmp/trace.txt
> # head -5 /tmp/trace.txt | tail -1
> bash-4908 [001] 212.139730: 4908:120:S + [001] 4845:120:S
> # tail -1 /tmp/trace.txt
> kondemand/1-1020 [001] 212.261054: 1020:115:S ==> [001] 0:140:R
>
> So according to the timestamps the time difference between the first
> and last event was just 0.12s, which is rubbish.
>
> This is latest git on a CoreDuo T60 notebook. Attaching .config and
> dmesg.

There's been changes to timestamping in the tracing tree. Could you
check whether latest -tip:

http://people.redhat.com/mingo/tip.git/README

works better for you?

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/