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

Unified Diff: src/objects-inl.h

Issue 1535723002: [heap] Use HashMap as scratchpad backing store (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Revive the founder counter on the AllocationSite Created 4 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/objects.h ('k') | tools/v8heapconst.py » ('j') | 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 3d4a3d4b0522d3eca4022b5c4539825ec50a90f7..6ea9307ceb7d4ac0a8ab3edab3875ab5ce47fca3 100644
--- a/src/objects-inl.h
+++ b/src/objects-inl.h
@@ -1773,12 +1773,12 @@ void AllocationSite::set_memento_create_count(int count) {
}
-inline bool AllocationSite::IncrementMementoFoundCount() {
+bool AllocationSite::IncrementMementoFoundCount(int increment) {
if (IsZombie()) return false;
int value = memento_found_count();
- set_memento_found_count(value + 1);
- return memento_found_count() == kPretenureMinimumCreated;
+ set_memento_found_count(value + increment);
+ return memento_found_count() >= kPretenureMinimumCreated;
}
@@ -1832,11 +1832,12 @@ 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,
- PretenureDecisionName(current_decision),
- PretenureDecisionName(pretenure_decision()));
+ PrintIsolate(GetIsolate(),
+ "pretenuring: AllocationSite(%p): (created, found, ratio) "
+ "(%d, %d, %f) %s => %s\n",
+ this, create_count, found_count, ratio,
+ PretenureDecisionName(current_decision),
+ PretenureDecisionName(pretenure_decision()));
}
// Clear feedback calculation fields until the next gc.
« no previous file with comments | « src/objects.h ('k') | tools/v8heapconst.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698