Changeset 104095 in vbox
- Timestamp:
- Mar 27, 2024 3:46:10 PM (12 months ago)
- svn:sync-xref-src-repo-rev:
- 162496
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllN8veRecompiler.cpp
r104084 r104095 508 508 AssertMsgReturn(cbReq > 32 && cbReq < _512K, ("%#x\n", cbReq), NULL); 509 509 510 /* 511 * Adjust the request size so it'll fit the allocator alignment/whatnot. 512 * 513 * For the RTHeapSimple allocator this means to follow the logic described 514 * in iemExecMemAllocatorGrow and attempt to allocate it from one of the 515 * existing chunks if we think we've got sufficient free memory around. 516 * 517 * While for the alternative one we just align it up to a whole unit size. 518 */ 519 #ifdef IEMEXECMEM_USE_ALT_SUB_ALLOCATOR 520 cbReq = RT_ALIGN_32(cbReq, IEMEXECMEM_ALT_SUB_ALLOC_UNIT_SIZE); 521 #else 522 cbReq = RT_ALIGN_32(cbReq + pExecMemAllocator->cbHeapBlockHdr, 64) - pExecMemAllocator->cbHeapBlockHdr; 523 #endif 510 524 511 525 for (unsigned iIteration = 0;; iIteration++) 512 526 { 513 /*514 * Adjust the request size so it'll fit the allocator alignment/whatnot.515 *516 * For the RTHeapSimple allocator this means to follow the logic described517 * in iemExecMemAllocatorGrow and attempt to allocate it from one of the518 * existing chunks if we think we've got sufficient free memory around.519 *520 * While for the alternative one we just align it up to a whole unit size.521 */522 #ifdef IEMEXECMEM_USE_ALT_SUB_ALLOCATOR523 cbReq = RT_ALIGN_32(cbReq, IEMEXECMEM_ALT_SUB_ALLOC_UNIT_SIZE);524 #else525 cbReq = RT_ALIGN_32(cbReq + pExecMemAllocator->cbHeapBlockHdr, 64) - pExecMemAllocator->cbHeapBlockHdr;526 #endif527 527 if (cbReq <= pExecMemAllocator->cbFree) 528 528 { … … 565 565 else 566 566 { 567 /** @todo stats... */567 STAM_REL_COUNTER_INC(&pVCpu->iem.s.StatNativeExecMemInstrBufAllocFailed); 568 568 return NULL; 569 569 } -
trunk/src/VBox/VMM/VMMR3/IEMR3.cpp
r104064 r104095 440 440 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.StatCheckNeedCsLimChecking, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 441 441 "Needing CS.LIM checking TB after branch or on page crossing", "/IEM/CPU%u/re/CheckTbNeedCsLimChecking", idCpu); 442 443 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.StatNativeExecMemInstrBufAllocFailed, STAMTYPE_COUNTER, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, 444 "Number of times the exec memory allocator failed to allocate a large enough buffer", 445 "/IEM/CPU%u/re/NativeExecMemInstrBufAllocFailed", idCpu); 442 446 443 447 STAMR3RegisterF(pVM, (void *)&pVCpu->iem.s.StatNativeCallsRecompiled, STAMTYPE_PROFILE, STAMVISIBILITY_ALWAYS, STAMUNIT_CALLS_PER_TB, -
trunk/src/VBox/VMM/include/IEMInternal.h
r104076 r104095 1853 1853 /** Statistics: Times a jump or page crossing required a TB with CS.LIM checking. */ 1854 1854 STAMCOUNTER StatCheckNeedCsLimChecking; 1855 /** Exec memory allocator statistics: Number of times allocaintg executable memory failed. */ 1856 STAMCOUNTER StatNativeExecMemInstrBufAllocFailed; 1855 1857 /** Native TB statistics: Number of fully recompiled TBs. */ 1856 1858 STAMCOUNTER StatNativeFullyRecompiledTbs; … … 1977 1979 #endif 1978 1980 1979 uint64_t au64Padding[ 5];1981 uint64_t au64Padding[4]; 1980 1982 /** @} */ 1981 1983
Note:
See TracChangeset
for help on using the changeset viewer.