| Index: src/heap/heap.cc
|
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc
|
| index afdc7bb4cd397d69625ecdca09c295a668e0a6ae..954a873dd42e8837a890bb1373cf95ce3aa03479 100644
|
| --- a/src/heap/heap.cc
|
| +++ b/src/heap/heap.cc
|
| @@ -387,7 +387,7 @@ void Heap::PrintShortHeapStatistics() {
|
| this->CommittedMemory() / KB);
|
| PrintIsolate(
|
| isolate_, "External memory reported: %6" V8PRIdPTR " KB\n",
|
| - static_cast<intptr_t>(amount_of_external_allocated_memory_ / KB));
|
| + static_cast<intptr_t>(amount_of_external_allocated_memory_.Value() / KB));
|
| PrintIsolate(isolate_, "Total time spent in GC : %.1f ms\n",
|
| total_gc_time_ms_);
|
| }
|
| @@ -1341,7 +1341,7 @@ bool Heap::PerformGarbageCollection(
|
| if (collector == MARK_COMPACTOR) {
|
| // Register the amount of external allocated memory.
|
| amount_of_external_allocated_memory_at_last_global_gc_ =
|
| - amount_of_external_allocated_memory_;
|
| + amount_of_external_allocated_memory_.Value();
|
| SetOldGenerationAllocationLimit(old_gen_size, gc_speed, mutator_speed);
|
| } else if (HasLowYoungGenerationAllocationRate() &&
|
| old_generation_size_configured_) {
|
| @@ -1626,8 +1626,6 @@ void Heap::Scavenge() {
|
|
|
| scavenge_collector_->SelectScavengingVisitorsTable();
|
|
|
| - array_buffer_tracker()->PrepareDiscoveryInNewSpace();
|
| -
|
| // Flip the semispaces. After flipping, to space is empty, from space has
|
| // live objects.
|
| new_space_.Flip();
|
| @@ -1734,7 +1732,7 @@ void Heap::Scavenge() {
|
| // Set age mark.
|
| new_space_.set_age_mark(new_space_.top());
|
|
|
| - array_buffer_tracker()->FreeDead(true);
|
| + array_buffer_tracker()->FreeDeadInNewSpace();
|
|
|
| // Update how much has survived scavenge.
|
| IncrementYoungSurvivorsCounter(static_cast<int>(
|
| @@ -2014,7 +2012,9 @@ HeapObject* Heap::DoubleAlignForDeserialization(HeapObject* object, int size) {
|
|
|
|
|
| void Heap::RegisterNewArrayBuffer(JSArrayBuffer* buffer) {
|
| - return array_buffer_tracker()->RegisterNew(buffer);
|
| + const bool track_live =
|
| + Page::FromAddress(buffer->address())->IsFlagSet(Page::BLACK_PAGE);
|
| + return array_buffer_tracker()->RegisterNew(buffer, track_live);
|
| }
|
|
|
|
|
| @@ -5010,10 +5010,10 @@ intptr_t Heap::PromotedSpaceSizeOfObjects() {
|
|
|
|
|
| int64_t Heap::PromotedExternalMemorySize() {
|
| - if (amount_of_external_allocated_memory_ <=
|
| + if (amount_of_external_allocated_memory_.Value() <=
|
| amount_of_external_allocated_memory_at_last_global_gc_)
|
| return 0;
|
| - return amount_of_external_allocated_memory_ -
|
| + return amount_of_external_allocated_memory_.Value() -
|
| amount_of_external_allocated_memory_at_last_global_gc_;
|
| }
|
|
|
|
|