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

Unified Diff: Source/platform/heap/Heap.h

Issue 1220253004: Implement a fast buffer allocator for Vector, HashTable and StringBuilder Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/platform/heap/BufferAllocator.cpp ('k') | Source/platform/heap/Heap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Heap.h
diff --git a/Source/platform/heap/Heap.h b/Source/platform/heap/Heap.h
index 6f2186551c63801842022a3cae9feb947b41ed40..4e1ca377b9e9adf0d9390c8f7d8d722e94db89b6 100644
--- a/Source/platform/heap/Heap.h
+++ b/Source/platform/heap/Heap.h
@@ -709,6 +709,7 @@ public:
#endif
Address lazySweep(size_t, size_t gcInfoIndex);
void sweepUnsweptPage();
+ void freePage(BasePage*);
// Returns true if we have swept all pages within the deadline.
// Returns false otherwise.
bool lazySweepWithDeadline(double deadlineSeconds);
@@ -717,6 +718,8 @@ public:
ThreadState* threadState() { return m_threadState; }
int heapIndex() const { return m_index; }
+ virtual void printStats() { }
+
protected:
BasePage* m_firstPage;
BasePage* m_firstUnsweptPage;
@@ -760,6 +763,8 @@ public:
bool shrinkObject(HeapObjectHeader*, size_t);
void decreasePromptlyFreedSize(size_t size) { m_promptlyFreedSize -= size; }
+ void printStats() override;
+
private:
void allocatePage();
Address lazySweepPages(size_t, size_t gcInfoIndex) override;
@@ -784,6 +789,15 @@ private:
size_t m_allocationCount;
size_t m_inlineAllocationCount;
#endif
+
+ int m_promptlyFreeHit;
+ int m_promptlyFreeHitIgnored;
+ int m_promptlyFreeMiss;
+ int m_promptlyFreeMissIgnored;
+ int m_expandHit;
+ int m_expandHitIgnored;
+ int m_expandMiss;
+ int m_expandMissIgnored;
};
class LargeObjectHeap final : public BaseHeap {
« no previous file with comments | « Source/platform/heap/BufferAllocator.cpp ('k') | Source/platform/heap/Heap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698