trace - Coordinating Times From /sys/kernel/debug/tracing In Ubuntu -
trace - Coordinating Times From /sys/kernel/debug/tracing In Ubuntu -
i trying gather info multiple sources on ubuntu 10.10 machine programatically program's performance. of other sources, have been able gather them using rdtsc x86 instruction, , scale them using gettimeofday convert seconds in absolute time. when start trying coordinate these info sources output of doing sched_switch tracing in /sys/kernel/debug/tracing, however, run issue, since output seeing in seconds , microseconds since unknown time.
steps have done: 1. i've determined linux kernel internally uses rdtsc, adds offset gathers, don't seem have ability retrieve. on per-core basis well, means have seek 4 cores , determine best one, seems poor solution problem. 2. i've tried converting rdtsc times around turning on logging, see if @ to the lowest degree conversion consistent (i.e. constant offset), scale doesn't seem remain constant throughout run. 3. clock_gettime(clock_monotonic, ...) seems have similar value, off unexceptable amount (around half second), , doesn't seem exclusively consistent either.
if able alter how other info sources gather time whatever needed (assuming isn't performance intensive), how should gather times in order coordinate between trace's time , times gathering? there sort of way alter output rdtsc, can utilize that, or there scheme phone call can create same time beingness output trace? in advance help.
rdtsc not popular instruction. there problems when using it, events hybernation resets counters. other mutual source of problems dynamic cpu clock.there post comparing rdtsc , hpet:
http://aufather.wordpress.com/2010/09/08/high-performance-time-measuremen-in-linux/
to check rdtsc accuracy, measure how many clock cycles counts in 1 sec , compares declared cpu clock. works cpu dynamic clock disabled. see:
https://github.com/petersenna/rdtscbench
ubuntu trace rdtsc
Comments
Post a Comment