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

Unified Diff: src/heap.cc

Issue 138033012: Deopt marked code at safe deoptimization point when pretenuring. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/execution.cc ('k') | src/objects-inl.h » ('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 cc9c688e88f1f4e194d033d7881838ca6ce08ba0..ea3cef8c4a5983bea9166278c82662cf95cfd724 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -521,6 +521,7 @@ void Heap::ProcessPretenuringFeedback() {
int i = 0;
Object* list_element = allocation_sites_list();
+ bool trigger_deoptimization = false;
while (use_scratchpad ?
i < allocation_sites_scratchpad_length :
list_element->IsAllocationSite()) {
@@ -530,12 +531,11 @@ void Heap::ProcessPretenuringFeedback() {
if (site->memento_found_count() > 0) {
active_allocation_sites++;
}
- if (site->DigestPretenuringFeedback()) {
- if (site->GetPretenureMode() == TENURED) {
- tenure_decisions++;
- } else {
- dont_tenure_decisions++;
- }
+ if (site->DigestPretenuringFeedback()) trigger_deoptimization = true;
+ if (site->GetPretenureMode() == TENURED) {
Benedikt Meurer 2014/01/16 11:19:37 Shouldn't this if still depend on the previous one
Hannes Payer (out of office) 2014/01/16 11:41:20 The semantics of DigestPretenuringFeedback changed
+ tenure_decisions++;
+ } else {
+ dont_tenure_decisions++;
}
allocation_sites++;
if (use_scratchpad) {
@@ -544,6 +544,9 @@ void Heap::ProcessPretenuringFeedback() {
list_element = site->weak_next();
}
}
+
+ if (trigger_deoptimization) isolate_->stack_guard()->DeoptMarkedCode();
+
allocation_sites_scratchpad_length = 0;
// TODO(mvstanton): Pretenure decisions are only made once for an allocation
@@ -1998,7 +2001,7 @@ void Heap::ResetAllAllocationSitesDependentCode(PretenureFlag flag) {
}
cur = casted->weak_next();
}
- if (marked) Deoptimizer::DeoptimizeMarkedCode(isolate_);
+ if (marked) isolate_->stack_guard()->DeoptMarkedCode();
}
« no previous file with comments | « src/execution.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698