mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
migration: Tally pre-copy, downtime and post-copy bytes independently
Provide information on the number of bytes copied in the pre-copy, downtime and post-copy phases of migration. Signed-off-by: David Edmondson <david.edmondson@oracle.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
4c2d0f6dca
commit
ae68066880
4 changed files with 34 additions and 1 deletions
|
@ -389,6 +389,13 @@ MigrationStats ram_counters;
|
|||
|
||||
static void ram_transferred_add(uint64_t bytes)
|
||||
{
|
||||
if (runstate_is_running()) {
|
||||
ram_counters.precopy_bytes += bytes;
|
||||
} else if (migration_in_postcopy()) {
|
||||
ram_counters.postcopy_bytes += bytes;
|
||||
} else {
|
||||
ram_counters.downtime_bytes += bytes;
|
||||
}
|
||||
ram_counters.transferred += bytes;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue