Chromium Code Reviews| Index: src/objects-inl.h |
| diff --git a/src/objects-inl.h b/src/objects-inl.h |
| index a0256fb416429940c41002429ae7731c6024e984..320bdf3e5f99477a196ff6bc71d5cf98ca114631 100644 |
| --- a/src/objects-inl.h |
| +++ b/src/objects-inl.h |
| @@ -1551,10 +1551,11 @@ inline bool AllocationSite::DigestPretenuringFeedback() { |
| bool decision_changed = false; |
| int create_count = memento_create_count(); |
| int found_count = memento_found_count(); |
| - double ratio = static_cast<double>(found_count) / create_count; |
| + double ratio = 0.0; |
| PretenureFlag current_mode = GetPretenureMode(); |
| if (create_count >= kPretenureMinimumCreated) { |
| + ratio = static_cast<double>(found_count) / create_count; |
|
mvstanton
2014/02/06 11:23:33
Per our chat, something like:
bool minimum_met =
Hannes Payer (out of office)
2014/02/06 11:26:53
Done.
|
| PretenureDecision result = ratio >= kPretenureRatio |
| ? kTenure |
| : kDontTenure; |
| @@ -1568,6 +1569,7 @@ inline bool AllocationSite::DigestPretenuringFeedback() { |
| } |
| if (FLAG_trace_pretenuring_statistics) { |
| + ratio = static_cast<double>(found_count) / create_count; |
| PrintF( |
| "AllocationSite(%p): (created, found, ratio) (%d, %d, %f) %s => %s\n", |
| static_cast<void*>(this), create_count, found_count, ratio, |