[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/17] migration: transform remained DPRINTF into tr
From: |
Juan Quintela |
Subject: |
[Qemu-devel] [PATCH 01/17] migration: transform remained DPRINTF into trace_ |
Date: |
Mon, 23 Jan 2017 22:32:05 +0100 |
So we can remove DPRINTF() macro
Signed-off-by: Juan Quintela <address@hidden>
---
migration/ram.c | 18 ++++--------------
migration/trace-events | 4 ++++
2 files changed, 8 insertions(+), 14 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index a1c8089..ef8fadf 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -45,14 +45,6 @@
#include "qemu/rcu_queue.h"
#include "migration/colo.h"
-#ifdef DEBUG_MIGRATION_RAM
-#define DPRINTF(fmt, ...) \
- do { fprintf(stdout, "migration_ram: " fmt, ## __VA_ARGS__); } while (0)
-#else
-#define DPRINTF(fmt, ...) \
- do { } while (0)
-#endif
-
static int dirty_rate_high_cnt;
static uint64_t bitmap_sync_count;
@@ -507,10 +499,10 @@ static int save_xbzrle_page(QEMUFile *f, uint8_t
**current_data,
TARGET_PAGE_SIZE, XBZRLE.encoded_buf,
TARGET_PAGE_SIZE);
if (encoded_len == 0) {
- DPRINTF("Skipping unmodified page\n");
+ trace_save_xbzrle_page_skipping();
return 0;
} else if (encoded_len == -1) {
- DPRINTF("Overflow\n");
+ trace_save_xbzrle_page_overflow();
acct_info.xbzrle_overflows++;
/* update data in the cache */
if (!last_stage) {
@@ -2020,8 +2012,7 @@ static int ram_save_iterate(QEMUFile *f, void *opaque)
if ((i & 63) == 0) {
uint64_t t1 = (qemu_clock_get_ns(QEMU_CLOCK_REALTIME) - t0) /
1000000;
if (t1 > MAX_WAIT) {
- DPRINTF("big wait: %" PRIu64 " milliseconds, %d iterations\n",
- t1, i);
+ trace_ram_save_iterate_big_wait(t1, i);
break;
}
}
@@ -2594,8 +2585,7 @@ static int ram_load(QEMUFile *f, void *opaque, int
version_id)
wait_for_decompress_done();
rcu_read_unlock();
- DPRINTF("Completed load of VM with exit code %d seq iteration "
- "%" PRIu64 "\n", ret, seq_iter);
+ trace_ram_load_complete(ret, seq_iter);
return ret;
}
diff --git a/migration/trace-events b/migration/trace-events
index 94134f7..6d781cf 100644
--- a/migration/trace-events
+++ b/migration/trace-events
@@ -186,6 +186,10 @@ postcopy_ram_incoming_cleanup_closeuf(void) ""
postcopy_ram_incoming_cleanup_entry(void) ""
postcopy_ram_incoming_cleanup_exit(void) ""
postcopy_ram_incoming_cleanup_join(void) ""
+save_xbzrle_page_skipping(void) ""
+save_xbzrle_page_overflow(void) ""
+ram_save_iterate_big_wait(uint64_t milliconds, int iterations) "big wait: %"
PRIu64 " milliseconds, %d iterations"
+ram_load_complete(int ret, uint64_t seq_iter) "exit_code %d seq iteration %"
PRIu64
# migration/exec.c
migration_exec_outgoing(const char *cmd) "cmd=%s"
--
2.9.3
- [Qemu-devel] [PATCH 00/17] multifd v3, Juan Quintela, 2017/01/23
- [Qemu-devel] [PATCH 01/17] migration: transform remained DPRINTF into trace_,
Juan Quintela <=
- [Qemu-devel] [PATCH 02/17] migration: create Migration Incoming State at init time, Juan Quintela, 2017/01/23
- [Qemu-devel] [PATCH 03/17] migration: Test for disabled features on reception, Juan Quintela, 2017/01/23
- [Qemu-devel] [PATCH 04/17] migration: Don't create decompression threads if not enabled, Juan Quintela, 2017/01/23
- [Qemu-devel] [PATCH 05/17] migration: Add multifd capability, Juan Quintela, 2017/01/23
- [Qemu-devel] [PATCH 06/17] migration: Create x-multifd-threads parameter, Juan Quintela, 2017/01/23
- [Qemu-devel] [PATCH 07/17] migration: Create x-multifd-group parameter, Juan Quintela, 2017/01/23