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

Unified Diff: src/objects-inl.h

Issue 153273003: Cleanup allocation site pretenuring tracing, added new flag --trace-pretenuring-statistics. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/heap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698