[ltt-dev] Problem on combine kernel trace and userspace trace.
Tony Jones
tonyj at suse.de
Mon Dec 13 12:21:53 EST 2010
On Fri, Dec 10, 2010 at 09:21:43AM -0500, Mathieu Desnoyers wrote:
> You might want to look at where the cpu frequency value is taken from
> /proc/cpuinfo within UST. It it being called or is a 1 cycle = 1 ns
> "generic" value used ?
Right, include/ust/clock.h is hard coded as:
trace_clock_frequency()=1000000000
trace_clock_freq_scale()=1
because these are the appropriate values for CLOCK_MONOTONIC
/proc/cpuinfo reports 2000Mhz which is 2000 * 1000Khz. cpu has constant_tsc so
it should be good regardless of cpufreq (but I disabled cpufreq to be sure)
Adjustting the clock.h value to match the above I get close but not exact:
9327.222184560 ... 9327.450313805 kernel
9328.470235184 ... 9328.472675497 user
Looks like I need a value of ~ 20002725xx for trace_clock_frequency()
> But as I pointed out, all these problems will go away with the upcoming
> vDSO.
Understood from the previous reply, but I was trying to get something working
(for a demo) in the meantime.
Tony
More information about the lttng-dev
mailing list