From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XtbcF-0003Mb-Uy for qemu-devel@nongnu.org; Wed, 26 Nov 2014 07:22:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xtbc5-0006m4-Fb for qemu-devel@nongnu.org; Wed, 26 Nov 2014 07:22:39 -0500 Received: from mail.ispras.ru ([83.149.199.45]:37847) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xtbc5-0006le-7Q for qemu-devel@nongnu.org; Wed, 26 Nov 2014 07:22:29 -0500 From: "Pavel Dovgaluk" References: <20141126103841.7772.11864.stgit@PASHA-ISP> <20141126104038.7772.79661.stgit@PASHA-ISP> <5475B102.6060904@redhat.com> In-Reply-To: <5475B102.6060904@redhat.com> Date: Wed, 26 Nov 2014 15:22:31 +0300 Message-ID: <000b01d00973$a6e63c60$f4b2b520$@Dovgaluk@ispras.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: ru Subject: Re: [Qemu-devel] [RFC PATCH v5 20/31] replay: recording and replaying clock ticks List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 'Paolo Bonzini' , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, alex.bennee@linaro.org, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, maria.klimushenkova@ispras.ru, afaerber@suse.de, fred.konrad@greensocs.com > From: Paolo Bonzini [mailto:pbonzini@redhat.com] > On 26/11/2014 11:40, Pavel Dovgalyuk wrote: > > +/* real time host monotonic timer implementation */ > > +static inline int64_t get_clock_realtime_impl(void) > > { > > struct timeval tv; > > > > @@ -708,6 +709,12 @@ static inline int64_t get_clock_realtime(void) > > return tv.tv_sec * 1000000000LL + (tv.tv_usec * 1000); > > } > > > > +/* real time host monotonic timer interface */ > > +static inline int64_t get_clock_realtime(void) > > +{ > > + return REPLAY_CLOCK(REPLAY_CLOCK_HOST, get_clock_realtime_impl()); > > +} > > + > > Any reason to do this instead of using REPLAY_CLOCK in qemu_get_clock, > like you do for QEMU_CLOCK_VIRTUAL_RT? hw/ppc.c uses this functions in pre_save and post_load function. It seems that these calls' results also should be logged by replay. Pavel Dovgalyuk