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
This commit is contained in:
parent
04583a9e8f
commit
a31fedeed7
@ -913,8 +913,9 @@ void qmp_migrate_start_postcopy(Error **errp)
|
|||||||
|
|
||||||
void migrate_set_state(int *state, int old_state, int new_state)
|
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) {
|
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);
|
migrate_generate_event(new_state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ ram_save_queue_pages(const char *rbname, size_t start, size_t len) "%s: start: 0
|
|||||||
# migration/migration.c
|
# migration/migration.c
|
||||||
await_return_path_close_on_source_close(void) ""
|
await_return_path_close_on_source_close(void) ""
|
||||||
await_return_path_close_on_source_joining(void) ""
|
await_return_path_close_on_source_joining(void) ""
|
||||||
migrate_set_state(int new_state) "new state %d"
|
migrate_set_state(const char *new_state) "new state %s"
|
||||||
migrate_fd_cleanup(void) ""
|
migrate_fd_cleanup(void) ""
|
||||||
migrate_fd_error(const char *error_desc) "error=%s"
|
migrate_fd_error(const char *error_desc) "error=%s"
|
||||||
migrate_fd_cancel(void) ""
|
migrate_fd_cancel(void) ""
|
||||||
|
Loading…
Reference in New Issue
Block a user