Skip to content

Commit

Permalink
migration: Trace event and migration event are different things
Browse files Browse the repository at this point in the history
We can want the trace event even without migration events enabled.

Reported-by:  Wen Congyang <ghostwcy@gmail.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
  • Loading branch information
Juan Quintela committed Jul 15, 2015
1 parent 172c435 commit 4ba4bc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migration/migration.c
Expand Up @@ -216,7 +216,6 @@ static void migrate_generate_event(int new_state)
{
if (migrate_use_events()) {
qapi_event_send_migration(new_state, &error_abort);
trace_migrate_set_state(new_state);
}
}

Expand Down Expand Up @@ -528,6 +527,7 @@ void qmp_migrate_set_parameters(bool has_compress_level,
static void migrate_set_state(MigrationState *s, int old_state, int new_state)
{
if (atomic_cmpxchg(&s->state, old_state, new_state) == old_state) {
trace_migrate_set_state(new_state);
migrate_generate_event(new_state);
}
}
Expand Down

0 comments on commit 4ba4bc5

Please sign in to comment.