Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index 6c670ac53cba367200b2958456cddeb6faad8adc..5ee2d975a23ea2de9254ccd5e747f211971b4de2 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -855,6 +855,7 @@ void Heap::CollectAllAvailableGarbage(GarbageCollectionReason gc_reason) { |
// Note: as weak callbacks can execute arbitrary code, we cannot |
// hope that eventually there will be no weak callbacks invocations. |
// Therefore stop recollecting after several attempts. |
+ RuntimeCallTimerScope(isolate(), &RuntimeCallStats::GC_AllAvailableGarbage); |
Hannes Payer (out of office)
2016/11/23 16:53:05
Not sure what your naming scheme is but shouldn't
|
if (isolate()->concurrent_recompilation_enabled()) { |
// The optimizing compiler may be unnecessarily holding on to memory. |
DisallowHeapAllocation no_recursive_gc; |
@@ -936,6 +937,7 @@ bool Heap::CollectGarbage(GarbageCollector collector, |
const v8::GCCallbackFlags gc_callback_flags) { |
// The VM is in the GC state until exiting this function. |
VMState<GC> state(isolate_); |
+ RuntimeCallTimerScope(isolate(), &RuntimeCallStats::GC); |
#ifdef DEBUG |
// Reset the allocation timeout to the GC interval, but make sure to |
@@ -1386,6 +1388,7 @@ bool Heap::PerformGarbageCollection( |
void Heap::CallGCPrologueCallbacks(GCType gc_type, GCCallbackFlags flags) { |
+ RuntimeCallTimerScope(isolate(), &RuntimeCallStats::GCPrologueCallback); |
for (int i = 0; i < gc_prologue_callbacks_.length(); ++i) { |
if (gc_type & gc_prologue_callbacks_[i].gc_type) { |
if (!gc_prologue_callbacks_[i].pass_isolate) { |
@@ -1407,6 +1410,7 @@ void Heap::CallGCPrologueCallbacks(GCType gc_type, GCCallbackFlags flags) { |
void Heap::CallGCEpilogueCallbacks(GCType gc_type, |
GCCallbackFlags gc_callback_flags) { |
+ RuntimeCallTimerScope(isolate(), &RuntimeCallStats::GCEpilogueCallback); |
for (int i = 0; i < gc_epilogue_callbacks_.length(); ++i) { |
if (gc_type & gc_epilogue_callbacks_[i].gc_type) { |
if (!gc_epilogue_callbacks_[i].pass_isolate) { |