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

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: Created 6 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
Index: Source/platform/heap/ThreadState.h
diff --git a/Source/platform/heap/ThreadState.h b/Source/platform/heap/ThreadState.h
index 974007726c7e74740324394201e1e49fc7fc1af7..6d1abe9c5899e5d990b353bbe9399d9c5c1c4cfa 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_wrapperPersistents);
+ return m_wrapperPersistents;
+ }
+ 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_wrapperPersistents;
haraken 2014/09/02 05:22:06 m_wrapperPersistents => m_usedWrapperPersistents m
wibling-chromium 2014/09/02 11:19:38 Done. Changed them to m_liveWrapperPersistents m_
+ WrapperPersistentRegion* m_wrapperPersistentRegionPool;
haraken 2014/09/02 05:22:06 WrapperPersistentRegion is owned by either m_wrapp
wibling-chromium 2014/09/02 11:19:38 I would prefer to keep it a double-linked list to
+ size_t m_wrapperPersistentRegionPoolSize;
OwnPtr<PersistentNode> m_persistents;
StackState m_stackState;
intptr_t* m_startOfStack;

Powered by Google App Engine
This is Rietveld 408576698