Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index 0fcae28294bd86c2f95866b67725ac058a540e95..117427a55d25d9cd23562b5708a9ccaae8676b7b 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -5063,7 +5063,11 @@ bool v8::V8::IdleNotification(int hint) { |
void v8::V8::LowMemoryNotification() { |
i::Isolate* isolate = i::Isolate::Current(); |
if (isolate == NULL || !isolate->IsInitialized()) return; |
- isolate->heap()->CollectAllAvailableGarbage("low memory notification"); |
+ { |
+ i::HistogramTimerScope idle_notification_scope( |
+ isolate->counters()->gc_low_memory_notification()); |
+ isolate->heap()->CollectAllAvailableGarbage("low memory notification"); |
+ } |
} |
@@ -6723,7 +6727,11 @@ bool v8::Isolate::IdleNotification(int idle_time_in_ms) { |
void v8::Isolate::LowMemoryNotification() { |
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
- isolate->heap()->CollectAllAvailableGarbage("low memory notification"); |
+ { |
+ i::HistogramTimerScope idle_notification_scope( |
+ isolate->counters()->gc_low_memory_notification()); |
+ isolate->heap()->CollectAllAvailableGarbage("low memory notification"); |
+ } |
} |