[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC v3 03/27] COLO: migrate colo related info to

From: zhanghailiang
Subject: Re: [Qemu-devel] [PATCH RFC v3 03/27] COLO: migrate colo related info to slave
Date: Wed, 25 Feb 2015 14:21:02 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.1.1

On 2015/2/17 7:20, Eric Blake wrote:
On 02/11/2015 08:16 PM, zhanghailiang wrote:
We can know if we should go into COLO mode by the info that
has been migrated from PVM.

Signed-off-by: zhanghailiang <address@hidden>
Signed-off-by: Yang Hongyang <address@hidden>
Signed-off-by: Lai Jiangshan <address@hidden>
Signed-off-by: Gonglei <address@hidden>
  include/migration/migration-colo.h | 21 ++++++++++++++
  migration/Makefile.objs            |  1 +
  migration/colo-comm.c              | 56 ++++++++++++++++++++++++++++++++++++++
  vl.c                               |  5 +++-
  4 files changed, 82 insertions(+), 1 deletion(-)
  create mode 100644 include/migration/migration-colo.h
  create mode 100644 migration/colo-comm.c

+/* #define DEBUG_COLO */
+#ifdef DEBUG_COLO
+#define DPRINTF(fmt, ...) \
+    do { fprintf(stdout, "COLO: " fmt, ## __VA_ARGS__); } while (0)
+#define DPRINTF(fmt, ...) \
+    do { } while (0)

This is not very good (that is, it is a great way to write stale
debugging statements that tend to bit-rot, and later fail to compile
when you turn debug on).  Better is a usage pattern that enforces that
the debug compiles but has no impact.  For example, see how block/ssh.c
defines DPRINTF.

OK, will fix that in next version, thanks.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]