mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
stats: Add writing-memory-image timing
Dumping memory is draining it from parasite, for pre-dump this time would be reasonably small. _Writing_ the memory would occur _after_ tasks unseize and resume. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
2
mem.c
2
mem.c
@@ -358,6 +358,7 @@ static int __parasite_dump_pages_seized(struct parasite_ctl *ctl,
|
||||
args->off += args->nr_segs;
|
||||
}
|
||||
|
||||
timing_start(TIME_MEMWRITE);
|
||||
ret = open_page_xfer(&xfer, CR_FD_PAGEMAP, ctl->pid.virt);
|
||||
if (ret < 0)
|
||||
goto out_pp;
|
||||
@@ -365,6 +366,7 @@ static int __parasite_dump_pages_seized(struct parasite_ctl *ctl,
|
||||
ret = page_xfer_dump_pages(&xfer, pp, 0);
|
||||
|
||||
xfer.close(&xfer);
|
||||
timing_stop(TIME_MEMWRITE);
|
||||
task_reset_dirty_track(ctl->pid.real);
|
||||
out_pp:
|
||||
destroy_page_pipe(pp);
|
||||
|
Reference in New Issue
Block a user