Received: from eggs.gnu.org ([140.186.70.92]:36991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QZ0Ad-00030N-Qd for qemu-devel@nongnu.org; Tue, 21 Jun 2011 08:35:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QZ0Ac-0007kQ-Ef for qemu-devel@nongnu.org; Tue, 21 Jun 2011 08:35:07 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]:50314) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QZ0Ab-0007ia-QG for qemu-devel@nongnu.org; Tue, 21 Jun 2011 08:35:06 -0400 From: =?utf-8?Q?Llu=C3=ADs?= References: <87d3i8a74b.fsf@ginnungagap.bsc.es> Date: Tue, 21 Jun 2011 14:32:23 +0200 In-Reply-To: (Nilay Vaish's message of "Tue, 21 Jun 2011 05:24:27 -0500 (CDT)") Message-ID: <871uyn5prc.fsf@ginnungagap.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] struct TimerState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nilay Vaish Cc: qemu-devel@nongnu.org Nilay Vaish writes: > Let me ask a more pointed question. Is there a way to know how many > cycles the virtual machine has been running for? A comment that > appears before the defintion of the TimerState structure -- guest > cycle counter. AFAIR, the TimerState captures the amount of host nsec/cycles that the VM has been stopped for since the last VM stop/start pair. > As per Lluis' reply, this structure is keeping track of the time when > the VM started. Can you determine this from the variables that are > part of this structure? Determine what? The amount of host nsec/cycles or the amount of guest nsec/cycles? The former cannot be directly obtained unless you aggregate the intermediate values in TimerState (although you're already able to get that information from the OS). The latter depends under which configuration you're executing (i.e., use_icount). Lluis -- "And it's much the same thing with knowledge, for whenever you learn something new, the whole world becomes that much richer." -- The Princess of Pure Reason, as told by Norton Juster in The Phantom Tollbooth