Reviewers: Hannes Payer,

Description:
GC: Add tracing event for rescanning large objects on newspace evacuation

BUG=

Please review this at https://codereview.chromium.org/1269753002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+5, -0 lines):
  M src/heap/gc-tracer.h
  M src/heap/gc-tracer.cc
  M src/heap/mark-compact.cc


Index: src/heap/gc-tracer.cc
diff --git a/src/heap/gc-tracer.cc b/src/heap/gc-tracer.cc
index e4b255838fc7207e592372cf42671a46f98a4655..1390923149997f672d68b0dc25ce5f50de667a57 100644
--- a/src/heap/gc-tracer.cc
+++ b/src/heap/gc-tracer.cc
@@ -426,6 +426,8 @@ void GCTracer::PrintNVP() const {
       PrintF("sweepcode=%.2f ", current_.scopes[Scope::MC_SWEEP_CODE]);
       PrintF("sweepcell=%.2f ", current_.scopes[Scope::MC_SWEEP_CELL]);
       PrintF("sweepmap=%.2f ", current_.scopes[Scope::MC_SWEEP_MAP]);
+      PrintF("rescan_lo=%.2f ",
+             current_.scopes[Scope::MC_SWEEP_RESCAN_LARGE_OBJECTS]);
       PrintF("evacuate=%.1f ", current_.scopes[Scope::MC_EVACUATE_PAGES]);
       PrintF("new_new=%.1f ",
              current_.scopes[Scope::MC_UPDATE_NEW_TO_NEW_POINTERS]);
Index: src/heap/gc-tracer.h
diff --git a/src/heap/gc-tracer.h b/src/heap/gc-tracer.h
index 64f43bc4d0f4eb8408f418efacdc02bfa1b867bb..a159b0be832a68755f3d4451a3d9b84b817c9e5d 100644
--- a/src/heap/gc-tracer.h
+++ b/src/heap/gc-tracer.h
@@ -104,6 +104,7 @@ class GCTracer {
       MC_SWEEP_CODE,
       MC_SWEEP_CELL,
       MC_SWEEP_MAP,
+      MC_SWEEP_RESCAN_LARGE_OBJECTS,
       MC_EVACUATE_PAGES,
       MC_UPDATE_NEW_TO_NEW_POINTERS,
       MC_UPDATE_ROOT_TO_NEW_POINTERS,
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index 6d3ceff7cb27567d1710c4e5c7b73553b6fb030b..e6beee92005c4e11dd6c9d64d5f361bf2fdeb6bb 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -3695,6 +3695,8 @@ void MarkCompactCollector::EvacuateNewSpaceAndCandidates() {
     }

     if (compacting_ && was_marked_incrementally_) {
+      GCTracer::Scope gc_scope(heap()->tracer(),
+ GCTracer::Scope::MC_SWEEP_RESCAN_LARGE_OBJECTS);
       // It's difficult to filter out slots recorded for large objects.
       LargeObjectIterator it(heap_->lo_space());
       for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) {


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to