Skip to content

Commit caea30d

Browse files
committed
CP-50836: Add VM_migrate_downtime and request_shutdown spans
This simplifies making optimisations as it removes the need to look in the logs for these events. Signed-off-by: Steven Woods <[email protected]>
1 parent e2f1ffd commit caea30d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

ocaml/xenopsd/lib/xenops_server.ml

+1
Original file line numberDiff line numberDiff line change
@@ -2988,6 +2988,7 @@ and perform_exn ?result (op : operation) (t : Xenops_task.task_handle) : unit =
29882988
]
29892989
)
29902990
t ;
2991+
with_tracing ~task:t ~name:"VM_migrate_downtime_end" Fun.id ;
29912992
Handshake.send s Handshake.Success ;
29922993
debug "VM.receive_memory: Synchronisation point 4"
29932994
with e ->

ocaml/xenopsd/xc/xenops_server_xen.ml

+8
Original file line numberDiff line numberDiff line change
@@ -2515,6 +2515,7 @@ module VM = struct
25152515
@@ fun () -> pre_suspend_callback task
25162516
) ;
25172517

2518+
with_tracing ~task ~name:"VM_save_request_shutdown" @@ fun () ->
25182519
if
25192520
not
25202521
( with_tracing ~task
@@ -2523,6 +2524,13 @@ module VM = struct
25232524
)
25242525
then
25252526
raise (Xenopsd_error Failed_to_acknowledge_suspend_request) ;
2527+
(* If this is for a migration, record the begin time *)
2528+
( match data with
2529+
| FD _ ->
2530+
with_tracing ~task ~name:"VM_migrate_downtime_begin" Fun.id
2531+
| _ ->
2532+
()
2533+
) ;
25262534
if
25272535
not
25282536
( with_tracing ~task

0 commit comments

Comments
 (0)