Chromium Code Reviews| 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(); |
| } |