VMMTracing.h revision 081ebff44a3ac7e68d9897f59d54c7973dd6066c
/* $Id$ */
/** @file
* VBoxVMM - Trace point macros for the VMM.
*/
/*
* Copyright (C) 2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef ___VMMTracing_h___
#define ___VMMTracing_h___
/*******************************************************************************
* Header Files *
*******************************************************************************/
#ifdef DOXYGEN_RUNNING
# define DBGFTRACE_ENABLED
#endif
/*******************************************************************************
* Defined Constants And Macros *
*******************************************************************************/
/** Gets the trace buffer handle from a VMCPU pointer. */
/** Gets the trace buffer handle from a VMCPU pointer. */
/** @name Ring-3 trace points.
* @{
*/
#ifdef IN_RING3
# ifdef VBOX_WITH_DTRACE_R3
# include "VBoxVMM-dtrace.h"
# elif defined(DBGFTRACE_ENABLED)
RTTraceBufAddMsgF(VMCPU_TO_HTB(a_pVCpu), "em-state-changed %d -> %d (rc=%d)", a_enmOldState, a_enmNewState, a_rc)
RTTraceBufAddMsgF(VMCPU_TO_HTB(a_pVCpu), "em-raw-ret %04x:%08llx rc=%d", (a_pCtx)->cs, (a_pCtx)->rip, (a_rc))
RTTraceBufAddMsgF(VMCPU_TO_HTB(a_pVCpu), "em-ff-high vm=%#x cpu=%#x rc=%d", (a_fGlobal), (a_fLocal), (a_rc))
RTTraceBufAddMsgF(VMCPU_TO_HTB(a_pVCpu), "em-ff-all vm=%#x cpu=%#x rc=%d", (a_fGlobal), (a_fLocal), (a_rc))
# else
# endif
#endif /* IN_RING3 */
/** @name Ring-0 trace points.
* @{
*/
#ifdef IN_RING0
# ifdef VBOX_WITH_DTRACE_R0
# include "VBoxVMMR0-dtrace.h"
# elif defined(DBGFTRACE_ENABLED)
# else
# endif
#endif /* IN_RING0*/
/** @} */
/** @} */
#endif