From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YO50g-0008GQ-R3 for qemu-devel@nongnu.org; Wed, 18 Feb 2015 08:49:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YO50b-0001fy-Nq for qemu-devel@nongnu.org; Wed, 18 Feb 2015 08:49:50 -0500 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:58400) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YO50b-0001fu-HO for qemu-devel@nongnu.org; Wed, 18 Feb 2015 08:49:45 -0500 Received: by mail-wi0-f172.google.com with SMTP id l15so41067629wiw.5 for ; Wed, 18 Feb 2015 05:49:44 -0800 (PST) Sender: Paolo Bonzini Message-ID: <54E49874.6010104@redhat.com> Date: Wed, 18 Feb 2015 14:49:40 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <20150218115534.4176.12578.stgit@PASHA-ISP> <20150218115615.4176.14168.stgit@PASHA-ISP> In-Reply-To: <20150218115615.4176.14168.stgit@PASHA-ISP> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v9 06/23] replay: introduce icount event List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Dovgalyuk , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, peter.crosthwaite@xilinx.com, mark.burton@greensocs.com, real@ispras.ru, batuzovk@ispras.ru, maria.klimushenkova@ispras.ru, alex.bennee@linaro.org, afaerber@suse.de, fred.konrad@greensocs.com On 18/02/2015 12:56, Pavel Dovgalyuk wrote: > + /* nothing to skip - not all instructions used */ > + if (replay_state.instructions_count != 0 > + && replay_has_unread_data) { > + return stop_event == EVENT_INSTRUCTION; Same here, please assert that replay_data_kind == EVENT_INSTRUCTION. Assertions communicate invariants, and thus help the person reading the code. Paolo > + }