diff options
author | Peter Xu | 2017-08-30 10:32:01 +0200 |
---|---|---|
committer | Dr. David Alan Gilbert | 2017-09-06 17:36:38 +0200 |
commit | a31fedeed764ce0b0d6097d4334c5770e74641a0 (patch) | |
tree | 0115982cf1cb8051ee989bb4d50ae89aaec0e8f2 /migration/migration.c | |
parent | snapshot/tests: Try loadvm twice (diff) | |
download | qemu-a31fedeed764ce0b0d6097d4334c5770e74641a0.tar.gz qemu-a31fedeed764ce0b0d6097d4334c5770e74641a0.tar.xz qemu-a31fedeed764ce0b0d6097d4334c5770e74641a0.zip |
migration: dump str in migrate_set_state trace
Strings are more readable for debugging.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <1504081950-2528-5-git-send-email-peterx@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Fixed up merge with 977c73
Diffstat (limited to 'migration/migration.c')
-rw-r--r-- | migration/migration.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/migration/migration.c b/migration/migration.c index 9838ccc885..959e8ec88e 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -913,8 +913,9 @@ void qmp_migrate_start_postcopy(Error **errp) void migrate_set_state(int *state, int old_state, int new_state) { + assert(new_state < MIGRATION_STATUS__MAX); if (atomic_cmpxchg(state, old_state, new_state) == old_state) { - trace_migrate_set_state(new_state); + trace_migrate_set_state(MigrationStatus_str(new_state)); migrate_generate_event(new_state); } } |