| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index 287a93627e652722a2cf18410cabf7b34c8e2ec1..23a791c03184dd25bc88d85ab8885f1fd5fc2abd 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -38,6 +38,7 @@
|
| #include "src/snapshot/natives.h"
|
| #include "src/snapshot/serialize.h"
|
| #include "src/snapshot/snapshot.h"
|
| +#include "src/tracing/trace-event.h"
|
| #include "src/type-feedback-vector.h"
|
| #include "src/utils.h"
|
| #include "src/v8.h"
|
| @@ -817,6 +818,7 @@ void Heap::FinalizeIncrementalMarking(const char* gc_reason) {
|
| GCTracer::Scope gc_scope(tracer(), GCTracer::Scope::MC_INCREMENTAL_FINALIZE);
|
| HistogramTimerScope incremental_marking_scope(
|
| isolate()->counters()->gc_incremental_marking_finalize());
|
| + TRACE_EVENT0("v8", "V8.GCIncrementalMarkingFinalize");
|
|
|
| {
|
| GCCallbacksScope scope(this);
|
| @@ -858,7 +860,6 @@ HistogramTimer* Heap::GCTypeTimer(GarbageCollector collector) {
|
| }
|
| }
|
|
|
| -
|
| void Heap::CollectAllGarbage(int flags, const char* gc_reason,
|
| const v8::GCCallbackFlags gc_callback_flags) {
|
| // Since we are ignoring the return value, the exact choice of space does
|
| @@ -1006,7 +1007,9 @@ bool Heap::CollectGarbage(GarbageCollector collector, const char* gc_reason,
|
| GarbageCollectionPrologue();
|
|
|
| {
|
| - HistogramTimerScope histogram_timer_scope(GCTypeTimer(collector));
|
| + HistogramTimer* gc_type_timer = GCTypeTimer(collector);
|
| + HistogramTimerScope histogram_timer_scope(gc_type_timer);
|
| + TRACE_EVENT0("v8", gc_type_timer->name());
|
|
|
| next_gc_likely_to_collect_more =
|
| PerformGarbageCollection(collector, gc_callback_flags);
|
| @@ -4196,6 +4199,7 @@ bool Heap::PerformIdleTimeAction(GCIdleTimeAction action,
|
| case DO_FULL_GC: {
|
| DCHECK(contexts_disposed_ > 0);
|
| HistogramTimerScope scope(isolate_->counters()->gc_context());
|
| + TRACE_EVENT0("v8", "V8.GCContext");
|
| CollectAllGarbage(kNoGCFlags, "idle notification: contexts disposed");
|
| break;
|
| }
|
| @@ -4281,6 +4285,7 @@ bool Heap::IdleNotification(double deadline_in_seconds) {
|
| static_cast<double>(base::Time::kMillisecondsPerSecond);
|
| HistogramTimerScope idle_notification_scope(
|
| isolate_->counters()->gc_idle_notification());
|
| + TRACE_EVENT0("v8", "V8.GCIdleNotification");
|
| double start_ms = MonotonicallyIncreasingTimeInMs();
|
| double idle_time_in_ms = deadline_in_ms - start_ms;
|
|
|
|
|