From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ1l8-00020R-9S for qemu-devel@nongnu.org; Wed, 04 Feb 2015 10:20:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJ1l5-0003pM-Jx for qemu-devel@nongnu.org; Wed, 04 Feb 2015 10:20:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJ1l5-0003p2-DF for qemu-devel@nongnu.org; Wed, 04 Feb 2015 10:20:51 -0500 Message-ID: <54D238C1.7090404@redhat.com> Date: Wed, 04 Feb 2015 16:20:33 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <20150122085127.5276.53895.stgit@PASHA-ISP.def.inno> <20150122085238.5276.4455.stgit@PASHA-ISP.def.inno> <54CA095B.8040100@redhat.com> <000b01d03fba$7ad8cd40$708a67c0$@Dovgaluk@ispras.ru> In-Reply-To: <000b01d03fba$7ad8cd40$708a67c0$@Dovgaluk@ispras.ru> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [RFC PATCH v8 12/21] replay: recording and replaying different timers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgaluk , 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 On 03/02/2015 15:05, Pavel Dovgaluk wrote: >> > >> > What about just making qemu_get_timedate use >> > qemu_clock_get_ns(QEMU_CLOCK_HOST) instead of time()? This would just >> > work using the infrastructure of the previous patch. > I can get rid of these calls, but localtime() function used > in qemu_get_timedate() will not work deterministically. > Should we save its' result then? It is deterministic if the user's timezone remains the same. You could just outlaw "-rtc base=localtime". Also, if you choose to record the output of qemu_get_timedate(), you have to do the same for qemu_timedate_diff(). Switching qemu_timedate_diff to use QEMU_CLOCK_HOST would also work for qemu_timedate_diff(). Paolo