diff options
author | Peter Xu <peterx@redhat.com> | 2017-08-30 16:32:01 +0800 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2017-09-06 16:36:38 +0100 |
commit | a31fedeed764ce0b0d6097d4334c5770e74641a0 (patch) | |
tree | 0115982cf1cb8051ee989bb4d50ae89aaec0e8f2 /migration/migration.c | |
parent | 04583a9e8fbeb2c5c0607327b853b306aef7465f (diff) | |
download | qemu-a31fedeed764ce0b0d6097d4334c5770e74641a0.zip qemu-a31fedeed764ce0b0d6097d4334c5770e74641a0.tar.gz qemu-a31fedeed764ce0b0d6097d4334c5770e74641a0.tar.bz2 |
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 9838ccc..959e8ec 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); } } |