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

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

Issue 1201773004: Oilpan: Trace Heap memory statistics more often. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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
« Source/platform/heap/Heap.cpp ('K') | « Source/platform/heap/Heap.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/ThreadState.cpp
diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp
index 73afe55fb9d405a2dd345e901dbcd85afe6609e6..d23f76e4403365536fe35a7a5996af4d68392844 100644
--- a/Source/platform/heap/ThreadState.cpp
+++ b/Source/platform/heap/ThreadState.cpp
@@ -652,14 +652,7 @@ void ThreadState::scheduleGCIfNeeded()
return;
ASSERT(!sweepForbidden());
-#if ENABLE(GC_PROFILING)
- // These values are divided by 1024 to avoid overflow in practical cases (TRACE_COUNTER values are 32-bit ints).
- // They are capped to INT_MAX just in case.
- TRACE_COUNTER1("blink_gc", "Heap::estimatedLiveObjectSizeKB", std::min(Heap::estimatedLiveObjectSize() / 1024, static_cast<size_t>(INT_MAX)));
- TRACE_COUNTER1("blink_gc", "Heap::allocatedObjectSizeKB", std::min(Heap::allocatedObjectSize() / 1024, static_cast<size_t>(INT_MAX)));
- TRACE_COUNTER1("blink_gc", "Heap::markedObjectSizeKB", std::min(Heap::markedObjectSize() / 1024, static_cast<size_t>(INT_MAX)));
- TRACE_COUNTER1("blink_gc", "Partitions::totalSizeOfCommittedPagesKB", std::min(WTF::Partitions::totalSizeOfCommittedPages() / 1024, static_cast<size_t>(INT_MAX)));
-#endif
+ Heap::reportMemoryUsageForTracing();
if (shouldForceConservativeGC()) {
Heap::collectGarbage(HeapPointersOnStack, GCWithoutSweep, Heap::ConservativeGC);
@@ -1099,6 +1092,8 @@ void ThreadState::completeSweep()
void ThreadState::postSweep()
{
+ Heap::reportMemoryUsageForTracing();
+
if (isMainThread()) {
// At the point where the main thread finishes lazy sweeping,
// we estimate the live object size. Heap::markedObjectSize()
« Source/platform/heap/Heap.cpp ('K') | « Source/platform/heap/Heap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698