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

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

Issue 1211573006: Oilpan: Count # of collected Persistent handles and use it to estimate the live object size (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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/BlinkGCMemoryDumpProvider.cpp ('k') | Source/platform/heap/Heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Handle.h
diff --git a/Source/platform/heap/Handle.h b/Source/platform/heap/Handle.h
index d9a390582df49e103d7c429d6d7363c1b74ad8dc..b25f3bbc0789009772a04ecf8d53943cbcdb9614 100644
--- a/Source/platform/heap/Handle.h
+++ b/Source/platform/heap/Handle.h
@@ -212,6 +212,7 @@ private:
ThreadState* state = ThreadStateFor<ThreadingTrait<T>::Affinity>::state();
ASSERT(state->checkThread());
m_persistentNode = state->persistentRegion()->allocatePersistentNode(this, TraceMethodDelegate<Persistent<T>, &Persistent<T>::trace>::trampoline);
+ state->persistentAllocated();
#if ENABLE(ASSERT)
m_state = state;
#endif
@@ -224,6 +225,7 @@ private:
// Persistent handle must be created and destructed in the same thread.
ASSERT(m_state == state);
state->persistentRegion()->freePersistentNode(m_persistentNode);
+ state->persistentFreed();
}
void checkPointer()
@@ -497,6 +499,7 @@ private:
ThreadState* state = ThreadState::current();
ASSERT(state->checkThread());
m_persistentNode = state->persistentRegion()->allocatePersistentNode(this, TraceMethodDelegate<PersistentHeapCollectionBase<Collection>, &PersistentHeapCollectionBase<Collection>::trace>::trampoline);
+ state->persistentAllocated();
#if ENABLE(ASSERT)
m_state = state;
#endif
@@ -509,6 +512,7 @@ private:
// Persistent handle must be created and destructed in the same thread.
ASSERT(m_state == state);
state->persistentRegion()->freePersistentNode(m_persistentNode);
+ state->persistentFreed();
}
PersistentNode* m_persistentNode;
« no previous file with comments | « Source/platform/heap/BlinkGCMemoryDumpProvider.cpp ('k') | Source/platform/heap/Heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698