Chromium Code Reviews| 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 e9dcbe158cc2575f8f7b60b7ee480973c5e0c325..90eeb3dfe5c7bf554dae0a728c26df7448974a03 100644 |
| --- a/third_party/WebKit/Source/platform/heap/HeapPage.cpp |
| +++ b/third_party/WebKit/Source/platform/heap/HeapPage.cpp |
| @@ -545,7 +545,7 @@ bool NormalPageHeap::coalesce() |
| if (startOfGap != page->payloadEnd()) |
| addToFreeList(startOfGap, page->payloadEnd() - startOfGap); |
| } |
| - Heap::decreaseAllocatedObjectSize(freedSize); |
| + threadState()->decreaseAllocatedObjectSize(freedSize); |
| ASSERT(m_promptlyFreedSize == freedSize); |
| m_promptlyFreedSize = 0; |
| return true; |
| @@ -663,16 +663,16 @@ void NormalPageHeap::setRemainingAllocationSize(size_t newRemainingAllocationSiz |
| // - if previous alloc checkpoint is larger, allocation size has increased. |
| // - if smaller, a net reduction in size since last call to updateRemainingAllocationSize(). |
| if (m_lastRemainingAllocationSize > m_remainingAllocationSize) |
| - Heap::increaseAllocatedObjectSize(m_lastRemainingAllocationSize - m_remainingAllocationSize); |
| + threadState()->increaseAllocatedObjectSize(m_lastRemainingAllocationSize - m_remainingAllocationSize); |
| else if (m_lastRemainingAllocationSize != m_remainingAllocationSize) |
| - Heap::decreaseAllocatedObjectSize(m_remainingAllocationSize - m_lastRemainingAllocationSize); |
| + threadState()->decreaseAllocatedObjectSize(m_remainingAllocationSize - m_lastRemainingAllocationSize); |
| m_lastRemainingAllocationSize = m_remainingAllocationSize; |
| } |
| void NormalPageHeap::updateRemainingAllocationSize() |
| { |
| if (m_lastRemainingAllocationSize > remainingAllocationSize()) { |
| - Heap::increaseAllocatedObjectSize(m_lastRemainingAllocationSize - remainingAllocationSize()); |
| + threadState()->increaseAllocatedObjectSize(m_lastRemainingAllocationSize - remainingAllocationSize()); |
| m_lastRemainingAllocationSize = remainingAllocationSize(); |
| } |
| ASSERT(m_lastRemainingAllocationSize == remainingAllocationSize()); |
| @@ -839,7 +839,7 @@ Address LargeObjectHeap::doAllocateLargeObjectPage(size_t allocationSize, size_t |
| largeObject->link(&m_firstPage); |
| Heap::increaseAllocatedSpace(largeObject->size()); |
| - Heap::increaseAllocatedObjectSize(largeObject->size()); |
| + threadState()->increaseAllocatedObjectSize(largeObject->size()); |
| return result; |
| } |
| @@ -1185,7 +1185,7 @@ void NormalPage::sweep() |
| } |
| if (markedObjectSize) |
| - Heap::increaseMarkedObjectSize(markedObjectSize); |
| + heapForNormalPage()->threadState()->increaseMarkedObjectSize(markedObjectSize); |
|
sof
2016/02/16 09:14:38
(I think it would be worth it to manually CSE heap
peria
2016/02/17 02:31:26
Done.
|
| } |
| void NormalPage::makeConsistentForGC() |
| @@ -1210,7 +1210,7 @@ void NormalPage::makeConsistentForGC() |
| headerAddress += header->size(); |
| } |
| if (markedObjectSize) |
| - Heap::increaseMarkedObjectSize(markedObjectSize); |
| + heapForNormalPage()->threadState()->increaseMarkedObjectSize(markedObjectSize); |
| } |
| void NormalPage::makeConsistentForMutator() |
| @@ -1477,7 +1477,7 @@ void LargeObjectPage::removeFromHeap() |
| void LargeObjectPage::sweep() |
| { |
| heapObjectHeader()->unmark(); |
| - Heap::increaseMarkedObjectSize(size()); |
| + heap()->threadState()->increaseMarkedObjectSize(size()); |
| } |
| void LargeObjectPage::makeConsistentForGC() |
| @@ -1485,7 +1485,7 @@ void LargeObjectPage::makeConsistentForGC() |
| HeapObjectHeader* header = heapObjectHeader(); |
| if (header->isMarked()) { |
| header->unmark(); |
| - Heap::increaseMarkedObjectSize(size()); |
| + heap()->threadState()->increaseMarkedObjectSize(size()); |
| } else { |
| header->markDead(); |
| } |