Lines Matching defs:pStat

142 static void mmR3HyperStatRegisterOne(PVM pVM, PMMHYPERSTAT pStat);
257 PMMHYPERSTAT pStat = mmHyperStat(pHeap, enmTag);
258 if (!pStat)
277 pStat->cbAllocated += (uint32_t)cbChunk;
278 pStat->cbCurAllocated += (uint32_t)cbChunk;
279 if (pStat->cbCurAllocated > pStat->cbMaxAllocated)
280 pStat->cbMaxAllocated = pStat->cbCurAllocated;
281 pStat->cAllocations++;
282 pChunk->offStat = (uintptr_t)pStat - (uintptr_t)pChunk;
302 pStat->cbAllocated += cbAligned;
303 pStat->cbCurAllocated += cbAligned;
304 if (pStat->cbCurAllocated > pStat->cbMaxAllocated)
305 pStat->cbMaxAllocated = pStat->cbCurAllocated;
306 pStat->cAllocations++;
316 pStat->cAllocations++;
317 pStat->cFailures++;
685 PMMHYPERSTAT pStat = (PMMHYPERSTAT)((uintptr_t)pPrev + pPrev->offStat);
686 pStat->cbAllocated += (uintptr_t)pvRet - (uintptr_t)pFree;
687 pStat->cbCurAllocated += (uintptr_t)pvRet - (uintptr_t)pFree;
727 PMMHYPERSTAT pStat = (PMMHYPERSTAT)RTAvloGCPhysGet(&pHeap->HyperHeapStatTree, enmTag);
728 if (!pStat)
731 PMMHYPERCHUNK pChunk = mmHyperAllocChunk(pHeap, RT_ALIGN(sizeof(*pStat), MMHYPER_HEAP_ALIGN_MIN), MMHYPER_HEAP_ALIGN_MIN);
734 pStat = (PMMHYPERSTAT)(pChunk + 1);
735 pChunk->offStat = (uintptr_t)pStat - (uintptr_t)pChunk;
737 ASMMemZero32(pStat, sizeof(*pStat));
738 pStat->Core.Key = enmTag;
739 RTAvloGCPhysInsert(&pHeap->HyperHeapStatTree, &pStat->Core);
741 if (!pStat->fRegistered)
744 mmR3HyperStatRegisterOne(pHeap->pVMR3, pStat);
749 return pStat;
758 static void mmR3HyperStatRegisterOne(PVM pVM, PMMHYPERSTAT pStat)
760 if (pStat->fRegistered)
762 const char *pszTag = mmGetTagName((MMTAG)pStat->Core.Key);
763 STAMR3RegisterF(pVM, &pStat->cbCurAllocated, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, "Number of bytes currently allocated.", "/MM/HyperHeap/%s", pszTag);
764 STAMR3RegisterF(pVM, &pStat->cAllocations, STAMTYPE_U64, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "Number of alloc calls.", "/MM/HyperHeap/%s/cAllocations", pszTag);
765 STAMR3RegisterF(pVM, &pStat->cFrees, STAMTYPE_U64, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "Number of free calls.", "/MM/HyperHeap/%s/cFrees", pszTag);
766 STAMR3RegisterF(pVM, &pStat->cFailures, STAMTYPE_U64, STAMVISIBILITY_ALWAYS, STAMUNIT_COUNT, "Number of failures.", "/MM/HyperHeap/%s/cFailures", pszTag);
767 STAMR3RegisterF(pVM, &pStat->cbAllocated, STAMTYPE_U64, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, "Total number of allocated bytes.", "/MM/HyperHeap/%s/cbAllocated", pszTag);
768 STAMR3RegisterF(pVM, &pStat->cbFreed, STAMTYPE_U64, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, "Total number of freed bytes.", "/MM/HyperHeap/%s/cbFreed", pszTag);
769 STAMR3RegisterF(pVM, &pStat->cbMaxAllocated, STAMTYPE_U32, STAMVISIBILITY_ALWAYS, STAMUNIT_BYTES, "Max number of bytes allocated at the same time.","/MM/HyperHeap/%s/cbMaxAllocated", pszTag);
770 pStat->fRegistered = true;
818 PMMHYPERSTAT pStat = (PMMHYPERSTAT)((uintptr_t)pChunk + pChunk->offStat);
819 AssertMsgReturn( RT_ALIGN_P(pStat, MMHYPER_HEAP_ALIGN_MIN) == (void *)pStat
915 pStat->cFrees++;
918 pStat->cbFreed += cbChunk;
919 pStat->cbCurAllocated -= cbChunk;
922 pStat->cFailures++;
1126 PMMHYPERSTAT pStat = (PMMHYPERSTAT)((uintptr_t)pCur + pCur->core.offStat);
1132 mmGetTagName((MMTAG)pStat->Core.Key), pszSelf));
1137 (MMTAG)pStat->Core.Key, pszSelf));