Commit 820e447e authored by Dominik Inführ's avatar Dominik Inführ Committed by Commit Bot

[heap] Add remembered set processing to GCTracer

Measure remembered set processing during Scavenge.

Change-Id: I8f7f31269bf1c09ff1f3cb3455fc96bce5c4f35d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1895562
Commit-Queue: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64755}
parent 4cd07485
......@@ -564,6 +564,7 @@ void GCTracer::PrintNVP() const {
"fast_promote=%.2f "
"scavenge=%.2f "
"scavenge.process_array_buffers=%.2f "
"scavenge.free_remembered_set=%.2f "
"scavenge.roots=%.2f "
"scavenge.weak=%.2f "
"scavenge.weak_global_handles.identify=%.2f "
......@@ -604,6 +605,7 @@ void GCTracer::PrintNVP() const {
current_.scopes[Scope::SCAVENGER_FAST_PROMOTE],
current_.scopes[Scope::SCAVENGER_SCAVENGE],
current_.scopes[Scope::SCAVENGER_PROCESS_ARRAY_BUFFERS],
current_.scopes[Scope::SCAVENGER_FREE_REMEMBERED_SET],
current_.scopes[Scope::SCAVENGER_SCAVENGE_ROOTS],
current_.scopes[Scope::SCAVENGER_SCAVENGE_WEAK],
current_
......
......@@ -360,9 +360,14 @@ void ScavengerCollector::CollectGarbage() {
// TODO(hpayer): Don't free all as soon as we have an intermediate generation.
heap_->new_lo_space()->FreeDeadObjects([](HeapObject) { return true; });
RememberedSet<OLD_TO_NEW>::IterateMemoryChunks(heap_, [](MemoryChunk* chunk) {
RememberedSet<OLD_TO_NEW>::FreeEmptyBuckets(chunk);
});
{
TRACE_GC(heap_->tracer(), GCTracer::Scope::SCAVENGER_FREE_REMEMBERED_SET);
RememberedSet<OLD_TO_NEW>::IterateMemoryChunks(
heap_, [](MemoryChunk* chunk) {
RememberedSet<OLD_TO_NEW>::FreeEmptyBuckets(chunk);
});
}
// Update how much has survived scavenge.
heap_->IncrementYoungSurvivorsCounter(heap_->SurvivedYoungObjectSize());
......
......@@ -475,6 +475,7 @@
F(MINOR_MC_RESET_LIVENESS) \
F(MINOR_MC_SWEEPING) \
F(SCAVENGER_FAST_PROMOTE) \
F(SCAVENGER_FREE_REMEMBERED_SET) \
F(SCAVENGER_SCAVENGE) \
F(SCAVENGER_PROCESS_ARRAY_BUFFERS) \
F(SCAVENGER_SCAVENGE_WEAK_GLOBAL_HANDLES_IDENTIFY) \
......
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