From 2cc2d082b52ef0aa9bffff512ce552391405ce9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Vilanova?= Date: Mon, 19 Sep 2016 14:55:18 +0200 Subject: [PATCH] trace: Add event "guest_cpu_reset" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signals the reset of the state a virtual (guest) CPU. Signed-off-by: LluĂ­s Vilanova Message-id: 147428971851.15111.8799439252178273840.stgit@fimbulvetr.bsc.es Signed-off-by: Stefan Hajnoczi --- qom/cpu.c | 3 +++ trace-events | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/qom/cpu.c b/qom/cpu.c index f87fffabd1..484c49388d 100644 --- 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) diff --git a/trace-events b/trace-events index 0492c960db..fb96f6c333 100644 --- a/trace-events +++ b/trace-events @@ -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). #