From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48450) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhIT6-0001km-Qp for qemu-devel@nongnu.org; Thu, 14 Jul 2011 05:44:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QhIT5-0003cU-81 for qemu-devel@nongnu.org; Thu, 14 Jul 2011 05:44:28 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:44795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhIT4-0003cO-TL for qemu-devel@nongnu.org; Thu, 14 Jul 2011 05:44:27 -0400 Received: by wyf28 with SMTP id 28so37986wyf.4 for ; Thu, 14 Jul 2011 02:44:25 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4E1EBA76.8020603@redhat.com> Date: Thu, 14 Jul 2011 11:44:22 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1310562411-30538-1-git-send-email-minovotn@redhat.com> <4E1DA7A6.6060104@redhat.com> <4E1EACB9.4040701@redhat.com> In-Reply-To: <4E1EACB9.4040701@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Introduce "info migrate-times" monitor command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michal Novotny Cc: qemu-devel@nongnu.org On 07/14/2011 10:45 AM, Michal Novotny wrote: > > Please inline all these instead of adding new functions. > > Do you mean to implement as macros? I'm trying since yesterday and it's > not that simple because the variable has to be accessible from 3 files - > arch_init.c, savevm.c and migration.c. So I need to figure out what file > to put the variables to to make it working fine. I would like to avoid using them in multiple files. The simplest change is to remove migration.c from the list. The "waiting for input" handling can be moved to qemu_savevm_state_begin and qemu_savevm_state_iterate. The monitor code can be moved to savevm.c as well. And also, it makes no sense that arch_init.c includes savevm-related code. It was done simply to avoid compiling savevm more than once (to put it in Makefile.objs instead of Makefile.target). If you move that code back to savevm.c, the list of files goes down to one. Paolo