* Peter Xu (pet...@redhat.com) wrote: > Strings are more readable for debugging. > > Signed-off-by: Peter Xu <pet...@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com> > --- > migration/migration.c | 3 ++- > migration/trace-events | 2 +- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/migration/migration.c b/migration/migration.c > index 6803187..bdc4445 100644 > --- a/migration/migration.c > +++ b/migration/migration.c > @@ -914,8 +914,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_lookup[new_state]); > migrate_generate_event(new_state); > } > } > diff --git a/migration/trace-events b/migration/trace-events > index cb2c4b5..08d00fa 100644 > --- a/migration/trace-events > +++ b/migration/trace-events > @@ -80,7 +80,7 @@ ram_save_queue_pages(const char *rbname, size_t start, > size_t len) "%s: start: % > # migration/migration.c > await_return_path_close_on_source_close(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_error(const char *error_desc) "error=%s" > migrate_fd_cancel(void) "" > -- > 2.7.4 > -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK