Commit 88b45eef authored by hpayer@chromium.org's avatar hpayer@chromium.org

Just calculate pretenuring ratio when needed.

BUG=
R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/153863005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19144 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 12039c97
......@@ -1551,10 +1551,13 @@ 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;
bool minimum_mementos_created = create_count >= kPretenureMinimumCreated;
double ratio =
minimum_mementos_created || FLAG_trace_pretenuring_statistics ?
static_cast<double>(found_count) / create_count : 0.0;
PretenureFlag current_mode = GetPretenureMode();
if (create_count >= kPretenureMinimumCreated) {
if (minimum_mementos_created) {
PretenureDecision result = ratio >= kPretenureRatio
? kTenure
: kDontTenure;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment