Commit b6182bd7 authored by jochen@chromium.org's avatar jochen@chromium.org

Add a histogram timer around low memory notifications from API

BUG=397026
R=hpayer@chromium.org, ernstm@chromium.org
LOG=n

Review URL: https://codereview.chromium.org/416853002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22604 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d409898d
......@@ -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");
}
}
......
......@@ -299,6 +299,7 @@ class HistogramTimerScope BASE_EMBEDDED {
HT(gc_context, V8.GCContext) /* GC context cleanup time */ \
HT(gc_idle_notification, V8.GCIdleNotification) \
HT(gc_incremental_marking, V8.GCIncrementalMarking) \
HT(gc_low_memory_notification, V8.GCLowMemoryNotification) \
/* Parsing timers. */ \
HT(parse, V8.Parse) \
HT(parse_lazy, V8.ParseLazy) \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment