Re: [PATCH v3 3/4] ftrace: add tracepoint for hrtimer

From: Xiao Guangrong
Date: Thu Jul 23 2009 - 06:01:44 EST




Peter Zijlstra wrote:

> OK, so what you want to measure is the time of the actual callback
> happening (hrtimer_entry) vs that where you would have expected it to
> happen (hrtimer_start + delay), right?
>

Yes

> So what's wrong with printing the expected expiration time in the
> hrtimer_start tracepoint in the cheap clock units?
>

Is "cheap clock units" means jiffies time?

If so, we need to convert "expire time" into jiffies time, but
I searched ways for this type of converting but found nothing.

I'm afraid it's hard to do as below example:
insmod-3821 [001] 3192.239335: hrtimer_start: timer=d08a1480 expires=1245162841000000000 ns
<idle>-0 [001] 3201.506127: hrtimer_expire: timer=d08a1480

We can't convert 1245162841000000000ns to jiffies if we don't know
the xtime/wall_to_monotonic at hrimter_start.
And the expire time that got by _start() maybe wrong because user
can change time of day between hrtimer_start() and hrtimer_expire().

What your opinion?

>
>
>
--
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/