Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(480)

Unified Diff: src/heap/spaces.cc

Issue 2210263002: [heap] Improve size profiling for ArrayBuffer tracking (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/mark-compact.cc ('k') | test/cctest/heap/test-array-buffer-tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.cc
diff --git a/src/heap/spaces.cc b/src/heap/spaces.cc
index b31aaf3998fd98a370b3a329dcfb992c12f9e112..2bfb1f251f0ecda12769bf689f94864b44563d71 100644
--- a/src/heap/spaces.cc
+++ b/src/heap/spaces.cc
@@ -1105,7 +1105,7 @@ bool PagedSpace::HasBeenSetUp() { return true; }
void PagedSpace::TearDown() {
for (auto it = begin(); it != end();) {
Page* page = *(it++); // Will be erased.
- ArrayBufferTracker::FreeAll(page);
+ heap()->array_buffer_tracker()->FreeAll(page);
heap()->memory_allocator()->Free<MemoryAllocator::kFull>(page);
}
anchor_.set_next_page(&anchor_);
@@ -1593,6 +1593,8 @@ void NewSpace::UpdateInlineAllocationLimit(int size_in_bytes) {
bool NewSpace::AddFreshPage() {
+ if (heap()->ShouldDoScavengeForReducingExternalMemory()) return false;
+
Address top = allocation_info_.top();
DCHECK(!Page::IsAtObjectStart(top));
if (!to_space_.AdvancePage()) {
@@ -1785,7 +1787,7 @@ void SemiSpace::TearDown() {
// Properly uncommit memory to keep the allocator counters in sync.
if (is_committed()) {
for (Page* p : *this) {
- ArrayBufferTracker::FreeAll(p);
+ heap()->array_buffer_tracker()->FreeAll(p);
}
Uncommit();
}
« no previous file with comments | « src/heap/mark-compact.cc ('k') | test/cctest/heap/test-array-buffer-tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698