From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0ToH-0001xJ-TE for qemu-devel@nongnu.org; Fri, 27 Jun 2014 06:55:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X0ToC-0006bW-W2 for qemu-devel@nongnu.org; Fri, 27 Jun 2014 06:55:13 -0400 Received: from mail-lb0-f171.google.com ([209.85.217.171]:44302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X0ToC-0006Z2-Pt for qemu-devel@nongnu.org; Fri, 27 Jun 2014 06:55:08 -0400 Received: by mail-lb0-f171.google.com with SMTP id s7so3912224lbd.30 for ; Fri, 27 Jun 2014 03:55:07 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <53ad4904.8360e50a.0f7f.ffffce7dSMTPIN_ADDED_BROKEN@mx.google.com> References: <53acfed7.e3538c0a.39e2.ffffb619SMTPIN_ADDED_BROKEN@mx.google.com> <53AD21AB.1040609@greensocs.com> <53ad4904.8360e50a.0f7f.ffffce7dSMTPIN_ADDED_BROKEN@mx.google.com> From: Peter Maydell Date: Fri, 27 Jun 2014 11:54:47 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] Reverse execution and deterministic replay List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgaluk Cc: Paolo Bonzini , Peter Crosthwaite , Mark Burton , QEMU Developers , Frederic Konrad On 27 June 2014 11:35, Pavel Dovgaluk wrote: > The major disadvantage of icount is that it's updated only on TB boundaries. > When one instruction in the middle of the block uses virtual clock, it could > have different values for different divisions of the code to TB. This is only true if the instruction is incorrectly not marked as being "I/O". The idea behind icount is that in general we update it on TB boundaries (it's much faster than doing it once per insn) but for those places which do turn out to need an exact icount we then retranslate the block to get the instruction-to-icount-adjustment mapping. It wouldn't surprise me if this turned out to have some bugs in corner cases, but fixing these issues seems to me like a much better design than ignoring icount completely and reimplementing a second instruction counter. thanks -- PMM