Changeset 90958 in vbox
- Timestamp:
- Aug 27, 2021 1:55:41 PM (3 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
-
VMMR0/VMMR0.cpp (modified) (4 diffs)
-
VMMR3/VMM.cpp (modified) (2 diffs)
-
include/VMMInternal.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/VMMR0.cpp
r90956 r90958 3164 3164 VMMLOGGER_BUFFER_COUNT); 3165 3165 3166 STAM_REL_COUNTER_INC(&pShared->StatFlushes); 3167 STAM_REL_COUNTER_INC(&pGVM->vmm.s.StatLogFlusherFlushes); 3168 3166 3169 if (pGVM->vmmr0.s.LogFlusher.fThreadWaiting) 3167 3170 { … … 3170 3173 } 3171 3174 else 3175 { 3176 STAM_REL_COUNTER_INC(&pGVM->vmm.s.StatLogFlusherNoWakeUp); 3172 3177 RTSpinlockRelease(pGVM->vmmr0.s.LogFlusher.hSpinlock); 3178 } 3173 3179 3174 3180 /* 3175 3181 * Wait for it to complete. 3176 3182 */ 3183 STAM_REL_PROFILE_START(&pShared->StatWait, a); 3177 3184 VMMR0EmtWaitEventInner(pGVCpu, VMMR0EMTWAIT_F_TRY_SUPPRESS_INTERRUPTED, 3178 3185 pR0Log->hEventFlushWait, RT_INDEFINITE_WAIT); 3186 STAM_REL_PROFILE_STOP(&pShared->StatWait, a); 3179 3187 } 3180 3188 else … … 3193 3201 } 3194 3202 else 3203 { 3204 STAM_REL_COUNTER_INC(&pShared->StatCannotBlock); 3195 3205 SUP_DPRINTF(("vmmR0LoggerFlush: VMMR0EmtPrepareToBlock failed! rc=%d\n", rc)); 3206 } 3196 3207 pR0Log->fFlushing = false; 3197 3208 } … … 3201 3212 else 3202 3213 { 3214 STAM_REL_COUNTER_INC(&pShared->StatCannotBlock); 3203 3215 #if defined(RT_OS_LINUX) 3204 3216 SUP_DPRINTF(("vmmR0LoggerFlush: EMT blocking disabled! (%u bytes)\n", pBufDesc->offBuf)); -
trunk/src/VBox/VMM/VMMR3/VMM.cpp
r90956 r90958 438 438 STAM_REG(pVM, &pVM->vmm.s.StatRZCallVMSetRuntimeError, STAMTYPE_COUNTER, "/VMM/RZCallR3/VMRuntimeError", STAMUNIT_OCCURENCES, "Number of VMMCALLRING3_VM_SET_RUNTIME_ERROR calls."); 439 439 440 STAMR3Register(pVM, &pVM->vmm.s.StatLogFlusherFlushes, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, "/VMM/LogFlush/00-Flushes", STAMUNIT_OCCURENCES, "Total number of buffer flushes"); 441 STAMR3Register(pVM, &pVM->vmm.s.StatLogFlusherNoWakeUp, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, "/VMM/LogFlush/00-NoWakups", STAMUNIT_OCCURENCES, "Times the flusher thread didn't need waking up."); 442 440 443 #ifdef VBOX_WITH_STATISTICS 441 444 for (VMCPUID i = 0; i < pVM->cCpus; i++) … … 469 472 470 473 STAMR3RegisterF(pVM, &pVCpu->cEmtHashCollisions, STAMTYPE_U8, STAMVISIBILITY_ALWAYS, STAMUNIT_OCCURENCES, "", "/VMM/EmtHashCollisions/Emt%02u", i); 474 475 PVMMR3CPULOGGER pShared = &pVCpu->vmm.s.u.s.Logger; 476 STAMR3RegisterF(pVM, &pShared->StatFlushes, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, "", "/VMM/LogFlush/CPU%u/Reg", i); 477 STAMR3RegisterF(pVM, &pShared->StatCannotBlock, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, "", "/VMM/LogFlush/CPU%u/Reg/CannotBlock", i); 478 STAMR3RegisterF(pVM, &pShared->StatWait, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, "", "/VMM/LogFlush/CPU%u/Reg/Wait", i); 479 STAMR3RegisterF(pVM, &pShared->cbDropped, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_BYTES, "", "/VMM/LogFlush/CPU%u/Reg/cbDropped", i); 480 STAMR3RegisterF(pVM, &pShared->cbBuf, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_BYTES, "", "/VMM/LogFlush/CPU%u/Reg/cbBuf", i); 481 STAMR3RegisterF(pVM, &pShared->idxBuf, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_BYTES, "", "/VMM/LogFlush/CPU%u/Reg/idxBuf", i); 482 483 pShared = &pVCpu->vmm.s.u.s.RelLogger; 484 STAMR3RegisterF(pVM, &pShared->StatFlushes, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, "", "/VMM/LogFlush/CPU%u/Rel", i); 485 STAMR3RegisterF(pVM, &pShared->StatCannotBlock, STAMTYPE_COUNTER, STAMVISIBILITY_USED, STAMUNIT_OCCURENCES, "", "/VMM/LogFlush/CPU%u/Rel/CannotBlock", i); 486 STAMR3RegisterF(pVM, &pShared->StatWait, STAMTYPE_PROFILE, STAMVISIBILITY_USED, STAMUNIT_TICKS_PER_CALL, "", "/VMM/LogFlush/CPU%u/Rel/Wait", i); 487 STAMR3RegisterF(pVM, &pShared->cbDropped, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_BYTES, "", "/VMM/LogFlush/CPU%u/Rel/cbDropped", i); 488 STAMR3RegisterF(pVM, &pShared->cbBuf, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_BYTES, "", "/VMM/LogFlush/CPU%u/Rel/cbBuf", i); 489 STAMR3RegisterF(pVM, &pShared->idxBuf, STAMTYPE_U32, STAMVISIBILITY_USED, STAMUNIT_BYTES, "", "/VMM/LogFlush/CPU%u/Rel/idxBuf", i); 471 490 } 472 491 } -
trunk/src/VBox/VMM/include/VMMInternal.h
r90956 r90958 121 121 /** Number of bytes dropped because the flush context didn't allow waiting. */ 122 122 uint32_t cbDropped; 123 STAMCOUNTER StatFlushes; 124 STAMCOUNTER StatCannotBlock; 125 STAMPROFILE StatWait; 123 126 } VMMR3CPULOGGER; 124 127 /** Pointer to r0 logger data shared with ring-3. */ … … 347 350 /** Copy of the current work log flusher work item. */ 348 351 VMMLOGFLUSHERENTRY volatile LogFlusherItem; 352 STAMCOUNTER StatLogFlusherFlushes; 353 STAMCOUNTER StatLogFlusherNoWakeUp; 349 354 /** @} */ 350 355 … … 633 638 bool volatile fThreadRunning; 634 639 bool afPadding2[5]; 640 STAMCOUNTER StatFlushes; 641 STAMCOUNTER StatNoWakeUp; 635 642 /** Logger ring buffer. 636 643 * This is for communicating with the log flusher thread. */
Note:
See TracChangeset
for help on using the changeset viewer.

