diff mbox

[PULL,4/4] trace: Add event "guest_cpu_exit"

Message ID 20170116134455.28636-5-stefanha@redhat.com
State New
Headers show

Commit Message

Stefan Hajnoczi Jan. 16, 2017, 1:44 p.m. UTC
From: Lluís Vilanova <vilanova@ac.upc.edu>

Signals the hot-unplugging of a virtual (guest) CPU.

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Message-id: 148278748597.1404.10546320797997984932.stgit@fimbulvetr.bsc.es
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 trace/control.c | 3 +++
 trace-events    | 6 ++++++
 2 files changed, 9 insertions(+)
diff mbox

Patch

diff --git a/trace/control.c b/trace/control.c
index cb79bb1..56a2632 100644
--- a/trace/control.c
+++ b/trace/control.c
@@ -26,6 +26,7 @@ 
 #include "qemu/error-report.h"
 #include "qemu/config-file.h"
 #include "monitor/monitor.h"
+#include "trace.h"
 
 int trace_events_enabled_count;
 
@@ -264,6 +265,8 @@  void trace_fini_vcpu(CPUState *vcpu)
     TraceEventIter iter;
     TraceEvent *ev;
 
+    trace_guest_cpu_exit(vcpu);
+
     trace_event_iter_init(&iter, NULL);
     while ((ev = trace_event_iter_next(&iter)) != NULL) {
         if (trace_event_is_vcpu(ev) &&
diff --git a/trace-events b/trace-events
index 2c66780..839a9d0 100644
--- a/trace-events
+++ b/trace-events
@@ -141,6 +141,12 @@  memory_region_ram_device_write(int cpu_index, void *mr, uint64_t addr, uint64_t
 # Targets: all
 vcpu guest_cpu_enter(void)
 
+# Hot-unplug a virtual (guest) CPU
+#
+# Mode: user, softmmu
+# Targets: all
+vcpu guest_cpu_exit(void)
+
 # Reset the state of a virtual (guest) CPU
 #
 # Mode: user, softmmu