From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51114) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpMSK-0001H6-Iq for qemu-devel@nongnu.org; Wed, 28 Sep 2016 17:31:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpMSI-000537-MQ for qemu-devel@nongnu.org; Wed, 28 Sep 2016 17:31:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpMSI-00052y-Fx for qemu-devel@nongnu.org; Wed, 28 Sep 2016 17:31:54 -0400 From: Stefan Hajnoczi Date: Wed, 28 Sep 2016 22:31:32 +0100 Message-Id: <1475098293-13262-8-git-send-email-stefanha@redhat.com> In-Reply-To: <1475098293-13262-1-git-send-email-stefanha@redhat.com> References: <1475098293-13262-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 7/8] trace: Add event "guest_cpu_reset" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , =?UTF-8?q?Llu=C3=ADs=20Vilanova?= , Stefan Hajnoczi From: Llu=C3=ADs Vilanova Signals the reset of the state a virtual (guest) CPU. Signed-off-by: Llu=C3=ADs Vilanova Message-id: 147428971851.15111.8799439252178273840.stgit@fimbulvetr.bsc.e= s 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 f87fffa..484c493 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" =20 bool cpu_exists(int64_t id) { @@ -245,6 +246,8 @@ void cpu_reset(CPUState *cpu) if (klass->reset !=3D NULL) { (*klass->reset)(cpu); } + + trace_guest_cpu_reset(cpu); } =20 static void cpu_common_reset(CPUState *cpu) diff --git a/trace-events b/trace-events index 0492c96..fb96f6c 100644 --- a/trace-events +++ b/trace-events @@ -148,6 +148,11 @@ colo_filter_rewriter_conn_offset(uint32_t offset) ":= offset=3D%u\n" # Targets: all vcpu guest_cpu_enter(void) =20 +# Reset the state of a virtual (guest) CPU +# +# Targets: all +vcpu guest_cpu_reset(void) + # @vaddr: Access' virtual address. # @info : Access' information (see below). # --=20 2.7.4