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

Unified Diff: src/heap/heap.cc

Issue 1235913002: Add scavenger events to GC tracer (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 5 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
« src/heap/gc-tracer.cc ('K') | « 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 eef37429aad3a4be453517f52c6efc5402bcd203..4114bc5ca64a3c29488152d76654fb37cecc7b6e 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1640,6 +1640,7 @@ class ScavengeWeakObjectRetainer : public WeakObjectRetainer {
void Heap::Scavenge() {
+ GCTracer::Scope gc_scope(tracer(), GCTracer::Scope::SCAVENGER_SCAVENGE);
RelocationLock relocation_lock(this);
// There are soft limits in the allocation code, designed to trigger a mark
// sweep collection by failing allocations. There is no sense in trying to
@@ -1696,6 +1697,8 @@ void Heap::Scavenge() {
// Copy objects reachable from the old generation.
{
+ GCTracer::Scope gc_scope(tracer(),
+ GCTracer::Scope::SCAVENGER_OLD_TO_NEW_POINTERS);
StoreBufferRebuildScope scope(this, store_buffer(),
&ScavengeStoreBufferCallback);
store_buffer()->IteratePointersToNewSpace(&ScavengeObject);
@@ -1712,7 +1715,10 @@ void Heap::Scavenge() {
collector->code_flusher()->IteratePointersToFromSpace(&scavenge_visitor);
}
- new_space_front = DoScavenge(&scavenge_visitor, new_space_front);
+ {
+ GCTracer::Scope gc_scope(tracer(), GCTracer::Scope::SCAVENGER_SEMISPACE);
+ new_space_front = DoScavenge(&scavenge_visitor, new_space_front);
+ }
while (isolate()->global_handles()->IterateObjectGroups(
Hannes Payer (out of office) 2015/07/20 08:50:25 This is another interesting event. Let's increase
Michael Lippautz 2015/07/20 09:34:05 Done.
&scavenge_visitor, &IsUnscavengedHeapObject)) {
« src/heap/gc-tracer.cc ('K') | « src/heap/gc-tracer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698