Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 18926bfbb1d57e9e0449ea888be13e4992b7cdb4..a0256fb416429940c41002429ae7731c6024e984 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -1550,14 +1550,11 @@ inline void AllocationSite::IncrementMementoCreateCount() { |
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; |
+ PretenureFlag current_mode = GetPretenureMode(); |
mvstanton
2014/02/06 10:30:42
This is a little more expensive, because we are on
Hannes Payer (out of office)
2014/02/06 10:47:27
I do not think that this is an issue, but we can d
|
+ |
if (create_count >= kPretenureMinimumCreated) { |
- int found_count = memento_found_count(); |
- double ratio = static_cast<double>(found_count) / create_count; |
- if (FLAG_trace_track_allocation_sites) { |
- PrintF("AllocationSite: %p (created, found, ratio) (%d, %d, %f)\n", |
- static_cast<void*>(this), create_count, found_count, ratio); |
- } |
- int current_mode = GetPretenureMode(); |
PretenureDecision result = ratio >= kPretenureRatio |
? kTenure |
: kDontTenure; |
@@ -1570,6 +1567,14 @@ inline bool AllocationSite::DigestPretenuringFeedback() { |
} |
} |
+ if (FLAG_trace_pretenuring_statistics) { |
+ PrintF( |
+ "AllocationSite(%p): (created, found, ratio) (%d, %d, %f) %s => %s\n", |
+ static_cast<void*>(this), create_count, found_count, ratio, |
+ current_mode == TENURED ? "tenured" : "not tenured", |
+ GetPretenureMode() == TENURED ? "tenured" : "not tenured"); |
+ } |
+ |
mvstanton
2014/02/06 10:30:42
Why drive a VW when you can have a Cadillac? Can t
Hannes Payer (out of office)
2014/02/06 10:47:27
We do exactly that in old state => new state.
|
// Clear feedback calculation fields until the next gc. |
set_memento_found_count(0); |
set_memento_create_count(0); |