WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

RE: [Xen-devel] Xen System Time

I assume you are trying to measure time elapsed from inside of a VM in a guest OS kernel?

 

If you are running Xen 4.0 or later, you can use the hardware rdtsc instruction to measure elapsed time as it is guaranteed by Xen to be synchronized across cores.  Note that unless you are certain that Xen cannot reschedule another VM (including dom0) during your hypercall, you may sometimes see some weird very large measurements which indicate that a scheduling event has occurred.

 

See docs/misc/tscmode.txt in the Xen source tree (especially the history section) for more information about the TSC.


If you are trying to measure elapsed time IN Xen, see the various CYC_COUNTER macros in xen/common/tmem.c as an example of how this can be done.

 

From: Srujan Kotikela [mailto:ksrujandas@xxxxxxxxx]
Sent: Friday, March 25, 2011 3:24 PM
To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Xen System Time

 

Hi,

 

Is there any interface for Xen System Time? I am trying to find the average time Xen takes for several operations. I am planning to add small code to hypercall definitions in xen to clock the time to perform that particular functionality.

 

Are there any functions available in xen which gives time in the Xen kernel. The interface manual talks about "System Time". But I did! n't find any functions/hypercalls for that. The only one I found was guest_set_time().

 


--
Srujan D. Kotikela

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>