Changeset 13701 in vbox
- Timestamp:
- Oct 30, 2008 11:31:19 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm.h
r13698 r13701 104 104 /** Set the VM runtime error message. */ 105 105 VMMCALLHOST_VM_SET_RUNTIME_ERROR, 106 /** Signal a ring 0 hypervisorassertion. */107 VMMCALLHOST_VM_R0_ HYPER_ASSERTION,106 /** Signal a ring 0 assertion. */ 107 VMMCALLHOST_VM_R0_ASSERTION, 108 108 /** The usual 32-bit hack. */ 109 109 VMMCALLHOST_32BIT_HACK = 0x7fffffff -
trunk/src/VBox/VMM/VMM.cpp
r13698 r13701 137 137 *******************************************************************************/ 138 138 static int vmmR3InitCoreCode(PVM pVM); 139 static void vmmR3InitRegisterStats(PVM pVM); 139 140 static DECLCALLBACK(int) vmmR3Save(PVM pVM, PSSMHANDLE pSSM); 140 141 static DECLCALLBACK(int) vmmR3Load(PVM pVM, PSSMHANDLE pSSM, uint32_t u32Version); … … 218 219 * (The page protection is modifed during R3 init completion.) 219 220 */ 220 /** @todo SMP: Per vCPU . */221 /** @todo SMP: Per vCPU, split up into functions. */ 221 222 #ifdef VBOX_STRICT_VMM_STACK 222 223 rc = MMHyperAlloc(pVM, VMM_STACK_SIZE + PAGE_SIZE + PAGE_SIZE, PAGE_SIZE, MM_TAG_VMM, (void **)&pVM->vmm.s.pbHCStack); … … 295 296 { 296 297 /* 297 * Debug info .298 * Debug info and statistics. 298 299 */ 299 300 DBGFR3InfoRegisterInternal(pVM, "ff", "Displays the current Forced actions Flags.", vmmR3InfoFF); 300 301 /* 302 * Statistics. 303 */ 304 STAM_REG(pVM, &pVM->vmm.s.StatRunGC, STAMTYPE_COUNTER, "/VMM/RunGC", STAMUNIT_OCCURENCES, "Number of context switches."); 305 STAM_REG(pVM, &pVM->vmm.s.StatGCRetNormal, STAMTYPE_COUNTER, "/VMM/GCRet/Normal", STAMUNIT_OCCURENCES, "Number of VINF_SUCCESS returns."); 306 STAM_REG(pVM, &pVM->vmm.s.StatGCRetInterrupt, STAMTYPE_COUNTER, "/VMM/GCRet/Interrupt", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_INTERRUPT returns."); 307 STAM_REG(pVM, &pVM->vmm.s.StatGCRetInterruptHyper, STAMTYPE_COUNTER, "/VMM/GCRet/InterruptHyper", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_INTERRUPT_HYPER returns."); 308 STAM_REG(pVM, &pVM->vmm.s.StatGCRetGuestTrap, STAMTYPE_COUNTER, "/VMM/GCRet/GuestTrap", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_GUEST_TRAP returns."); 309 STAM_REG(pVM, &pVM->vmm.s.StatGCRetRingSwitch, STAMTYPE_COUNTER, "/VMM/GCRet/RingSwitch", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_RING_SWITCH returns."); 310 STAM_REG(pVM, &pVM->vmm.s.StatGCRetRingSwitchInt, STAMTYPE_COUNTER, "/VMM/GCRet/RingSwitchInt", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_RING_SWITCH_INT returns."); 311 STAM_REG(pVM, &pVM->vmm.s.StatGCRetExceptionPrivilege, STAMTYPE_COUNTER, "/VMM/GCRet/ExceptionPrivilege", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_EXCEPTION_PRIVILEGED returns."); 312 STAM_REG(pVM, &pVM->vmm.s.StatGCRetStaleSelector, STAMTYPE_COUNTER, "/VMM/GCRet/StaleSelector", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_STALE_SELECTOR returns."); 313 STAM_REG(pVM, &pVM->vmm.s.StatGCRetIRETTrap, STAMTYPE_COUNTER, "/VMM/GCRet/IRETTrap", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_IRET_TRAP returns."); 314 STAM_REG(pVM, &pVM->vmm.s.StatGCRetEmulate, STAMTYPE_COUNTER, "/VMM/GCRet/Emulate", STAMUNIT_OCCURENCES, "Number of VINF_EM_EXECUTE_INSTRUCTION returns."); 315 STAM_REG(pVM, &pVM->vmm.s.StatGCRetPatchEmulate, STAMTYPE_COUNTER, "/VMM/GCRet/PatchEmulate", STAMUNIT_OCCURENCES, "Number of VINF_PATCH_EMULATE_INSTR returns."); 316 STAM_REG(pVM, &pVM->vmm.s.StatGCRetIORead, STAMTYPE_COUNTER, "/VMM/GCRet/IORead", STAMUNIT_OCCURENCES, "Number of VINF_IOM_HC_IOPORT_READ returns."); 317 STAM_REG(pVM, &pVM->vmm.s.StatGCRetIOWrite, STAMTYPE_COUNTER, "/VMM/GCRet/IOWrite", STAMUNIT_OCCURENCES, "Number of VINF_IOM_HC_IOPORT_WRITE returns."); 318 STAM_REG(pVM, &pVM->vmm.s.StatGCRetMMIORead, STAMTYPE_COUNTER, "/VMM/GCRet/MMIORead", STAMUNIT_OCCURENCES, "Number of VINF_IOM_HC_MMIO_READ returns."); 319 STAM_REG(pVM, &pVM->vmm.s.StatGCRetMMIOWrite, STAMTYPE_COUNTER, "/VMM/GCRet/MMIOWrite", STAMUNIT_OCCURENCES, "Number of VINF_IOM_HC_MMIO_WRITE returns."); 320 STAM_REG(pVM, &pVM->vmm.s.StatGCRetMMIOReadWrite, STAMTYPE_COUNTER, "/VMM/GCRet/MMIOReadWrite", STAMUNIT_OCCURENCES, "Number of VINF_IOM_HC_MMIO_READ_WRITE returns."); 321 STAM_REG(pVM, &pVM->vmm.s.StatGCRetMMIOPatchRead, STAMTYPE_COUNTER, "/VMM/GCRet/MMIOPatchRead", STAMUNIT_OCCURENCES, "Number of VINF_IOM_HC_MMIO_PATCH_READ returns."); 322 STAM_REG(pVM, &pVM->vmm.s.StatGCRetMMIOPatchWrite, STAMTYPE_COUNTER, "/VMM/GCRet/MMIOPatchWrite", STAMUNIT_OCCURENCES, "Number of VINF_IOM_HC_MMIO_PATCH_WRITE returns."); 323 STAM_REG(pVM, &pVM->vmm.s.StatGCRetLDTFault, STAMTYPE_COUNTER, "/VMM/GCRet/LDTFault", STAMUNIT_OCCURENCES, "Number of VINF_EM_EXECUTE_INSTRUCTION_GDT_FAULT returns."); 324 STAM_REG(pVM, &pVM->vmm.s.StatGCRetGDTFault, STAMTYPE_COUNTER, "/VMM/GCRet/GDTFault", STAMUNIT_OCCURENCES, "Number of VINF_EM_EXECUTE_INSTRUCTION_LDT_FAULT returns."); 325 STAM_REG(pVM, &pVM->vmm.s.StatGCRetIDTFault, STAMTYPE_COUNTER, "/VMM/GCRet/IDTFault", STAMUNIT_OCCURENCES, "Number of VINF_EM_EXECUTE_INSTRUCTION_IDT_FAULT returns."); 326 STAM_REG(pVM, &pVM->vmm.s.StatGCRetTSSFault, STAMTYPE_COUNTER, "/VMM/GCRet/TSSFault", STAMUNIT_OCCURENCES, "Number of VINF_EM_EXECUTE_INSTRUCTION_TSS_FAULT returns."); 327 STAM_REG(pVM, &pVM->vmm.s.StatGCRetPDFault, STAMTYPE_COUNTER, "/VMM/GCRet/PDFault", STAMUNIT_OCCURENCES, "Number of VINF_EM_EXECUTE_INSTRUCTION_PD_FAULT returns."); 328 STAM_REG(pVM, &pVM->vmm.s.StatGCRetCSAMTask, STAMTYPE_COUNTER, "/VMM/GCRet/CSAMTask", STAMUNIT_OCCURENCES, "Number of VINF_CSAM_PENDING_ACTION returns."); 329 STAM_REG(pVM, &pVM->vmm.s.StatGCRetSyncCR3, STAMTYPE_COUNTER, "/VMM/GCRet/SyncCR", STAMUNIT_OCCURENCES, "Number of VINF_PGM_SYNC_CR3 returns."); 330 STAM_REG(pVM, &pVM->vmm.s.StatGCRetMisc, STAMTYPE_COUNTER, "/VMM/GCRet/Misc", STAMUNIT_OCCURENCES, "Number of misc returns."); 331 STAM_REG(pVM, &pVM->vmm.s.StatGCRetPatchInt3, STAMTYPE_COUNTER, "/VMM/GCRet/PatchInt3", STAMUNIT_OCCURENCES, "Number of VINF_PATM_PATCH_INT3 returns."); 332 STAM_REG(pVM, &pVM->vmm.s.StatGCRetPatchPF, STAMTYPE_COUNTER, "/VMM/GCRet/PatchPF", STAMUNIT_OCCURENCES, "Number of VINF_PATM_PATCH_TRAP_PF returns."); 333 STAM_REG(pVM, &pVM->vmm.s.StatGCRetPatchGP, STAMTYPE_COUNTER, "/VMM/GCRet/PatchGP", STAMUNIT_OCCURENCES, "Number of VINF_PATM_PATCH_TRAP_GP returns."); 334 STAM_REG(pVM, &pVM->vmm.s.StatGCRetPatchIretIRQ, STAMTYPE_COUNTER, "/VMM/GCRet/PatchIret", STAMUNIT_OCCURENCES, "Number of VINF_PATM_PENDING_IRQ_AFTER_IRET returns."); 335 STAM_REG(pVM, &pVM->vmm.s.StatGCRetPageOverflow, STAMTYPE_COUNTER, "/VMM/GCRet/InvlpgOverflow", STAMUNIT_OCCURENCES, "Number of VERR_REM_FLUSHED_PAGES_OVERFLOW returns."); 336 STAM_REG(pVM, &pVM->vmm.s.StatGCRetRescheduleREM, STAMTYPE_COUNTER, "/VMM/GCRet/ScheduleREM", STAMUNIT_OCCURENCES, "Number of VINF_EM_RESCHEDULE_REM returns."); 337 STAM_REG(pVM, &pVM->vmm.s.StatGCRetToR3, STAMTYPE_COUNTER, "/VMM/GCRet/ToR3", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_TO_R3 returns."); 338 STAM_REG(pVM, &pVM->vmm.s.StatGCRetTimerPending, STAMTYPE_COUNTER, "/VMM/GCRet/TimerPending", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_TIMER_PENDING returns."); 339 STAM_REG(pVM, &pVM->vmm.s.StatGCRetInterruptPending, STAMTYPE_COUNTER, "/VMM/GCRet/InterruptPending", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_INTERRUPT_PENDING returns."); 340 STAM_REG(pVM, &pVM->vmm.s.StatGCRetCallHost, STAMTYPE_COUNTER, "/VMM/GCRet/CallHost/Misc", STAMUNIT_OCCURENCES, "Number of VINF_VMM_CALL_HOST returns."); 341 STAM_REG(pVM, &pVM->vmm.s.StatGCRetPGMGrowRAM, STAMTYPE_COUNTER, "/VMM/GCRet/CallHost/GrowRAM", STAMUNIT_OCCURENCES, "Number of VINF_VMM_CALL_HOST returns."); 342 STAM_REG(pVM, &pVM->vmm.s.StatGCRetPDMLock, STAMTYPE_COUNTER, "/VMM/GCRet/CallHost/PDMLock", STAMUNIT_OCCURENCES, "Number of VINF_VMM_CALL_HOST returns."); 343 STAM_REG(pVM, &pVM->vmm.s.StatGCRetLogFlush, STAMTYPE_COUNTER, "/VMM/GCRet/CallHost/LogFlush", STAMUNIT_OCCURENCES, "Number of VINF_VMM_CALL_HOST returns."); 344 STAM_REG(pVM, &pVM->vmm.s.StatGCRetPDMQueueFlush, STAMTYPE_COUNTER, "/VMM/GCRet/CallHost/QueueFlush", STAMUNIT_OCCURENCES, "Number of VINF_VMM_CALL_HOST returns."); 345 STAM_REG(pVM, &pVM->vmm.s.StatGCRetPGMPoolGrow, STAMTYPE_COUNTER, "/VMM/GCRet/CallHost/PGMPoolGrow",STAMUNIT_OCCURENCES, "Number of VINF_VMM_CALL_HOST returns."); 346 STAM_REG(pVM, &pVM->vmm.s.StatGCRetRemReplay, STAMTYPE_COUNTER, "/VMM/GCRet/CallHost/REMReplay", STAMUNIT_OCCURENCES, "Number of VINF_VMM_CALL_HOST returns."); 347 STAM_REG(pVM, &pVM->vmm.s.StatGCRetVMSetError, STAMTYPE_COUNTER, "/VMM/GCRet/CallHost/VMSetError", STAMUNIT_OCCURENCES, "Number of VINF_VMM_CALL_HOST returns."); 348 STAM_REG(pVM, &pVM->vmm.s.StatGCRetPGMLock, STAMTYPE_COUNTER, "/VMM/GCRet/CallHost/PGMLock", STAMUNIT_OCCURENCES, "Number of VINF_VMM_CALL_HOST returns."); 349 STAM_REG(pVM, &pVM->vmm.s.StatGCRetHyperAssertion, STAMTYPE_COUNTER, "/VMM/GCRet/CallHost/HyperAssert", STAMUNIT_OCCURENCES, "Number of VINF_VMM_CALL_HOST returns."); 350 STAM_REG(pVM, &pVM->vmm.s.StatGCRetPATMDuplicateFn, STAMTYPE_COUNTER, "/VMM/GCRet/PATMDuplicateFn", STAMUNIT_OCCURENCES, "Number of VINF_PATM_DUPLICATE_FUNCTION returns."); 351 STAM_REG(pVM, &pVM->vmm.s.StatGCRetPGMChangeMode, STAMTYPE_COUNTER, "/VMM/GCRet/PGMChangeMode", STAMUNIT_OCCURENCES, "Number of VINF_PGM_CHANGE_MODE returns."); 352 STAM_REG(pVM, &pVM->vmm.s.StatGCRetEmulHlt, STAMTYPE_COUNTER, "/VMM/GCRet/EmulHlt", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_EMULATE_INSTR_HLT returns."); 353 STAM_REG(pVM, &pVM->vmm.s.StatGCRetPendingRequest, STAMTYPE_COUNTER, "/VMM/GCRet/PendingRequest", STAMUNIT_OCCURENCES, "Number of VINF_EM_PENDING_REQUEST returns."); 301 vmmR3InitRegisterStats(pVM); 354 302 355 303 return VINF_SUCCESS; … … 502 450 pVM->vmm.s.pvGCCoreCode = 0; 503 451 return rc; 452 } 453 454 455 /** 456 * VMMR3Init worker that register the statistics with STAM. 457 * 458 * @param pVM The shared VM structure. 459 */ 460 static void vmmR3InitRegisterStats(PVM pVM) 461 { 462 /* 463 * Statistics. 464 */ 465 STAM_REG(pVM, &pVM->vmm.s.StatRunRC, STAMTYPE_COUNTER, "/VMM/RunRC", STAMUNIT_OCCURENCES, "Number of context switches."); 466 STAM_REG(pVM, &pVM->vmm.s.StatRZRetNormal, STAMTYPE_COUNTER, "/VMM/RZRet/Normal", STAMUNIT_OCCURENCES, "Number of VINF_SUCCESS returns."); 467 STAM_REG(pVM, &pVM->vmm.s.StatRZRetInterrupt, STAMTYPE_COUNTER, "/VMM/RZRet/Interrupt", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_INTERRUPT returns."); 468 STAM_REG(pVM, &pVM->vmm.s.StatRZRetInterruptHyper, STAMTYPE_COUNTER, "/VMM/RZRet/InterruptHyper", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_INTERRUPT_HYPER returns."); 469 STAM_REG(pVM, &pVM->vmm.s.StatRZRetGuestTrap, STAMTYPE_COUNTER, "/VMM/RZRet/GuestTrap", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_GUEST_TRAP returns."); 470 STAM_REG(pVM, &pVM->vmm.s.StatRZRetRingSwitch, STAMTYPE_COUNTER, "/VMM/RZRet/RingSwitch", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_RING_SWITCH returns."); 471 STAM_REG(pVM, &pVM->vmm.s.StatRZRetRingSwitchInt, STAMTYPE_COUNTER, "/VMM/RZRet/RingSwitchInt", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_RING_SWITCH_INT returns."); 472 STAM_REG(pVM, &pVM->vmm.s.StatRZRetExceptionPrivilege, STAMTYPE_COUNTER, "/VMM/RZRet/ExceptionPrivilege", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_EXCEPTION_PRIVILEGED returns."); 473 STAM_REG(pVM, &pVM->vmm.s.StatRZRetStaleSelector, STAMTYPE_COUNTER, "/VMM/RZRet/StaleSelector", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_STALE_SELECTOR returns."); 474 STAM_REG(pVM, &pVM->vmm.s.StatRZRetIRETTrap, STAMTYPE_COUNTER, "/VMM/RZRet/IRETTrap", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_IRET_TRAP returns."); 475 STAM_REG(pVM, &pVM->vmm.s.StatRZRetEmulate, STAMTYPE_COUNTER, "/VMM/RZRet/Emulate", STAMUNIT_OCCURENCES, "Number of VINF_EM_EXECUTE_INSTRUCTION returns."); 476 STAM_REG(pVM, &pVM->vmm.s.StatRZRetPatchEmulate, STAMTYPE_COUNTER, "/VMM/RZRet/PatchEmulate", STAMUNIT_OCCURENCES, "Number of VINF_PATCH_EMULATE_INSTR returns."); 477 STAM_REG(pVM, &pVM->vmm.s.StatRZRetIORead, STAMTYPE_COUNTER, "/VMM/RZRet/IORead", STAMUNIT_OCCURENCES, "Number of VINF_IOM_HC_IOPORT_READ returns."); 478 STAM_REG(pVM, &pVM->vmm.s.StatRZRetIOWrite, STAMTYPE_COUNTER, "/VMM/RZRet/IOWrite", STAMUNIT_OCCURENCES, "Number of VINF_IOM_HC_IOPORT_WRITE returns."); 479 STAM_REG(pVM, &pVM->vmm.s.StatRZRetMMIORead, STAMTYPE_COUNTER, "/VMM/RZRet/MMIORead", STAMUNIT_OCCURENCES, "Number of VINF_IOM_HC_MMIO_READ returns."); 480 STAM_REG(pVM, &pVM->vmm.s.StatRZRetMMIOWrite, STAMTYPE_COUNTER, "/VMM/RZRet/MMIOWrite", STAMUNIT_OCCURENCES, "Number of VINF_IOM_HC_MMIO_WRITE returns."); 481 STAM_REG(pVM, &pVM->vmm.s.StatRZRetMMIOReadWrite, STAMTYPE_COUNTER, "/VMM/RZRet/MMIOReadWrite", STAMUNIT_OCCURENCES, "Number of VINF_IOM_HC_MMIO_READ_WRITE returns."); 482 STAM_REG(pVM, &pVM->vmm.s.StatRZRetMMIOPatchRead, STAMTYPE_COUNTER, "/VMM/RZRet/MMIOPatchRead", STAMUNIT_OCCURENCES, "Number of VINF_IOM_HC_MMIO_PATCH_READ returns."); 483 STAM_REG(pVM, &pVM->vmm.s.StatRZRetMMIOPatchWrite, STAMTYPE_COUNTER, "/VMM/RZRet/MMIOPatchWrite", STAMUNIT_OCCURENCES, "Number of VINF_IOM_HC_MMIO_PATCH_WRITE returns."); 484 STAM_REG(pVM, &pVM->vmm.s.StatRZRetLDTFault, STAMTYPE_COUNTER, "/VMM/RZRet/LDTFault", STAMUNIT_OCCURENCES, "Number of VINF_EM_EXECUTE_INSTRUCTION_GDT_FAULT returns."); 485 STAM_REG(pVM, &pVM->vmm.s.StatRZRetGDTFault, STAMTYPE_COUNTER, "/VMM/RZRet/GDTFault", STAMUNIT_OCCURENCES, "Number of VINF_EM_EXECUTE_INSTRUCTION_LDT_FAULT returns."); 486 STAM_REG(pVM, &pVM->vmm.s.StatRZRetIDTFault, STAMTYPE_COUNTER, "/VMM/RZRet/IDTFault", STAMUNIT_OCCURENCES, "Number of VINF_EM_EXECUTE_INSTRUCTION_IDT_FAULT returns."); 487 STAM_REG(pVM, &pVM->vmm.s.StatRZRetTSSFault, STAMTYPE_COUNTER, "/VMM/RZRet/TSSFault", STAMUNIT_OCCURENCES, "Number of VINF_EM_EXECUTE_INSTRUCTION_TSS_FAULT returns."); 488 STAM_REG(pVM, &pVM->vmm.s.StatRZRetPDFault, STAMTYPE_COUNTER, "/VMM/RZRet/PDFault", STAMUNIT_OCCURENCES, "Number of VINF_EM_EXECUTE_INSTRUCTION_PD_FAULT returns."); 489 STAM_REG(pVM, &pVM->vmm.s.StatRZRetCSAMTask, STAMTYPE_COUNTER, "/VMM/RZRet/CSAMTask", STAMUNIT_OCCURENCES, "Number of VINF_CSAM_PENDING_ACTION returns."); 490 STAM_REG(pVM, &pVM->vmm.s.StatRZRetSyncCR3, STAMTYPE_COUNTER, "/VMM/RZRet/SyncCR", STAMUNIT_OCCURENCES, "Number of VINF_PGM_SYNC_CR3 returns."); 491 STAM_REG(pVM, &pVM->vmm.s.StatRZRetMisc, STAMTYPE_COUNTER, "/VMM/RZRet/Misc", STAMUNIT_OCCURENCES, "Number of misc returns."); 492 STAM_REG(pVM, &pVM->vmm.s.StatRZRetPatchInt3, STAMTYPE_COUNTER, "/VMM/RZRet/PatchInt3", STAMUNIT_OCCURENCES, "Number of VINF_PATM_PATCH_INT3 returns."); 493 STAM_REG(pVM, &pVM->vmm.s.StatRZRetPatchPF, STAMTYPE_COUNTER, "/VMM/RZRet/PatchPF", STAMUNIT_OCCURENCES, "Number of VINF_PATM_PATCH_TRAP_PF returns."); 494 STAM_REG(pVM, &pVM->vmm.s.StatRZRetPatchGP, STAMTYPE_COUNTER, "/VMM/RZRet/PatchGP", STAMUNIT_OCCURENCES, "Number of VINF_PATM_PATCH_TRAP_GP returns."); 495 STAM_REG(pVM, &pVM->vmm.s.StatRZRetPatchIretIRQ, STAMTYPE_COUNTER, "/VMM/RZRet/PatchIret", STAMUNIT_OCCURENCES, "Number of VINF_PATM_PENDING_IRQ_AFTER_IRET returns."); 496 STAM_REG(pVM, &pVM->vmm.s.StatRZRetPageOverflow, STAMTYPE_COUNTER, "/VMM/RZRet/InvlpgOverflow", STAMUNIT_OCCURENCES, "Number of VERR_REM_FLUSHED_PAGES_OVERFLOW returns."); 497 STAM_REG(pVM, &pVM->vmm.s.StatRZRetRescheduleREM, STAMTYPE_COUNTER, "/VMM/RZRet/ScheduleREM", STAMUNIT_OCCURENCES, "Number of VINF_EM_RESCHEDULE_REM returns."); 498 STAM_REG(pVM, &pVM->vmm.s.StatRZRetToR3, STAMTYPE_COUNTER, "/VMM/RZRet/ToR3", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_TO_R3 returns."); 499 STAM_REG(pVM, &pVM->vmm.s.StatRZRetTimerPending, STAMTYPE_COUNTER, "/VMM/RZRet/TimerPending", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_TIMER_PENDING returns."); 500 STAM_REG(pVM, &pVM->vmm.s.StatRZRetInterruptPending, STAMTYPE_COUNTER, "/VMM/RZRet/InterruptPending", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_INTERRUPT_PENDING returns."); 501 STAM_REG(pVM, &pVM->vmm.s.StatRZRetPATMDuplicateFn, STAMTYPE_COUNTER, "/VMM/RZRet/PATMDuplicateFn", STAMUNIT_OCCURENCES, "Number of VINF_PATM_DUPLICATE_FUNCTION returns."); 502 STAM_REG(pVM, &pVM->vmm.s.StatRZRetPGMChangeMode, STAMTYPE_COUNTER, "/VMM/RZRet/PGMChangeMode", STAMUNIT_OCCURENCES, "Number of VINF_PGM_CHANGE_MODE returns."); 503 STAM_REG(pVM, &pVM->vmm.s.StatRZRetEmulHlt, STAMTYPE_COUNTER, "/VMM/RZRet/EmulHlt", STAMUNIT_OCCURENCES, "Number of VINF_EM_RAW_EMULATE_INSTR_HLT returns."); 504 STAM_REG(pVM, &pVM->vmm.s.StatRZRetPendingRequest, STAMTYPE_COUNTER, "/VMM/RZRet/PendingRequest", STAMUNIT_OCCURENCES, "Number of VINF_EM_PENDING_REQUEST returns."); 505 506 STAM_REG(pVM, &pVM->vmm.s.StatRZRetCallHost, STAMTYPE_COUNTER, "/VMM/RZCallR3/Misc", STAMUNIT_OCCURENCES, "Number of Other ring-3 calls."); 507 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPDMLock, STAMTYPE_COUNTER, "/VMM/RZCallR3/PDMLock", STAMUNIT_OCCURENCES, "Number of VMMCALLHOST_PDM_LOCK calls."); 508 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPDMQueueFlush, STAMTYPE_COUNTER, "/VMM/RZCallR3/PDMQueueFlush", STAMUNIT_OCCURENCES, "Number of VMMCALLHOST_PDM_QUEUE_FLUSH calls."); 509 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMLock, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMLock", STAMUNIT_OCCURENCES, "Number of VMMCALLHOST_PGM_LOCK calls."); 510 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMPoolGrow, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMPoolGrow", STAMUNIT_OCCURENCES, "Number of VMMCALLHOST_PGM_POOL_GROW calls."); 511 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMMapChunk, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMMapChunk", STAMUNIT_OCCURENCES, "Number of VMMCALLHOST_PGM_MAP_CHUNK calls."); 512 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMAllocHandy, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMAllocHandy", STAMUNIT_OCCURENCES, "Number of VMMCALLHOST_PGM_ALLOCATE_HANDY_PAGES calls."); 513 #ifndef VBOX_WITH_NEW_PHYS_CODE 514 STAM_REG(pVM, &pVM->vmm.s.StatRZCallPGMGrowRAM, STAMTYPE_COUNTER, "/VMM/RZCallR3/PGMGrowRAM", STAMUNIT_OCCURENCES, "Number of VMMCALLHOST_PGM_RAM_GROW_RANGE calls."); 515 #endif 516 STAM_REG(pVM, &pVM->vmm.s.StatRZCallRemReplay, STAMTYPE_COUNTER, "/VMM/RZCallR3/REMReplay", STAMUNIT_OCCURENCES, "Number of VMMCALLHOST_REM_REPLAY_HANDLER_NOTIFICATIONS calls."); 517 STAM_REG(pVM, &pVM->vmm.s.StatRZCallLogFlush, STAMTYPE_COUNTER, "/VMM/RZCallR3/VMMLogFlush", STAMUNIT_OCCURENCES, "Number of VMMCALLHOST_VMM_LOGGER_FLUSH calls."); 518 STAM_REG(pVM, &pVM->vmm.s.StatRZCallVMSetError, STAMTYPE_COUNTER, "/VMM/RZCallR3/VMSetError", STAMUNIT_OCCURENCES, "Number of VMMCALLHOST_VM_SET_ERROR calls."); 519 STAM_REG(pVM, &pVM->vmm.s.StatRZCallVMSetRuntimeError, STAMTYPE_COUNTER, "/VMM/RZCallR3/VMRuntimeError", STAMUNIT_OCCURENCES, "Number of VMMCALLHOST_VM_SET_RUNTIME_ERROR calls."); 504 520 } 505 521 … … 2211 2227 * Cancel the longjmp operation that's in progress. 2212 2228 */ 2213 case VMMCALLHOST_VM_R0_ HYPER_ASSERTION:2229 case VMMCALLHOST_VM_R0_ASSERTION: 2214 2230 pVM->vmm.s.enmCallHostOperation = VMMCALLHOST_INVALID; 2215 2231 pVM->vmm.s.CallHostR0JmpBuf.fInRing3Call = false; … … 2221 2237 LogRel((pVM->vmm.s.szRing0AssertMsg1)); 2222 2238 LogRel((pVM->vmm.s.szRing0AssertMsg2)); 2223 return VINF_EM_DBG_HYPER_ASSERTION; 2239 return VINF_EM_DBG_HYPER_ASSERTION; /** @todo rename this. */ 2224 2240 2225 2241 default: -
trunk/src/VBox/VMM/VMMInternal.h
r13700 r13701 78 78 79 79 /** 80 * Switcher function, GC to HC.80 * Switcher function, RC to HC. 81 81 * 82 82 * @param rc VBox status code. 83 83 */ 84 typedef DECLASMTYPE(void) FNVMMSWITCHER GC(int rc);84 typedef DECLASMTYPE(void) FNVMMSWITCHERRC(int rc); 85 85 /** Pointer to switcher function. */ 86 typedef FNVMMSWITCHER GC *PFNVMMSWITCHERGC;86 typedef FNVMMSWITCHERRC *PFNVMMSWITCHERRC; 87 87 88 88 … … 116 116 * @{ */ 117 117 #if HC_ARCH_BITS == 32 118 uint32_t ebx;119 uint32_t esi;120 uint32_t edi;121 uint32_t ebp;122 uint32_t esp;123 uint32_t eip;124 uint32_t u32Padding;118 uint32_t ebx; 119 uint32_t esi; 120 uint32_t edi; 121 uint32_t ebp; 122 uint32_t esp; 123 uint32_t eip; 124 uint32_t u32Padding; 125 125 #endif 126 126 #if HC_ARCH_BITS == 64 127 uint64_t rbx;127 uint64_t rbx; 128 128 # ifdef RT_OS_WINDOWS 129 uint64_t rsi;130 uint64_t rdi;129 uint64_t rsi; 130 uint64_t rdi; 131 131 # endif 132 uint64_t rbp;133 uint64_t r12;134 uint64_t r13;135 uint64_t r14;136 uint64_t r15;137 uint64_t rsp;138 uint64_t rip;132 uint64_t rbp; 133 uint64_t r12; 134 uint64_t r13; 135 uint64_t r14; 136 uint64_t r15; 137 uint64_t rsp; 138 uint64_t rip; 139 139 #endif 140 140 /** @} */ 141 141 142 142 /** Flag that indicates that we've done a ring-3 call. */ 143 bool fInRing3Call;143 bool fInRing3Call; 144 144 /** The number of bytes we've saved. */ 145 uint32_t cbSavedStack;145 uint32_t cbSavedStack; 146 146 /** Pointer to the buffer used to save the stack. 147 147 * This is assumed to be 8KB. */ 148 RTR0PTR pvSavedStack;148 RTR0PTR pvSavedStack; 149 149 /** Esp we we match against esp on resume to make sure the stack wasn't relocated. */ 150 RTHCUINTREG SpCheck;150 RTHCUINTREG SpCheck; 151 151 /** The esp we should resume execution with after the restore. */ 152 RTHCUINTREG SpResume; 153 } VMMR0JMPBUF, *PVMMR0JMPBUF; 152 RTHCUINTREG SpResume; 153 } VMMR0JMPBUF; 154 /** Pointer to a ring-0 jump buffer. */ 155 typedef VMMR0JMPBUF *PVMMR0JMPBUF; 154 156 155 157 … … 192 194 R0PTRTYPE(PFNVMMSWITCHERHC) pfnR0HostToGuest; 193 195 /** Guest to host switcher entry point. */ 194 RCPTRTYPE(PFNVMMSWITCHER GC) pfnGCGuestToHost;196 RCPTRTYPE(PFNVMMSWITCHERRC) pfnGCGuestToHost; 195 197 /** Call Trampoline. See vmmGCCallTrampoline(). */ 196 198 RTGCPTR32 pfnGCCallTrampoline; … … 255 257 256 258 /** @name CallHost 259 * @todo SMP: per vCPU 257 260 * @{ */ 258 261 /** The pending operation. */ … … 274 277 275 278 /** Number of VMMR0_DO_RUN_GC calls. */ 276 STAMCOUNTER StatRun GC;277 278 /** Statistics for each of the GCreturn codes.279 STAMCOUNTER StatRunRC; 280 281 /** Statistics for each of the RC/R0 return codes. 279 282 * @{ */ 280 STAMCOUNTER StatGCRetNormal; 281 STAMCOUNTER StatGCRetInterrupt; 282 STAMCOUNTER StatGCRetInterruptHyper; 283 STAMCOUNTER StatGCRetGuestTrap; 284 STAMCOUNTER StatGCRetRingSwitch; 285 STAMCOUNTER StatGCRetRingSwitchInt; 286 STAMCOUNTER StatGCRetExceptionPrivilege; 287 STAMCOUNTER StatGCRetStaleSelector; 288 STAMCOUNTER StatGCRetIRETTrap; 289 STAMCOUNTER StatGCRetEmulate; 290 STAMCOUNTER StatGCRetPatchEmulate; 291 STAMCOUNTER StatGCRetIORead; 292 STAMCOUNTER StatGCRetIOWrite; 293 STAMCOUNTER StatGCRetMMIORead; 294 STAMCOUNTER StatGCRetMMIOWrite; 295 STAMCOUNTER StatGCRetMMIOPatchRead; 296 STAMCOUNTER StatGCRetMMIOPatchWrite; 297 STAMCOUNTER StatGCRetMMIOReadWrite; 298 STAMCOUNTER StatGCRetLDTFault; 299 STAMCOUNTER StatGCRetGDTFault; 300 STAMCOUNTER StatGCRetIDTFault; 301 STAMCOUNTER StatGCRetTSSFault; 302 STAMCOUNTER StatGCRetPDFault; 303 STAMCOUNTER StatGCRetCSAMTask; 304 STAMCOUNTER StatGCRetSyncCR3; 305 STAMCOUNTER StatGCRetMisc; 306 STAMCOUNTER StatGCRetPatchInt3; 307 STAMCOUNTER StatGCRetPatchPF; 308 STAMCOUNTER StatGCRetPatchGP; 309 STAMCOUNTER StatGCRetPatchIretIRQ; 310 STAMCOUNTER StatGCRetPageOverflow; 311 STAMCOUNTER StatGCRetRescheduleREM; 312 STAMCOUNTER StatGCRetToR3; 313 STAMCOUNTER StatGCRetTimerPending; 314 STAMCOUNTER StatGCRetInterruptPending; 315 STAMCOUNTER StatGCRetCallHost; 316 STAMCOUNTER StatGCRetPATMDuplicateFn; 317 STAMCOUNTER StatGCRetPGMChangeMode; 318 STAMCOUNTER StatGCRetEmulHlt; 319 STAMCOUNTER StatGCRetPendingRequest; 320 STAMCOUNTER StatGCRetPGMGrowRAM; 321 STAMCOUNTER StatGCRetPDMLock; 322 STAMCOUNTER StatGCRetHyperAssertion; 323 STAMCOUNTER StatGCRetLogFlush; 324 STAMCOUNTER StatGCRetPDMQueueFlush; 325 STAMCOUNTER StatGCRetPGMPoolGrow; 326 STAMCOUNTER StatGCRetRemReplay; 327 STAMCOUNTER StatGCRetVMSetError; 328 STAMCOUNTER StatGCRetVMSetRuntimeError; 329 STAMCOUNTER StatGCRetPGMLock; 283 STAMCOUNTER StatRZRetNormal; 284 STAMCOUNTER StatRZRetInterrupt; 285 STAMCOUNTER StatRZRetInterruptHyper; 286 STAMCOUNTER StatRZRetGuestTrap; 287 STAMCOUNTER StatRZRetRingSwitch; 288 STAMCOUNTER StatRZRetRingSwitchInt; 289 STAMCOUNTER StatRZRetExceptionPrivilege; 290 STAMCOUNTER StatRZRetStaleSelector; 291 STAMCOUNTER StatRZRetIRETTrap; 292 STAMCOUNTER StatRZRetEmulate; 293 STAMCOUNTER StatRZRetPatchEmulate; 294 STAMCOUNTER StatRZRetIORead; 295 STAMCOUNTER StatRZRetIOWrite; 296 STAMCOUNTER StatRZRetMMIORead; 297 STAMCOUNTER StatRZRetMMIOWrite; 298 STAMCOUNTER StatRZRetMMIOPatchRead; 299 STAMCOUNTER StatRZRetMMIOPatchWrite; 300 STAMCOUNTER StatRZRetMMIOReadWrite; 301 STAMCOUNTER StatRZRetLDTFault; 302 STAMCOUNTER StatRZRetGDTFault; 303 STAMCOUNTER StatRZRetIDTFault; 304 STAMCOUNTER StatRZRetTSSFault; 305 STAMCOUNTER StatRZRetPDFault; 306 STAMCOUNTER StatRZRetCSAMTask; 307 STAMCOUNTER StatRZRetSyncCR3; 308 STAMCOUNTER StatRZRetMisc; 309 STAMCOUNTER StatRZRetPatchInt3; 310 STAMCOUNTER StatRZRetPatchPF; 311 STAMCOUNTER StatRZRetPatchGP; 312 STAMCOUNTER StatRZRetPatchIretIRQ; 313 STAMCOUNTER StatRZRetPageOverflow; 314 STAMCOUNTER StatRZRetRescheduleREM; 315 STAMCOUNTER StatRZRetToR3; 316 STAMCOUNTER StatRZRetTimerPending; 317 STAMCOUNTER StatRZRetInterruptPending; 318 STAMCOUNTER StatRZRetCallHost; 319 STAMCOUNTER StatRZRetPATMDuplicateFn; 320 STAMCOUNTER StatRZRetPGMChangeMode; 321 STAMCOUNTER StatRZRetEmulHlt; 322 STAMCOUNTER StatRZRetPendingRequest; 323 #ifndef VBOX_WITH_NEW_PHYS_CODE 324 STAMCOUNTER StatRZCallPGMGrowRAM; 325 #endif 326 STAMCOUNTER StatRZCallPDMLock; 327 STAMCOUNTER StatRZCallLogFlush; 328 STAMCOUNTER StatRZCallPDMQueueFlush; 329 STAMCOUNTER StatRZCallPGMPoolGrow; 330 STAMCOUNTER StatRZCallPGMMapChunk; 331 STAMCOUNTER StatRZCallPGMAllocHandy; 332 STAMCOUNTER StatRZCallRemReplay; 333 STAMCOUNTER StatRZCallVMSetError; 334 STAMCOUNTER StatRZCallVMSetRuntimeError; 335 STAMCOUNTER StatRZCallPGMLock; 330 336 /** @} */ 331 332 333 } VMM,*PVMM;337 } VMM; 338 /** Pointer to VMM. */ 339 typedef VMM *PVMM; 334 340 335 341 … … 474 480 475 481 #endif /* IN_RING0 */ 476 477 478 482 #ifdef IN_GC 483 479 484 /** 480 485 * Internal GC logger worker: Logger wrapper. … … 494 499 * @remark This function must be exported! 495 500 */ 496 VMMRCDECL(int) vmmGCLoggerFlush(PRTLOGGERRC pLogger);501 VMMRCDECL(int) vmmGCLoggerFlush(PRTLOGGERRC pLogger); 497 502 498 503 /** @name Trap testcases and related labels. 499 504 * @{ */ 500 DECLASM(void) vmmGCEnableWP(void);501 DECLASM(void) vmmGCDisableWP(void);502 DECLASM(int) vmmGCTestTrap3(void);503 DECLASM(int) vmmGCTestTrap8(void);504 DECLASM(int) vmmGCTestTrap0d(void);505 DECLASM(int) vmmGCTestTrap0e(void);506 DECLASM(int) vmmGCTestTrap0e_FaultEIP(void); /**< a label */507 DECLASM(int) vmmGCTestTrap0e_ResumeEIP(void); /**< a label */505 DECLASM(void) vmmGCEnableWP(void); 506 DECLASM(void) vmmGCDisableWP(void); 507 DECLASM(int) vmmGCTestTrap3(void); 508 DECLASM(int) vmmGCTestTrap8(void); 509 DECLASM(int) vmmGCTestTrap0d(void); 510 DECLASM(int) vmmGCTestTrap0e(void); 511 DECLASM(int) vmmGCTestTrap0e_FaultEIP(void); /**< a label */ 512 DECLASM(int) vmmGCTestTrap0e_ResumeEIP(void); /**< a label */ 508 513 /** @} */ 509 514 -
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r13517 r13701 296 296 { 297 297 case VINF_SUCCESS: 298 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetNormal);298 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetNormal); 299 299 break; 300 300 case VINF_EM_RAW_INTERRUPT: 301 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetInterrupt);301 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetInterrupt); 302 302 break; 303 303 case VINF_EM_RAW_INTERRUPT_HYPER: 304 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetInterruptHyper);304 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetInterruptHyper); 305 305 break; 306 306 case VINF_EM_RAW_GUEST_TRAP: 307 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetGuestTrap);307 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetGuestTrap); 308 308 break; 309 309 case VINF_EM_RAW_RING_SWITCH: 310 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetRingSwitch);310 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetRingSwitch); 311 311 break; 312 312 case VINF_EM_RAW_RING_SWITCH_INT: 313 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetRingSwitchInt);313 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetRingSwitchInt); 314 314 break; 315 315 case VINF_EM_RAW_EXCEPTION_PRIVILEGED: 316 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetExceptionPrivilege);316 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetExceptionPrivilege); 317 317 break; 318 318 case VINF_EM_RAW_STALE_SELECTOR: 319 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetStaleSelector);319 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetStaleSelector); 320 320 break; 321 321 case VINF_EM_RAW_IRET_TRAP: 322 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetIRETTrap);322 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetIRETTrap); 323 323 break; 324 324 case VINF_IOM_HC_IOPORT_READ: 325 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetIORead);325 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetIORead); 326 326 break; 327 327 case VINF_IOM_HC_IOPORT_WRITE: 328 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetIOWrite);328 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetIOWrite); 329 329 break; 330 330 case VINF_IOM_HC_MMIO_READ: 331 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetMMIORead);331 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetMMIORead); 332 332 break; 333 333 case VINF_IOM_HC_MMIO_WRITE: 334 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetMMIOWrite);334 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetMMIOWrite); 335 335 break; 336 336 case VINF_IOM_HC_MMIO_READ_WRITE: 337 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetMMIOReadWrite);337 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetMMIOReadWrite); 338 338 break; 339 339 case VINF_PATM_HC_MMIO_PATCH_READ: 340 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetMMIOPatchRead);340 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetMMIOPatchRead); 341 341 break; 342 342 case VINF_PATM_HC_MMIO_PATCH_WRITE: 343 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetMMIOPatchWrite);343 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetMMIOPatchWrite); 344 344 break; 345 345 case VINF_EM_RAW_EMULATE_INSTR: 346 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetEmulate);346 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetEmulate); 347 347 break; 348 348 case VINF_PATCH_EMULATE_INSTR: 349 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetPatchEmulate);349 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPatchEmulate); 350 350 break; 351 351 case VINF_EM_RAW_EMULATE_INSTR_LDT_FAULT: 352 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetLDTFault);352 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetLDTFault); 353 353 break; 354 354 case VINF_EM_RAW_EMULATE_INSTR_GDT_FAULT: 355 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetGDTFault);355 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetGDTFault); 356 356 break; 357 357 case VINF_EM_RAW_EMULATE_INSTR_IDT_FAULT: 358 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetIDTFault);358 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetIDTFault); 359 359 break; 360 360 case VINF_EM_RAW_EMULATE_INSTR_TSS_FAULT: 361 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetTSSFault);361 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetTSSFault); 362 362 break; 363 363 case VINF_EM_RAW_EMULATE_INSTR_PD_FAULT: 364 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetPDFault);364 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPDFault); 365 365 break; 366 366 case VINF_CSAM_PENDING_ACTION: 367 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetCSAMTask);367 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetCSAMTask); 368 368 break; 369 369 case VINF_PGM_SYNC_CR3: 370 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetSyncCR3);370 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetSyncCR3); 371 371 break; 372 372 case VINF_PATM_PATCH_INT3: 373 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetPatchInt3);373 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPatchInt3); 374 374 break; 375 375 case VINF_PATM_PATCH_TRAP_PF: 376 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetPatchPF);376 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPatchPF); 377 377 break; 378 378 case VINF_PATM_PATCH_TRAP_GP: 379 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetPatchGP);379 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPatchGP); 380 380 break; 381 381 case VINF_PATM_PENDING_IRQ_AFTER_IRET: 382 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetPatchIretIRQ);382 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPatchIretIRQ); 383 383 break; 384 384 case VERR_REM_FLUSHED_PAGES_OVERFLOW: 385 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetPageOverflow);385 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPageOverflow); 386 386 break; 387 387 case VINF_EM_RESCHEDULE_REM: 388 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetRescheduleREM);388 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetRescheduleREM); 389 389 break; 390 390 case VINF_EM_RAW_TO_R3: 391 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetToR3);391 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetToR3); 392 392 break; 393 393 case VINF_EM_RAW_TIMER_PENDING: 394 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetTimerPending);394 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetTimerPending); 395 395 break; 396 396 case VINF_EM_RAW_INTERRUPT_PENDING: 397 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetInterruptPending);397 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetInterruptPending); 398 398 break; 399 399 case VINF_VMM_CALL_HOST: … … 401 401 { 402 402 case VMMCALLHOST_PDM_LOCK: 403 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetPDMLock);403 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPDMLock); 404 404 break; 405 405 case VMMCALLHOST_PDM_QUEUE_FLUSH: 406 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetPDMQueueFlush);406 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPDMQueueFlush); 407 407 break; 408 408 case VMMCALLHOST_PGM_POOL_GROW: 409 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetPGMPoolGrow);409 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMPoolGrow); 410 410 break; 411 411 case VMMCALLHOST_PGM_LOCK: 412 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetPGMLock);412 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMLock); 413 413 break; 414 case VMMCALLHOST_PGM_MAP_CHUNK: 415 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMMapChunk); 416 break; 417 case VMMCALLHOST_PGM_ALLOCATE_HANDY_PAGES: 418 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMAllocHandy); 419 break; 420 #ifndef VBOX_WITH_NEW_PHYS_CODE 421 case VMMCALLHOST_PGM_RAM_GROW_RANGE: 422 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallPGMGrowRAM); 423 break; 424 #endif 414 425 case VMMCALLHOST_REM_REPLAY_HANDLER_NOTIFICATIONS: 415 STAM_COUNTER_INC(&pVM->vmm.s.StatGCRetRemReplay); 416 break; 417 case VMMCALLHOST_PGM_RAM_GROW_RANGE: 418 STAM_COUNTER_INC(&pVM->vmm.s.StatGCRetPGMGrowRAM); 426 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallRemReplay); 419 427 break; 420 428 case VMMCALLHOST_VMM_LOGGER_FLUSH: 421 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetLogFlush);429 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallLogFlush); 422 430 break; 423 431 case VMMCALLHOST_VM_SET_ERROR: 424 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetVMSetError);432 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallVMSetError); 425 433 break; 426 434 case VMMCALLHOST_VM_SET_RUNTIME_ERROR: 427 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetVMSetRuntimeError);435 STAM_COUNTER_INC(&pVM->vmm.s.StatRZCallVMSetRuntimeError); 428 436 break; 429 case VMMCALLHOST_VM_R0_HYPER_ASSERTION: 430 STAM_COUNTER_INC(&pVM->vmm.s.StatGCRetHyperAssertion); 431 break; 437 case VMMCALLHOST_VM_R0_ASSERTION: 432 438 default: 433 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetCallHost);439 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetCallHost); 434 440 break; 435 441 } 436 442 break; 437 443 case VINF_PATM_DUPLICATE_FUNCTION: 438 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetPATMDuplicateFn);444 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPATMDuplicateFn); 439 445 break; 440 446 case VINF_PGM_CHANGE_MODE: 441 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetPGMChangeMode);447 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPGMChangeMode); 442 448 break; 443 449 case VINF_EM_RAW_EMULATE_INSTR_HLT: 444 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetEmulHlt);450 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetEmulHlt); 445 451 break; 446 452 case VINF_EM_PENDING_REQUEST: 447 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetPendingRequest);453 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetPendingRequest); 448 454 break; 449 455 default: 450 STAM_COUNTER_INC(&pVM->vmm.s.Stat GCRetMisc);456 STAM_COUNTER_INC(&pVM->vmm.s.StatRZRetMisc); 451 457 break; 452 458 } … … 481 487 return VERR_NOT_SUPPORTED; 482 488 483 STAM_COUNTER_INC(&pVM->vmm.s.StatRun GC);489 STAM_COUNTER_INC(&pVM->vmm.s.StatRunRC); 484 490 register int rc; 485 491 pVM->vmm.s.iLastGCRc = rc = pVM->vmm.s.pfnR0HostToGuest(pVM); … … 601 607 602 608 #ifdef VBOX_WITH_STATISTICS 603 STAM_COUNTER_INC(&pVM->vmm.s.StatRun GC);609 STAM_COUNTER_INC(&pVM->vmm.s.StatRunRC); 604 610 vmmR0RecordRC(pVM, rc); 605 611 #endif … … 624 630 int rc; 625 631 626 STAM_COUNTER_INC(&pVM->vmm.s.StatRun GC);632 STAM_COUNTER_INC(&pVM->vmm.s.StatRunRC); 627 633 628 634 #ifndef RT_OS_WINDOWS /** @todo check other hosts */ … … 1134 1140 #endif 1135 1141 { 1136 int rc = VMMR0CallHost(pVM, VMMCALLHOST_VM_R0_ HYPER_ASSERTION, 0);1142 int rc = VMMR0CallHost(pVM, VMMCALLHOST_VM_R0_ASSERTION, 0); 1137 1143 return RT_FAILURE_NP(rc); 1138 1144 } -
trunk/src/VBox/VMM/testcase/tstVMStructGC.cpp
r13698 r13701 854 854 GEN_CHECK_OFF(VMM, CallHostR0JmpBuf.SpCheck); 855 855 GEN_CHECK_OFF(VMM, CallHostR0JmpBuf.SpResume); 856 GEN_CHECK_OFF(VMM, StatRun GC);857 GEN_CHECK_OFF(VMM, Stat GCRetPGMLock);856 GEN_CHECK_OFF(VMM, StatRunRC); 857 GEN_CHECK_OFF(VMM, StatRZCallPGMLock); 858 858 859 859 GEN_CHECK_SIZE(RTPINGPONG); -
trunk/src/VBox/VMM/testcase/tstVMStructSize.cpp
r13413 r13701 169 169 CHECK_MEMBER_ALIGNMENT(VM, vmm.s.CritSectVMLock, 8); 170 170 CHECK_MEMBER_ALIGNMENT(VM, vmm.s.CallHostR0JmpBuf, 8); 171 CHECK_MEMBER_ALIGNMENT(VM, vmm.s.StatRun GC, 8);171 CHECK_MEMBER_ALIGNMENT(VM, vmm.s.StatRunRC, 8); 172 172 CHECK_MEMBER_ALIGNMENT(VM, StatTotalQemuToGC, 8); 173 173 CHECK_MEMBER_ALIGNMENT(VM, rem.s.StatsInQEMU, 8);
Note:
See TracChangeset
for help on using the changeset viewer.