trace: Add event "guest_cpu_reset"
authorLluís Vilanova <vilanova@ac.upc.edu>
Mon, 19 Sep 2016 12:55:18 +0000 (14:55 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 28 Sep 2016 18:17:55 +0000 (19:17 +0100)
Signals the reset of the state a virtual (guest) CPU.

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Message-id: 147428971851.15111.8799439252178273840.stgit@fimbulvetr.bsc.es
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
qom/cpu.c
trace-events

index f87fffabd12e3c93ed702948bcb83387f6d8d6de..484c49388d6d0f1c23b07fa613419501ead9c2e0 100644 (file)
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -29,6 +29,7 @@
 #include "qemu/error-report.h"
 #include "sysemu/sysemu.h"
 #include "hw/qdev-properties.h"
+#include "trace.h"
 
 bool cpu_exists(int64_t id)
 {
@@ -245,6 +246,8 @@ void cpu_reset(CPUState *cpu)
     if (klass->reset != NULL) {
         (*klass->reset)(cpu);
     }
+
+    trace_guest_cpu_reset(cpu);
 }
 
 static void cpu_common_reset(CPUState *cpu)
index 0492c960dbe16147105d770f4f1585f00a0a7716..fb96f6c33312cc26153cd8bdd1711e2199ff23ea 100644 (file)
@@ -148,6 +148,11 @@ colo_filter_rewriter_conn_offset(uint32_t offset) ": offset=%u\n"
 # Targets: all
 vcpu guest_cpu_enter(void)
 
+# Reset the state of a virtual (guest) CPU
+#
+# Targets: all
+vcpu guest_cpu_reset(void)
+
 # @vaddr: Access' virtual address.
 # @info : Access' information (see below).
 #