Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Unified Diff: third_party/WebKit/Source/platform/heap/HeapPage.cpp

Issue 1840103004: Introduce ThreadHeapStats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/heap/HeapPage.cpp
diff --git a/third_party/WebKit/Source/platform/heap/HeapPage.cpp b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
index 3e29d69f5603e6571909f7c5b4f4f6a7b12f1936..c8fa6c0aad25fadbf1ed0dd77b4d216743b4343a 100644
--- a/third_party/WebKit/Source/platform/heap/HeapPage.cpp
+++ b/third_party/WebKit/Source/platform/heap/HeapPage.cpp
@@ -126,7 +126,7 @@ void BaseArena::cleanupPages()
ASSERT(!m_firstUnsweptPage);
// Add the BaseArena's pages to the orphanedPagePool.
for (BasePage* page = m_firstPage; page; page = page->next()) {
- Heap::decreaseAllocatedSpace(page->size());
+ Heap::heapStats().decreaseAllocatedSpace(page->size());
Heap::getOrphanedPagePool()->addOrphanedPage(arenaIndex(), page);
}
m_firstPage = nullptr;
@@ -429,7 +429,7 @@ void NormalPageArena::allocatePage()
NormalPage* page = new (pageMemory->writableStart()) NormalPage(pageMemory, this);
page->link(&m_firstPage);
- Heap::increaseAllocatedSpace(page->size());
+ Heap::heapStats().increaseAllocatedSpace(page->size());
#if ENABLE(ASSERT) || defined(LEAK_SANITIZER) || defined(ADDRESS_SANITIZER)
// Allow the following addToFreeList() to add the newly allocated memory
// to the free list.
@@ -444,7 +444,7 @@ void NormalPageArena::allocatePage()
void NormalPageArena::freePage(NormalPage* page)
{
- Heap::decreaseAllocatedSpace(page->size());
+ Heap::heapStats().decreaseAllocatedSpace(page->size());
if (page->terminating()) {
// The thread is shutting down and this page is being removed as a part
@@ -817,7 +817,7 @@ Address LargeObjectArena::doAllocateLargeObjectPage(size_t allocationSize, size_
largeObject->link(&m_firstPage);
- Heap::increaseAllocatedSpace(largeObject->size());
+ Heap::heapStats().increaseAllocatedSpace(largeObject->size());
getThreadState()->increaseAllocatedObjectSize(largeObject->size());
return result;
}
@@ -826,7 +826,7 @@ void LargeObjectArena::freeLargeObjectPage(LargeObjectPage* object)
{
ASAN_UNPOISON_MEMORY_REGION(object->payload(), object->payloadSize());
object->heapObjectHeader()->finalize(object->payload(), object->payloadSize());
- Heap::decreaseAllocatedSpace(object->size());
+ Heap::heapStats().decreaseAllocatedSpace(object->size());
// Unpoison the object header and allocationGranularity bytes after the
// object before freeing.
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Heap.cpp ('k') | third_party/WebKit/Source/platform/heap/HeapTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698