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

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

Issue 525353002: [oilpan]: optimize the way we allocate persistent handles in wrappers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: short copyright header Created 6 years, 3 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: Source/platform/heap/ThreadState.h
diff --git a/Source/platform/heap/ThreadState.h b/Source/platform/heap/ThreadState.h
index 974007726c7e74740324394201e1e49fc7fc1af7..e89258c59b25ae547727db1777bb8cf05f5eaaf4 100644
--- a/Source/platform/heap/ThreadState.h
+++ b/Source/platform/heap/ThreadState.h
@@ -56,6 +56,7 @@ class HeapContainsCache;
class HeapObjectHeader;
class PageMemory;
class PersistentNode;
+class WrapperPersistentRegion;
class Visitor;
class SafePointBarrier;
class SafePointAwareMutexLocker;
@@ -528,6 +529,14 @@ public:
BaseHeapPage* contains(void* pointer) { return contains(reinterpret_cast<Address>(pointer)); }
BaseHeapPage* contains(const void* pointer) { return contains(const_cast<void*>(pointer)); }
+ WrapperPersistentRegion* wrapperRoots() const
+ {
+ ASSERT(m_liveWrapperPersistents);
+ return m_liveWrapperPersistents;
+ }
+ WrapperPersistentRegion* addWrapperPersistentRegion();
+ void removeWrapperPersistentRegion(WrapperPersistentRegion*);
+
// List of persistent roots allocated on the given thread.
PersistentNode* roots() const { return m_persistents.get(); }
@@ -652,6 +661,9 @@ private:
static uint8_t s_mainThreadStateStorage[];
ThreadIdentifier m_thread;
+ WrapperPersistentRegion* m_liveWrapperPersistents;
+ WrapperPersistentRegion* m_pooledWrapperPersistents;
+ size_t m_numPooledWrapperPersistentRegions;
haraken 2014/09/02 13:00:37 m_numPooledWrapperPersistentRegions => m_numberOfP
wibling-chromium 2014/09/02 13:55:33 Done.
OwnPtr<PersistentNode> m_persistents;
StackState m_stackState;
intptr_t* m_startOfStack;

Powered by Google App Engine
This is Rietveld 408576698