Chromium Code Reviews| Index: src/heap/heap.cc |
| diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
| index 0dae9449a15528875e6d819a8fd8eac8ebed45ea..c81523513e13b061822ff7c3e3d266db56642f28 100644 |
| --- a/src/heap/heap.cc |
| +++ b/src/heap/heap.cc |
| @@ -519,17 +519,19 @@ void Heap::MergeAllocationSitePretenuringFeedback( |
| if (map_word.IsForwardingAddress()) { |
| site = AllocationSite::cast(map_word.ToForwardingAddress()); |
| } |
| - DCHECK(site->IsAllocationSite()); |
| + |
| + // We have not validated the allocation site yet, since we have not |
| + // dereferenced the site during collecting information. |
| + // This is an inlined check of AllocationMemento::IsValid. |
| + if (!site->IsAllocationSite() || site->IsZombie()) continue; |
| + |
| int value = |
| static_cast<int>(reinterpret_cast<intptr_t>(local_entry->value)); |
| DCHECK_GT(value, 0); |
| - { |
| - // TODO(mlippautz): For parallel processing we need synchronization here. |
| - if (site->IncrementMementoFoundCount(value)) { |
| - global_pretenuring_feedback_->LookupOrInsert( |
| - site, static_cast<uint32_t>(bit_cast<uintptr_t>(site))); |
| - } |
| + if (site->IncrementMementoFoundCount(value)) { |
| + global_pretenuring_feedback_->LookupOrInsert( |
| + site, static_cast<uint32_t>(bit_cast<uintptr_t>(site) >> 3)); |
|
Hannes Payer (out of office)
2016/01/20 13:19:39
move that magic here into a function. 3 should be
Michael Lippautz
2016/01/21 10:00:08
Done: Heap::ObjectHash
|
| } |
| } |
| } |