diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-11-23 15:05:51 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-11-23 15:31:48 +0000 |
commit | 9cb87fa7638e305ef35b04f54ba07ac4fa04adcb (patch) | |
tree | 2793d80883b7daab67258117755046d428f9978c /chromium/v8/src/heap | |
parent | 98ff39cb35ef2bd32bb1af9565628a4a4b0979b2 (diff) | |
download | qtwebengine-chromium-9cb87fa7638e305ef35b04f54ba07ac4fa04adcb.tar.gz |
BASELINE: Update Chromium to 47.0.2526.71
Also adds a few missing spellcheck sources.
Change-Id: I300864710316ff3cd3ad456dd7a3d048b45f57d5
Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'chromium/v8/src/heap')
-rw-r--r-- | chromium/v8/src/heap/gc-idle-time-handler.cc | 6 | ||||
-rw-r--r-- | chromium/v8/src/heap/gc-idle-time-handler.h | 6 | ||||
-rw-r--r-- | chromium/v8/src/heap/heap.cc | 3 | ||||
-rw-r--r-- | chromium/v8/src/heap/mark-compact.cc | 6 | ||||
-rw-r--r-- | chromium/v8/src/heap/spaces.h | 31 |
5 files changed, 33 insertions, 19 deletions
diff --git a/chromium/v8/src/heap/gc-idle-time-handler.cc b/chromium/v8/src/heap/gc-idle-time-handler.cc index f77c015bf5b..e1f9ef43e72 100644 --- a/chromium/v8/src/heap/gc-idle-time-handler.cc +++ b/chromium/v8/src/heap/gc-idle-time-handler.cc @@ -44,12 +44,6 @@ void GCIdleTimeHeapState::Print() { PrintF("contexts_disposal_rate=%f ", contexts_disposal_rate); PrintF("size_of_objects=%" V8_PTR_PREFIX "d ", size_of_objects); PrintF("incremental_marking_stopped=%d ", incremental_marking_stopped); - PrintF("sweeping_in_progress=%d ", sweeping_in_progress); - PrintF("has_low_allocation_rate=%d", has_low_allocation_rate); - PrintF("mark_compact_speed=%" V8_PTR_PREFIX "d ", - mark_compact_speed_in_bytes_per_ms); - PrintF("incremental_marking_speed=%" V8_PTR_PREFIX "d ", - incremental_marking_speed_in_bytes_per_ms); } diff --git a/chromium/v8/src/heap/gc-idle-time-handler.h b/chromium/v8/src/heap/gc-idle-time-handler.h index 36acdd8531f..74ef1b1e877 100644 --- a/chromium/v8/src/heap/gc-idle-time-handler.h +++ b/chromium/v8/src/heap/gc-idle-time-handler.h @@ -63,12 +63,6 @@ class GCIdleTimeHeapState { double contexts_disposal_rate; size_t size_of_objects; bool incremental_marking_stopped; - bool sweeping_in_progress; - bool sweeping_completed; - bool has_low_allocation_rate; - size_t mark_compact_speed_in_bytes_per_ms; - size_t incremental_marking_speed_in_bytes_per_ms; - size_t final_incremental_mark_compact_speed_in_bytes_per_ms; }; diff --git a/chromium/v8/src/heap/heap.cc b/chromium/v8/src/heap/heap.cc index 2b072f30214..e04f99ff7ee 100644 --- a/chromium/v8/src/heap/heap.cc +++ b/chromium/v8/src/heap/heap.cc @@ -4077,9 +4077,8 @@ GCIdleTimeHeapState Heap::ComputeHeapState() { heap_state.contexts_disposed = contexts_disposed_; heap_state.contexts_disposal_rate = tracer()->ContextDisposalRateInMilliseconds(); + heap_state.size_of_objects = static_cast<size_t>(SizeOfObjects()); heap_state.incremental_marking_stopped = incremental_marking()->IsStopped(); - heap_state.mark_compact_speed_in_bytes_per_ms = - static_cast<size_t>(tracer()->MarkCompactSpeedInBytesPerMillisecond()); return heap_state; } diff --git a/chromium/v8/src/heap/mark-compact.cc b/chromium/v8/src/heap/mark-compact.cc index a23e24d2553..9e317e7d082 100644 --- a/chromium/v8/src/heap/mark-compact.cc +++ b/chromium/v8/src/heap/mark-compact.cc @@ -3354,6 +3354,12 @@ bool MarkCompactCollector::EvacuateLiveObjectsFromPage( HeapObject* target_object = nullptr; AllocationResult allocation = target_space->AllocateRaw(size, alignment); if (!allocation.To(&target_object)) { + // We need to abort compaction for this page. Make sure that we reset + // the mark bits for objects that have already been migrated. + if (i > 0) { + p->markbits()->ClearRange(p->AddressToMarkbitIndex(p->area_start()), + p->AddressToMarkbitIndex(object_addr)); + } return false; } diff --git a/chromium/v8/src/heap/spaces.h b/chromium/v8/src/heap/spaces.h index 222380856bf..95e3b7c6023 100644 --- a/chromium/v8/src/heap/spaces.h +++ b/chromium/v8/src/heap/spaces.h @@ -36,7 +36,7 @@ class Isolate; // area. // // There is a separate large object space for objects larger than -// Page::kMaxHeapObjectSize, so that they do not have to move during +// Page::kMaxRegularHeapObjectSize, so that they do not have to move during // collection. The large object space is paged. Pages in large object space // may be larger than the page size. // @@ -165,6 +165,10 @@ class Bitmap { return index >> kBitsPerCellLog2; } + V8_INLINE static uint32_t IndexInCell(uint32_t index) { + return index & kBitIndexMask; + } + INLINE(static uint32_t CellToIndex(uint32_t index)) { return index << kBitsPerCellLog2; } @@ -184,7 +188,7 @@ class Bitmap { } inline MarkBit MarkBitFromIndex(uint32_t index) { - MarkBit::CellType mask = 1 << (index & kBitIndexMask); + MarkBit::CellType mask = 1u << IndexInCell(index); MarkBit::CellType* cell = this->cells() + (index >> kBitsPerCellLog2); return MarkBit(cell, mask); } @@ -256,6 +260,23 @@ class Bitmap { } return true; } + + // Clears all bits starting from {cell_base_index} up to and excluding + // {index}. Note that {cell_base_index} is required to be cell aligned. + void ClearRange(uint32_t cell_base_index, uint32_t index) { + DCHECK_EQ(IndexInCell(cell_base_index), 0); + DCHECK_GE(index, cell_base_index); + uint32_t start_cell_index = IndexToCell(cell_base_index); + uint32_t end_cell_index = IndexToCell(index); + DCHECK_GE(end_cell_index, start_cell_index); + // Clear all cells till the cell containing the last index. + for (uint32_t i = start_cell_index; i < end_cell_index; i++) { + cells()[i] = 0; + } + // Clear all bits in the last cell till the last bit before index. + uint32_t clear_mask = ~((1u << IndexInCell(index)) - 1); + cells()[end_cell_index] &= clear_mask; + } }; @@ -2834,9 +2855,9 @@ class MapSpace : public PagedSpace { // ----------------------------------------------------------------------------- -// Large objects ( > Page::kMaxHeapObjectSize ) are allocated and managed by -// the large object space. A large object is allocated from OS heap with -// extra padding bytes (Page::kPageSize + Page::kObjectStartOffset). +// Large objects ( > Page::kMaxRegularHeapObjectSize ) are allocated and +// managed by the large object space. A large object is allocated from OS +// heap with extra padding bytes (Page::kPageSize + Page::kObjectStartOffset). // A large object always starts at Page::kObjectStartOffset to a page. // Large objects do not move during garbage collections. |