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

[heap] Bump up kProgressBarScanningChunk to kMaxRegularHeapObjectSize

Before this change large fixed arrays were visited in chunks of 32KB
on the main thread. Now large fixed arrays are divided into chunks
of kMaxRegularHeapObjectSize, which is consistent with large fixed
array processing on concurrent threads and make more sense considering
that regular fixed arrays are visited in one go.

Bug: chromium:1019218
Change-Id: I0c6d9c6c7d1db7f6a75d282601b73d4819b30e80
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1897886Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64746}
parent 50347e35
......@@ -876,7 +876,7 @@ class MarkingVisitor final
private:
// Granularity in which FixedArrays are scanned if |fixed_array_mode|
// is true.
static const int kProgressBarScanningChunk = 32 * KB;
static const int kProgressBarScanningChunk = kMaxRegularHeapObjectSize;
template <typename TSlot>
V8_INLINE void VisitPointerImpl(HeapObject host, TSlot p);
......
......@@ -160,10 +160,8 @@ template <typename ConcreteVisitor, typename MarkingState>
int MarkingVisitorBase<ConcreteVisitor, MarkingState>::
VisitFixedArrayWithProgressBar(Map map, FixedArray object,
MemoryChunk* chunk) {
// The concurrent marker can process larger chunks than the main thread
// marker.
const int kProgressBarScanningChunk =
RoundUp(kMaxRegularHeapObjectSize, kTaggedSize);
const int kProgressBarScanningChunk = kMaxRegularHeapObjectSize;
STATIC_ASSERT(kMaxRegularHeapObjectSize % kTaggedSize == 0);
DCHECK(concrete_visitor()->marking_state()->IsBlackOrGrey(object));
concrete_visitor()->marking_state()->GreyToBlack(object);
int size = FixedArray::BodyDescriptor::SizeOf(map, 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