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

Unified Diff: src/heap/heap.cc

Issue 1806283004: [heap] Adding fine grained timer scopes to external callbacks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « src/heap/gc-tracer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 8802266d985654b1e4792f5cddb6fafd409e32da..9cb89ed17b602c306982a87325f6e23f9124b2d4 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -820,7 +820,8 @@ void Heap::FinalizeIncrementalMarking(const char* gc_reason) {
GCCallbacksScope scope(this);
if (scope.CheckReenter()) {
AllowHeapAllocation allow_allocation;
- GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL);
+ GCTracer::Scope scope(tracer(),
+ GCTracer::Scope::MC_INCREMENTAL_EXTERNAL_PROLOGUE);
VMState<EXTERNAL> state(isolate_);
HandleScope handle_scope(isolate_);
CallGCPrologueCallbacks(kGCTypeIncrementalMarking, kNoGCCallbackFlags);
@@ -831,7 +832,8 @@ void Heap::FinalizeIncrementalMarking(const char* gc_reason) {
GCCallbacksScope scope(this);
if (scope.CheckReenter()) {
AllowHeapAllocation allow_allocation;
- GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL);
+ GCTracer::Scope scope(tracer(),
+ GCTracer::Scope::MC_INCREMENTAL_EXTERNAL_PROLOGUE);
VMState<EXTERNAL> state(isolate_);
HandleScope handle_scope(isolate_);
CallGCEpilogueCallbacks(kGCTypeIncrementalMarking, kNoGCCallbackFlags);
@@ -1278,7 +1280,10 @@ bool Heap::PerformGarbageCollection(
GCCallbacksScope scope(this);
if (scope.CheckReenter()) {
AllowHeapAllocation allow_allocation;
- GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL);
+ GCTracer::Scope scope(tracer(),
+ collector == MARK_COMPACTOR
+ ? GCTracer::Scope::MC_EXTERNAL_PROLOGUE
+ : GCTracer::Scope::SCAVENGER_EXTERNAL_PROLOGUE);
VMState<EXTERNAL> state(isolate_);
HandleScope handle_scope(isolate_);
CallGCPrologueCallbacks(gc_type, kNoGCCallbackFlags);
@@ -1337,7 +1342,8 @@ bool Heap::PerformGarbageCollection(
gc_post_processing_depth_++;
{
AllowHeapAllocation allow_allocation;
- GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL);
+ GCTracer::Scope scope(tracer(),
+ GCTracer::Scope::EXTERNAL_WEAK_GLOBAL_HANDLES);
freed_global_handles =
isolate_->global_handles()->PostGarbageCollectionProcessing(
collector, gc_callback_flags);
@@ -1368,7 +1374,10 @@ bool Heap::PerformGarbageCollection(
GCCallbacksScope scope(this);
if (scope.CheckReenter()) {
AllowHeapAllocation allow_allocation;
- GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL);
+ GCTracer::Scope scope(tracer(),
+ collector == MARK_COMPACTOR
+ ? GCTracer::Scope::MC_EXTERNAL_EPILOGUE
+ : GCTracer::Scope::SCAVENGER_EXTERNAL_EPILOGUE);
VMState<EXTERNAL> state(isolate_);
HandleScope handle_scope(isolate_);
CallGCEpilogueCallbacks(gc_type, gc_callback_flags);
« no previous file with comments | « src/heap/gc-tracer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698