On Monday 24 October 2005 19:45, Serge Goodenko wrote:
> > I don't now if this also works in UML, but we use rdtsc for quite
> > something similar.

> > rdtsc is a C function which read a processor register (twice 32 bit)
> > which counts processor ticks (meaning on a 1 GHz processor you get a
> > resolution of nano seconds).
rdtsc can be used for performance measurement, yes, and it's good for relative 
measurements. However it's not really usable to be converted to absolute 
time:

* bogus when the processor goes sleeping
* bogus when you use SpeedStep/Powernow/XXX
* etc/etc/etc

> well, I suppose UML is the keyword here...
No, rdtsc works even in userspace programs and in UML. Probably you'll have to 
insert manually the macro definition (grep for it in include/asm-i386/*), but 
it works.

> yet I didn't try this, maybe I should.
> another reason is that I don't want to be dependent of processor freq.
Uml calculates it already parsing /proc/cpuinfo on the host.
-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade

        

        
                
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to