Commit 5a1364a5 authored by hpayer@chromium.org's avatar hpayer@chromium.org

Deopt maybe tenure allocation sites when semi-space is maximum size.

BUG=
R=mvstanton@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21635 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d19aaa2b
......@@ -497,10 +497,10 @@ void Heap::ProcessPretenuringFeedback() {
// we grew to the maximum semi-space size to deopt maybe tenured
// allocation sites. We could hold the maybe tenured allocation sites
// in a seperate data structure if this is a performance problem.
bool deopt_maybe_tenured = DeoptMaybeTenuredAllocationSites();
bool use_scratchpad =
allocation_sites_scratchpad_length_ < kAllocationSiteScratchpadSize &&
new_space_.IsAtMaximumCapacity() &&
maximum_size_scavenges_ == 0;
allocation_sites_scratchpad_length_ < kAllocationSiteScratchpadSize &&
!deopt_maybe_tenured;
int i = 0;
Object* list_element = allocation_sites_list();
......@@ -526,6 +526,11 @@ void Heap::ProcessPretenuringFeedback() {
allocation_sites++;
}
if (deopt_maybe_tenured && site->IsMaybeTenure()) {
site->set_deopt_dependent_code(true);
trigger_deoptimization = true;
}
if (use_scratchpad) {
i++;
} else {
......
......@@ -1363,6 +1363,10 @@ class Heap {
return maximum_size_scavenges_ > 0;
}
bool DeoptMaybeTenuredAllocationSites() {
return new_space_.IsAtMaximumCapacity() && maximum_size_scavenges_ == 0;
}
// ObjectStats are kept in two arrays, counts and sizes. Related stats are
// stored in a contiguous linear buffer. Stats groups are stored one after
// another.
......
......@@ -8503,6 +8503,10 @@ class AllocationSite: public Struct {
return pretenure_decision() == kZombie;
}
bool IsMaybeTenure() {
return pretenure_decision() == kMaybeTenure;
}
inline void MarkZombie();
inline bool MakePretenureDecision(PretenureDecision current_decision,
......
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