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

Unified Diff: src/heap/heap.cc

Issue 1964023002: [heap] Fine-grained JSArrayBuffer tracking (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: back to std::map Created 4 years, 7 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
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 3ec0a3e229c699fdb50460cdcd0ae70f342f00ba..7dd4bb0bac9ef4e7a588feed50390490e6dce583 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -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();
@@ -1735,7 +1733,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>(
@@ -2015,7 +2013,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);
Hannes Payer (out of office) 2016/05/20 12:21:17 Instead of checking for black page, it would be be
Michael Lippautz 2016/05/23 08:41:00 Done.
+ return array_buffer_tracker()->RegisterNew(buffer, track_live);
}

Powered by Google App Engine
This is Rietveld 408576698