Commit 9b45833b authored by Pavel Emelyanov's avatar Pavel Emelyanov

stats: Account total time to restore

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 2df39a4b
......@@ -1389,6 +1389,8 @@ out:
return 1;
}
timing_stop(TIME_RESTORE);
pr_info("Restore finished successfully. Resuming tasks.\n");
futex_set_and_wake(&task_entries->start, CR_STATE_COMPLETE);
......@@ -1423,6 +1425,8 @@ int cr_restore_tasks(void)
if (init_stats(RESTORE_STATS))
return -1;
timing_start(TIME_RESTORE);
if (cpu_init() < 0)
return -1;
......
......@@ -13,6 +13,7 @@ enum {
enum {
TIME_FORK,
TIME_RESTORE,
RESTORE_TIME_NS_STATS,
};
......
......@@ -15,6 +15,7 @@ message restore_stats_entry {
required uint64 pages_skipped_cow = 2;
required uint32 forking_time = 3;
required uint32 restore_time = 4;
}
message stats_entry {
......
......@@ -132,6 +132,7 @@ void write_stats(int what)
rs_entry.pages_skipped_cow = atomic_get(&rstats->counts[CNT_PAGES_SKIPPED_COW]);
encode_time(TIME_FORK, &rs_entry.forking_time);
encode_time(TIME_RESTORE, &rs_entry.restore_time);
name = "restore";
} else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment