From patchwork Fri Dec 9 20:15:01 2011 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: 130457 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 731F41007D7 for ; Sat, 10 Dec 2011 07:15:22 +1100 (EST) Received: from localhost ([::1]:45203 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RZ6qi-0006ZP-Ou for incoming@patchwork.ozlabs.org; Fri, 09 Dec 2011 15:15:16 -0500 Received: from eggs.gnu.org ([140.186.70.92]:49004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RZ6qc-0006R2-Oz for qemu-devel@nongnu.org; Fri, 09 Dec 2011 15:15:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RZ6qb-0003Ce-S4 for qemu-devel@nongnu.org; Fri, 09 Dec 2011 15:15:10 -0500 Received: from gw.ac.upc.edu ([147.83.30.3]:40199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RZ6qb-0003CW-MK for qemu-devel@nongnu.org; Fri, 09 Dec 2011 15:15:09 -0500 Received: from localhost (unknown [84.88.53.92]) by gw.ac.upc.edu (Postfix) with ESMTP id 776116B01CA for ; Fri, 9 Dec 2011 21:15:08 +0100 (CET) To: qemu-devel@nongnu.org From: =?utf-8?b?TGx1w61z?= Vilanova Date: Fri, 09 Dec 2011 21:15:01 +0100 Message-ID: <20111209201501.11487.75460.stgit@ginnungagap.bsc.es> In-Reply-To: <20111209201430.11487.82078.stgit@ginnungagap.bsc.es> References: <20111209201430.11487.82078.stgit@ginnungagap.bsc.es> User-Agent: StGit/0.15 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 147.83.30.3 Subject: [Qemu-devel] [PATCH 2/7] trace: Add "vcpu_init" event X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signals the creation of a new vCPU (CPUState structure). Signed-off-by: LluĂ­s Vilanova --- cpus-user.c | 2 ++ cpus.c | 2 ++ trace-events | 7 +++++++ 3 files changed, 11 insertions(+), 0 deletions(-) diff --git a/cpus-user.c b/cpus-user.c index 50e45ce..69b580d 100644 --- a/cpus-user.c +++ b/cpus-user.c @@ -8,8 +8,10 @@ */ #include "qemu-common.h" +#include "trace.h" void qemu_init_vcpu(void *env) { + trace_vcpu_init(env); } diff --git a/cpus.c b/cpus.c index 82530c4..9049011 100644 --- a/cpus.c +++ b/cpus.c @@ -35,6 +35,7 @@ #include "qemu-thread.h" #include "cpus.h" #include "main-loop.h" +#include "trace.h" #ifndef _WIN32 #include "compatfd.h" @@ -944,6 +945,7 @@ void qemu_init_vcpu(void *_env) } else { qemu_tcg_init_vcpu(env); } + trace_vcpu_init(env); } void cpu_stop_current(void) diff --git a/trace-events b/trace-events index 962caca..1a2d302 100644 --- a/trace-events +++ b/trace-events @@ -631,3 +631,10 @@ win_helper_no_switch_pstate(uint32_t new_pstate_regs) "change_pstate: regs new=% win_helper_wrpil(uint32_t psrpil, uint32_t new_pil) "old=%x new=%x" win_helper_done(uint32_t tl) "tl=%d" win_helper_retry(uint32_t tl) "tl=%d" + +### Abstract events (not specific to a file; keep at bottom) + +## vCPU + +# Create a new vCPU (CPUState structure) +vcpu_init(void *vcpu) "%p"