From patchwork Mon Sep 19 12:55:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Llu=C3=ADs_Vilanova?= X-Patchwork-Id: 671727 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sd5fs0mqDz9s5w for ; Mon, 19 Sep 2016 23:03:33 +1000 (AEST) Received: from localhost ([::1]:55251 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blyEM-0003aO-KN for incoming@patchwork.ozlabs.org; Mon, 19 Sep 2016 09:03:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bly9d-0008Gl-Ft for qemu-devel@nongnu.org; Mon, 19 Sep 2016 08:58:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bly9Z-000425-MI for qemu-devel@nongnu.org; Mon, 19 Sep 2016 08:58:37 -0400 Received: from roura.ac.upc.es ([147.83.33.10]:56970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bly9Z-0002u8-6C for qemu-devel@nongnu.org; Mon, 19 Sep 2016 08:58:33 -0400 Received: from gw-3.ac.upc.es (gw-3.ac.upc.es [147.83.30.9]) by roura.ac.upc.es (8.13.8/8.13.8) with ESMTP id u8JCtJnc016559; Mon, 19 Sep 2016 14:55:19 +0200 Received: from localhost (unknown [84.88.51.85]) by gw-3.ac.upc.es (Postfix) with ESMTPSA id C03CF18C; Mon, 19 Sep 2016 14:55:18 +0200 (CEST) From: =?utf-8?b?TGx1w61z?= Vilanova To: qemu-devel@nongnu.org Date: Mon, 19 Sep 2016 14:55:18 +0200 Message-Id: <147428971851.15111.8799439252178273840.stgit@fimbulvetr.bsc.es> X-Mailer: git-send-email 2.9.3 In-Reply-To: <147428970221.15111.18119365434664365867.stgit@fimbulvetr.bsc.es> References: <147428970221.15111.18119365434664365867.stgit@fimbulvetr.bsc.es> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-MIME-Autoconverted: from 8bit to quoted-printable by roura.ac.upc.es id u8JCtJnc016559 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 147.83.33.10 Subject: [Qemu-devel] [PATCH v3 3/3] trace: Add event "guest_cpu_reset" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stefan Hajnoczi Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signals the reset of the state a virtual (guest) CPU. Signed-off-by: LluĂ­s Vilanova --- qom/cpu.c | 3 +++ trace-events | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/qom/cpu.c b/qom/cpu.c index 7e2e523..5f0ec6e 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 16a1cb4..fd452c9 100644 --- a/trace-events +++ b/trace-events @@ -150,6 +150,11 @@ memory_region_tb_write(int cpu_index, uint64_t addr, uint64_t value, unsigned si # 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). #