From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X046P-0003Ef-HU for qemu-devel@nongnu.org; Thu, 26 Jun 2014 03:28:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X046L-0005Is-5F for qemu-devel@nongnu.org; Thu, 26 Jun 2014 03:28:13 -0400 Received: from greensocs.com ([178.33.234.66]:55417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X046K-0005GU-Nn for qemu-devel@nongnu.org; Thu, 26 Jun 2014 03:28:09 -0400 Message-ID: <53ABCB86.9010000@greensocs.com> Date: Thu, 26 Jun 2014 09:28:06 +0200 From: Frederic Konrad MIME-Version: 1.0 References: <1403709607-6434-1-git-send-email-fred.konrad@greensocs.com> <1403709607-6434-10-git-send-email-fred.konrad@greensocs.com> <534C5107B281854290643468BBAAD41F172901@G08CNEXMBPEKD01.g08.fujitsu.local> In-Reply-To: <534C5107B281854290643468BBAAD41F172901@G08CNEXMBPEKD01.g08.fujitsu.local> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] =?gb2312?b?tPC4tDogIFtSRkMgUEFUQ0ggdjUgMDkvMTNdIGlu?= =?gb2312?b?dHJvZHVjZSByZXZlcnNlIGV4ZWN1dGlvbiBtZWNoYW5pc20u?= List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "lig.fnst@cn.fujitsu.com" , "qemu-devel@nongnu.org" Cc: "peter.maydell@linaro.org" , "quintela@redhat.com" , "mark.burton@greensocs.com" , "dgilbert@redhat.com" , "amit.shah@redhat.com" , "pbonzini@redhat.com" , "vilanova@ac.upc.edu" On 26/06/2014 04:31, lig.fnst@cn.fujitsu.com wrote: > Hi,=20 Hi, >> -----=D3=CA=BC=FE=D4=AD=BC=FE----- >> =B7=A2=BC=FE=C8=CB: qemu-devel-bounces+lig.fnst=3Dcn.fujitsu.com@nongn= u.org >> [mailto:qemu-devel-bounces+lig.fnst=3Dcn.fujitsu.com@nongnu.org] =B4=FA= =B1=ED >> fred.konrad@greensocs.com >> =B7=A2=CB=CD=CA=B1=BC=E4: 2014=C4=EA6=D4=C225=C8=D5 23:20 >> =CA=D5=BC=FE=C8=CB: qemu-devel@nongnu.org >> =B3=AD=CB=CD: peter.maydell@linaro.org; quintela@redhat.com; >> mark.burton@greensocs.com; dgilbert@redhat.com; amit.shah@redhat.com; >> pbonzini@redhat.com; vilanova@ac.upc.edu; fred.konrad@greensocs.com >> =D6=F7=CC=E2: [Qemu-devel] [RFC PATCH v5 09/13] introduce reverse exec= ution >> mechanism. >> >> From: KONRAD Frederic >> >> This introduces the basic reverse-execution mechanism. >> >> Signed-off-by: KONRAD Frederic >> --- >> Makefile.target | 1 + >> cpus.c | 6 + >> include/reverse-execution.h | 41 ++++++ >> reverse-execution.c | 306 >> ++++++++++++++++++++++++++++++++++++++++++++ >> vl.c | 7 +- >> 5 files changed, 360 insertions(+), 1 deletion(-) create mode 100644 >> include/reverse-execution.h create mode 100644 reverse-execution.c [...] >> + >> +static QLIST_HEAD(, snapshot_entry) snapshot =3D >> +QLIST_HEAD_INITIALIZER(snapshot); >> + >> +QEMUTimer *snap_timer; > s/snap_/snapshot_/g ? > >> +QEMUTimer *stop_timer; >> + >> +struct cexe_state { >> + int stepping_back; >> + int continue_backward_mode; >> + int singlestep_was_enabled; > boolize these 3 vars? > >> + bool step_done; Thanks for having looking into this, I'll do these change. >> + saved_vm_running =3D runstate_is_running(); >> + vm_stop(RUN_STATE_SAVE_VM); >> + snap->time =3D qemu_clock_get_ns(QEMU_CLOCK_ICOUNT); >> + sprintf(filename, ".save%04u", snap->id); > File name should be more readable What do you mean by more readable? >> + >> + trace_snap_callback(snap->time, filename); >> + >> + file =3D qemu_fopen(filename, "wb"); >> + qemu_savevm_state(file); >> + qemu_fclose(file); >> + >> + if (saved_vm_running) { >> + vm_start(); >> + } >> + timer_mod_ns(snap_timer, snap->time + 100000000); >> + } >> +} >> + >> +/* >> + * Timer callback called when the VM have to stop. >> + */ >> +static void stop_callback(void *opaque) { >> + trace_stop_callback(qemu_clock_get_ns(QEMU_CLOCK_ICOUNT)); >> + cexe_state.stop_requested =3D true; >> +} >> + >> +void cexe_setup(void) > Sorry, but, what's the mean of cexe here and there? This means "exec" in reverse.. Thanks, Fred > > Thanks! > Li Guang >