[CRIU] [PATCH 6/6] Refactor time accounting macros
Abhishek Dubey
dubeyabhishek777 at gmail.com
Thu Jul 25 04:14:32 MSK 2019
adjusted positioning of memdump-timing macros.
Updated position of macros in accordance to
new implementation(using process_vm_readv) of
pre-dump algorithm
Signed-off-by: Abhishek Dubey <dubeyabhishek777 at gmail.com>
---
criu/cr-dump.c | 2 ++
criu/page-xfer.c | 7 +++++++
2 files changed, 9 insertions(+)
diff --git a/criu/cr-dump.c b/criu/cr-dump.c
index 4569372..4ce5b00 100644
--- a/criu/cr-dump.c
+++ b/criu/cr-dump.c
@@ -1513,6 +1513,8 @@ static int cr_pre_dump_finish(int status)
goto err;
mem_pp = dmpi(item)->mem_pp;
+ timing_stop(TIME_MEMWRITE);
+
ret = page_xfer_predump_pages(item->pid->real, &xfer, mem_pp);
xfer.close(&xfer);
diff --git a/criu/page-xfer.c b/criu/page-xfer.c
index 40ec29e..d4b02ae 100644
--- a/criu/page-xfer.c
+++ b/criu/page-xfer.c
@@ -626,6 +626,7 @@ int page_xfer_predump_pages(int pid, struct page_xfer *xfer, struct page_pipe *p
list_for_each_entry(ppb, &pp->bufs, l) {
+ timing_start(TIME_MEMDUMP);
pages_read = processing_ppb_userbuf(pid, ppb, &bufvec);
if (pages_read == -1)
@@ -640,6 +641,9 @@ int page_xfer_predump_pages(int pid, struct page_xfer *xfer, struct page_pipe *p
return -1;
}
+ timing_stop(TIME_MEMDUMP);
+
+ timing_start(TIME_MEMWRITE);
/* generating pagemap */
for (i = 0; i < ppb->nr_segs; i++) {
@@ -668,8 +672,11 @@ int page_xfer_predump_pages(int pid, struct page_xfer *xfer, struct page_pipe *p
}
+ timing_stop(TIME_MEMWRITE);
}
+ timing_start(TIME_MEMWRITE);
+
return dump_holes(xfer, pp, &cur_hole, NULL);
}
--
2.7.4
More information about the CRIU
mailing list