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

Unified Diff: src/heap-inl.h

Issue 96783002: Allocation site pretenuring. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/heap.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-inl.h
diff --git a/src/heap-inl.h b/src/heap-inl.h
index 3dce348727477c260c894f3710956e4fe0e2ce8f..5e6fb2b0ab1ca2ac6c21f759e64c3600ec482f32 100644
--- a/src/heap-inl.h
+++ b/src/heap-inl.h
@@ -484,15 +484,16 @@ void Heap::ScavengePointer(HeapObject** p) {
void Heap::UpdateAllocationSiteFeedback(HeapObject* object) {
+ Heap* heap = object->GetHeap();
if (FLAG_allocation_site_pretenuring &&
+ heap->new_space_high_promotion_mode_active_ &&
AllocationSite::CanTrack(object->map()->instance_type())) {
AllocationMemento* memento = AllocationMemento::FindForHeapObject(
- object, true);
+ object, heap, true);
if (memento != NULL) {
ASSERT(memento->IsValid());
bool add_to_scratchpad =
memento->GetAllocationSite()->IncrementMementoFoundCount();
- Heap* heap = object->GetIsolate()->heap();
if (add_to_scratchpad && heap->allocation_sites_scratchpad_length <
kAllocationSiteScratchpadSize) {
heap->allocation_sites_scratchpad[
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698