- Timestamp:
- Mar 7, 2012 9:52:38 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/vm.h
r40235 r40397 94 94 /** Ring-0 Host Context VM Pointer. */ 95 95 PVMR0 pVMR0; 96 /** Flag indicating that tracing is enabled. */ 97 bool fTracingEnabled; 96 98 /** Alignment padding. */ 97 RTR0PTR pvR0Padding;99 uint8_t abAlignment0[HC_ARCH_BITS == 32 ? 3 : 7]; 98 100 /** Raw-mode Context VM Pointer. */ 99 101 PVMRC pVMRC; -
trunk/include/VBox/vmm/vm.mac
r40235 r40397 121 121 .pVMR3 RTR3PTR_RES 1 122 122 .pVMR0 RTR0PTR_RES 1 123 .pvR0Padding RTR0PTR_RES 1 123 .fTracingEnabled resb 1 124 %if HC_ARCH_BITS == 32 125 .abAlignment0 resb 3 126 %else 127 .abAlignment0 resb 7 128 %endif 124 129 .pVMRC RTRCPTR_RES 1 125 130 .idCpu resd 1 -
trunk/src/VBox/VMM/include/VMMTracing.h
r40380 r40397 43 43 #define VM_TO_HTB(a_pVM) ((a_pVM)->CTX_SUFF(hTraceBuf)) 44 44 45 /** Macro wrapper for trace points that are disabled by default. */ 46 #define TP_COND_VMCPU(a_pVCpu, a_TraceStmt) \ 47 do { \ 48 if (RT_UNLIKELY((a_pVCpu)->fTracingEnabled)) \ 49 { \ 50 RTTRACEBUF const hTB = (a_pVCpu)->CTX_SUFF(pVM)->CTX_SUFF(hTraceBuf); \ 51 a_TraceStmt; \ 52 } \ 53 } while (0) 54 55 56 45 57 46 58 /** @name Ring-3 trace points. … … 53 65 # elif defined(DBGFTRACE_ENABLED) 54 66 # define VBOXVMM_EM_STATE_CHANGED(a_pVCpu, a_enmOldState, a_enmNewState, a_rc) \ 55 RTTraceBufAddMsgF(VMCPU_TO_HTB(a_pVCpu), "em-state-changed %d -> %d (rc=%d)", a_enmOldState, a_enmNewState, a_rc)67 TP_COND_VMCPU(a_pVCpu, RTTraceBufAddMsgF(hTB, "em-state-changed %d -> %d (rc=%d)", a_enmOldState, a_enmNewState, a_rc)) 56 68 # define VBOXVMM_EM_STATE_UNCHANGED(a_pVCpu, a_enmState, a_rc) \ 57 RTTraceBufAddMsgF(VMCPU_TO_HTB(a_pVCpu), "em-state-unchanged %d (rc=%d)", a_enmState, a_rc)69 TP_COND_VMCPU(a_pVCpu, RTTraceBufAddMsgF(hTB, "em-state-unchanged %d (rc=%d)", a_enmState, a_rc)) 58 70 # define VBOXVMM_EM_RAW_RUN_PRE(a_pVCpu, a_pCtx) \ 59 RTTraceBufAddMsgF(VMCPU_TO_HTB(a_pVCpu), "em-raw-pre %04x:%08llx", (a_pCtx)->cs, (a_pCtx)->rip)71 TP_COND_VMCPU(a_pVCpu, RTTraceBufAddMsgF(hTB, "em-raw-pre %04x:%08llx", (a_pCtx)->cs, (a_pCtx)->rip)) 60 72 # define VBOXVMM_EM_RAW_RUN_RET(a_pVCpu, a_pCtx, a_rc) \ 61 RTTraceBufAddMsgF(VMCPU_TO_HTB(a_pVCpu), "em-raw-ret %04x:%08llx rc=%d", (a_pCtx)->cs, (a_pCtx)->rip, (a_rc))73 TP_COND_VMCPU(a_pVCpu, RTTraceBufAddMsgF(hTB, "em-raw-ret %04x:%08llx rc=%d", (a_pCtx)->cs, (a_pCtx)->rip, (a_rc))) 62 74 # define VBOXVMM_EM_FF_HIGH(a_pVCpu, a_fGlobal, a_fLocal, a_rc) \ 63 RTTraceBufAddMsgF(VMCPU_TO_HTB(a_pVCpu), "em-ff-high vm=%#x cpu=%#x rc=%d", (a_fGlobal), (a_fLocal), (a_rc))75 TP_COND_VMCPU(a_pVCpu, RTTraceBufAddMsgF(hTB, "em-ff-high vm=%#x cpu=%#x rc=%d", (a_fGlobal), (a_fLocal), (a_rc))) 64 76 # define VBOXVMM_EM_FF_ALL(a_pVCpu, a_fGlobal, a_fLocal, a_rc) \ 65 RTTraceBufAddMsgF(VMCPU_TO_HTB(a_pVCpu), "em-ff-all vm=%#x cpu=%#x rc=%d", (a_fGlobal), (a_fLocal), (a_rc))77 TP_COND_VMCPU(a_pVCpu, RTTraceBufAddMsgF(hTB, "em-ff-all vm=%#x cpu=%#x rc=%d", (a_fGlobal), (a_fLocal), (a_rc))) 66 78 # define VBOXVMM_EM_FF_ALL_RET(a_pVCpu, a_rc) \ 67 RTTraceBufAddMsgF(VMCPU_TO_HTB(a_pVCpu), "em-ff-all-ret %d", (a_rc))79 TP_COND_VMCPU(a_pVCpu, RTTraceBufAddMsgF(hTB, "em-ff-all-ret %d", (a_rc))) 68 80 # define VBOXVMM_EM_FF_RAW(a_pVCpu, a_fGlobal, a_fLocal) \ 69 RTTraceBufAddMsgF(VMCPU_TO_HTB(a_pVCpu), "em-ff-raw vm=%#x cpu=%#x", (a_fGlobal), (a_fLocal))81 TP_COND_VMCPU(a_pVCpu, RTTraceBufAddMsgF(hTB, "em-ff-raw vm=%#x cpu=%#x", (a_fGlobal), (a_fLocal))) 70 82 # define VBOXVMM_EM_FF_RAW_RET(a_pVCpu, a_rc) \ 71 RTTraceBufAddMsgF(VMCPU_TO_HTB(a_pVCpu), "em-ff-raw-ret %d", (a_rc))83 TP_COND_VMCPU(a_pVCpu, RTTraceBufAddMsgF(hTB, "em-ff-raw-ret %d", (a_rc))) 72 84 73 85 # else … … 84 96 # endif 85 97 #endif /* IN_RING3 */ 98 /** @} */ 86 99 87 100
Note:
See TracChangeset
for help on using the changeset viewer.