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

Unified Diff: src/heap/heap.cc

Issue 890613002: Introduce ProcessYoungWeakReferences and process weak list of allocation sites just during full GCs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 147d5ddff02578e3fa82428f3672fac83a900712..c76f691f0d22369501cb5b177bd7519097126b04 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -1597,7 +1597,7 @@ void Heap::Scavenge() {
incremental_marking()->UpdateMarkingDequeAfterScavenge();
ScavengeWeakObjectRetainer weak_object_retainer(this);
- ProcessWeakReferences(&weak_object_retainer);
+ ProcessYoungWeakReferences(&weak_object_retainer);
DCHECK(new_space_front == new_space_.top());
@@ -1684,11 +1684,9 @@ void Heap::UpdateReferencesInExternalStringTable(
}
-void Heap::ProcessWeakReferences(WeakObjectRetainer* retainer) {
+void Heap::ProcessAllWeakReferences(WeakObjectRetainer* retainer) {
ProcessArrayBuffers(retainer);
ProcessNativeContexts(retainer);
- // TODO(mvstanton): AllocationSites only need to be processed during
- // MARK_COMPACT, as they live in old space. Verify and address.
ProcessAllocationSites(retainer);
// Collects callback info for handles that are pending (about to be
// collected) and either phantom or internal-fields. Releases the global
@@ -1697,6 +1695,16 @@ void Heap::ProcessWeakReferences(WeakObjectRetainer* retainer) {
}
+void Heap::ProcessYoungWeakReferences(WeakObjectRetainer* retainer) {
+ ProcessArrayBuffers(retainer);
+ ProcessNativeContexts(retainer);
+ // Collects callback info for handles that are pending (about to be
+ // collected) and either phantom or internal-fields. Releases the global
+ // handles. See also PostGarbageCollectionProcessing.
+ isolate()->global_handles()->CollectPhantomCallbackData();
+}
+
+
void Heap::ProcessNativeContexts(WeakObjectRetainer* retainer) {
Object* head = VisitWeakList<Context>(this, native_contexts_list(), retainer);
// Update the head of the list of contexts.
« 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