diff --git a/system/cpus.c b/system/cpus.c index d9de09b9e87b5f5d4eab095e38f7ca2ed942b2ba..9af5e221577926e3ea883ae89d5055bfb25183db 100644 --- a/system/cpus.c +++ b/system/cpus.c @@ -281,6 +281,8 @@ static int do_vm_stop(RunState state, bool send_stop) runstate_set(state); cpu_disable_ticks(); pause_all_vcpus(); + trace_all_vcpus_paused(); + vm_state_notify(0, state); if (send_stop) { qapi_event_send_stop(); @@ -752,6 +754,7 @@ int vm_prepare_start(bool step_pending) cpu_enable_ticks(); runstate_set(RUN_STATE_RUNNING); vm_state_notify(1, RUN_STATE_RUNNING); + trace_all_vcpus_prepared(); return 0; } diff --git a/system/trace-events b/system/trace-events index 69c9044151bc6016e7be4bff91f35218c990d073..ba0966497ba189a1af450d69d805b0878041d089 100644 --- a/system/trace-events +++ b/system/trace-events @@ -23,6 +23,8 @@ global_dirty_changed(unsigned int bitmask) "bitmask 0x%"PRIx32 # cpus.c vm_stop_flush_all(int ret) "ret %d" +all_vcpus_paused(void) "" +all_vcpus_prepared(void) "" # vl.c vm_state_notify(int running, int reason, const char *reason_str) "running %d reason %d (%s)"