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

Unified Diff: src/heap/heap.cc

Issue 2036643002: Reland "[heap] Fine-grained JSArrayBuffer tracking" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove unneeded locking to avoid lock-inversion-order errors in TSAN Created 4 years, 6 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/heap.h ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index c75094d9cfc70f8b3322b1766123d2039ffea4fe..f830b4dd1bcfaf26a5a743a250f9bdef2ed3c522 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -160,7 +160,6 @@ Heap::Heap()
gc_callbacks_depth_(0),
deserialization_complete_(false),
strong_roots_list_(NULL),
- array_buffer_tracker_(NULL),
heap_iterator_depth_(0),
force_oom_(false) {
// Allow build-time customization of the max semispace size. Building
@@ -1635,8 +1634,6 @@ void Heap::Scavenge() {
mark_compact_collector()->RegisterWrappersWithEmbedderHeapTracer();
}
- array_buffer_tracker()->PrepareDiscoveryInNewSpace();
-
// Flip the semispaces. After flipping, to space is empty, from space has
// live objects.
new_space_.Flip();
@@ -1761,7 +1758,7 @@ void Heap::Scavenge() {
// Set age mark.
new_space_.set_age_mark(new_space_.top());
- array_buffer_tracker()->FreeDead(true);
+ ArrayBufferTracker::FreeDeadInNewSpace(this);
// Update how much has survived scavenge.
IncrementYoungSurvivorsCounter(static_cast<int>(
@@ -2047,12 +2044,12 @@ HeapObject* Heap::DoubleAlignForDeserialization(HeapObject* object, int size) {
void Heap::RegisterNewArrayBuffer(JSArrayBuffer* buffer) {
- return array_buffer_tracker()->RegisterNew(buffer);
+ ArrayBufferTracker::RegisterNew(this, buffer);
}
void Heap::UnregisterArrayBuffer(JSArrayBuffer* buffer) {
- return array_buffer_tracker()->Unregister(buffer);
+ ArrayBufferTracker::Unregister(this, buffer);
}
@@ -5348,8 +5345,6 @@ bool Heap::SetUp() {
scavenge_job_ = new ScavengeJob();
- array_buffer_tracker_ = new ArrayBufferTracker(this);
-
LOG(isolate_, IntPtrTEvent("heap-capacity", Capacity()));
LOG(isolate_, IntPtrTEvent("heap-available", Available()));
@@ -5509,9 +5504,6 @@ void Heap::TearDown() {
delete scavenge_job_;
scavenge_job_ = nullptr;
- delete array_buffer_tracker_;
- array_buffer_tracker_ = nullptr;
-
isolate_->global_handles()->TearDown();
external_string_table_.TearDown();
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698