diff options
Diffstat (limited to 'migration')
-rw-r--r-- | migration/ram.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/migration/ram.c b/migration/ram.c index 3e500ae417..4dc786921e 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -172,6 +172,8 @@ struct RAMState { uint64_t norm_pages; /* Iterations since start */ uint64_t iterations; + /* xbzrle transmitted bytes */ + uint64_t xbzrle_bytes; }; typedef struct RAMState RAMState; @@ -179,7 +181,6 @@ static RAMState ram_state; /* accounting for migration statistics */ typedef struct AccountingInfo { - uint64_t xbzrle_bytes; uint64_t xbzrle_pages; uint64_t xbzrle_cache_miss; double xbzrle_cache_miss_rate; @@ -205,7 +206,7 @@ uint64_t norm_mig_pages_transferred(void) uint64_t xbzrle_mig_bytes_transferred(void) { - return acct_info.xbzrle_bytes; + return ram_state.xbzrle_bytes; } uint64_t xbzrle_mig_pages_transferred(void) @@ -544,7 +545,7 @@ static int save_xbzrle_page(RAMState *rs, QEMUFile *f, uint8_t **current_data, qemu_put_buffer(f, XBZRLE.encoded_buf, encoded_len); bytes_xbzrle += encoded_len + 1 + 2; acct_info.xbzrle_pages++; - acct_info.xbzrle_bytes += bytes_xbzrle; + rs->xbzrle_bytes += bytes_xbzrle; *bytes_transferred += bytes_xbzrle; return 1; @@ -1996,6 +1997,7 @@ static int ram_save_init_globals(RAMState *rs) rs->zero_pages = 0; rs->norm_pages = 0; rs->iterations = 0; + rs->xbzrle_bytes = 0; migration_bitmap_sync_init(rs); qemu_mutex_init(&migration_bitmap_mutex); |