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

Unified Diff: src/heap.cc

Issue 59383012: Age ICs on context dispose notification. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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/compiler.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 9e877ab1582f08b5f7e3b8b4c9c64a3a44f42ca9..ac0023b60249986e1568740ea42a67ee02ea6a6a 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -753,6 +753,7 @@ int Heap::NotifyContextDisposed() {
isolate()->optimizing_compiler_thread()->Flush();
}
flush_monomorphic_ics_ = true;
+ AgeInlineCaches();
return ++contexts_disposed_;
}
@@ -1150,8 +1151,6 @@ void Heap::MarkCompact(GCTracer* tracer) {
isolate_->counters()->objs_since_last_full()->Set(0);
- contexts_disposed_ = 0;
-
flush_monomorphic_ics_ = false;
}
@@ -5728,12 +5727,7 @@ bool Heap::IdleNotification(int hint) {
size_factor * IncrementalMarking::kAllocatedThreshold;
if (contexts_disposed_ > 0) {
- if (hint >= kMaxHint) {
- // The embedder is requesting a lot of GC work after context disposal,
- // we age inline caches so that they don't keep objects from
- // the old context alive.
- AgeInlineCaches();
- }
+ contexts_disposed_ = 0;
int mark_sweep_time = Min(TimeMarkSweepWouldTakeInMs(), 1000);
if (hint >= mark_sweep_time && !FLAG_expose_gc &&
incremental_marking()->IsStopped()) {
@@ -5742,8 +5736,8 @@ bool Heap::IdleNotification(int hint) {
"idle notification: contexts disposed");
} else {
AdvanceIdleIncrementalMarking(step_size);
- contexts_disposed_ = 0;
}
+
// After context disposal there is likely a lot of garbage remaining, reset
// the idle notification counters in order to trigger more incremental GCs
// on subsequent idle notifications.
« no previous file with comments | « src/compiler.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698