From: Peter Xu <[email protected]> Postcopy can trigger this tracepoint twice, while only the 1st one is valid. Avoid triggering the 2nd tracepoint just like what we do with recording the total downtime.
Signed-off-by: Peter Xu <[email protected]> Tested-by: Jiri Denemark <[email protected]> Reviewed-by: Juraj Marcin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Fabiano Rosas <[email protected]> --- migration/migration.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index a9fe9c2821..07b6b730b7 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -129,9 +129,8 @@ static void migration_downtime_end(MigrationState *s) */ if (!s->downtime) { s->downtime = now - s->downtime_start; + trace_vmstate_downtime_checkpoint("src-downtime-end"); } - - trace_vmstate_downtime_checkpoint("src-downtime-end"); } static bool migration_needs_multiple_sockets(void) -- 2.35.3
