diff mbox

[v3,2/3] trace: Add event "guest_cpu_enter"

Message ID 147428971313.15111.18023030883528426840.stgit@fimbulvetr.bsc.es
State New
Headers show

Commit Message

Lluís Vilanova Sept. 19, 2016, 12:55 p.m. UTC
Signals the hot-plugging of a new virtual (guest) CPU.

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
---
 trace-events           |    8 ++++++++
 trace/control-target.c |    3 +++
 2 files changed, 11 insertions(+)
diff mbox

Patch

diff --git a/trace-events b/trace-events
index 616cc52..16a1cb4 100644
--- a/trace-events
+++ b/trace-events
@@ -142,6 +142,14 @@  memory_region_tb_write(int cpu_index, uint64_t addr, uint64_t value, unsigned si
 
 ### Guest events, keep at bottom
 
+
+## vCPU
+
+# Hot-plug a new virtual (guest) CPU
+#
+# Targets: all
+vcpu guest_cpu_enter(void)
+
 # @vaddr: Access' virtual address.
 # @info : Access' information (see below).
 #
diff --git a/trace/control-target.c b/trace/control-target.c
index 3b7d99b..52fcce5 100644
--- a/trace/control-target.c
+++ b/trace/control-target.c
@@ -9,6 +9,7 @@ 
 
 #include "qemu/osdep.h"
 #include "cpu.h"
+#include "trace.h"
 #include "trace/control.h"
 #include "translate-all.h"
 
@@ -117,4 +118,6 @@  void trace_init_vcpu(CPUState *vcpu)
             }
         }
     }
+
+    trace_guest_cpu_enter(vcpu);
 }