Commit 7a7ec9a0 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Check for --track_retaining_path in incremental marking visitor

This removes the usage of retaining_path_mode template parameter in
main thread marking visitor and makes the incremental visitor
identical to the stop-the-world visitor.

Subsequent CL will switch these visitors to MarkingVisitorBase.

Bug: chromium:1019218
Change-Id: I00e3ef190d8f2ac821cb63b02c402aad5ea49e9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1897538Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64757}
parent 74cb9fc2
......@@ -338,8 +338,7 @@ void MarkingVisitor<fixed_array_mode, retaining_path_mode, MarkingState>::
// descriptor array is grey. So we need to do two steps: WhiteToGrey and
// GreyToBlack. Alternatively, we could check WhiteToGrey || WhiteToBlack.
if (marking_state()->WhiteToGrey(descriptors)) {
if (retaining_path_mode == TraceRetainingPathMode::kEnabled &&
V8_UNLIKELY(FLAG_track_retaining_path)) {
if (V8_UNLIKELY(FLAG_track_retaining_path)) {
heap_->AddRetainer(host, descriptors);
}
}
......@@ -357,8 +356,7 @@ void MarkingVisitor<fixed_array_mode, retaining_path_mode,
HeapObject object) {
if (marking_state()->WhiteToGrey(object)) {
marking_worklist()->Push(object);
if (retaining_path_mode == TraceRetainingPathMode::kEnabled &&
V8_UNLIKELY(FLAG_track_retaining_path)) {
if (V8_UNLIKELY(FLAG_track_retaining_path)) {
heap_->AddRetainer(host, object);
}
}
......
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