 Chromium Code Reviews
 Chromium Code Reviews Issue 25655004:
  Print out how many AllocationMementos were found during mark-sweep.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 25655004:
  Print out how many AllocationMementos were found during mark-sweep.  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| Index: src/mark-compact.cc | 
| diff --git a/src/mark-compact.cc b/src/mark-compact.cc | 
| index 31ad1bacfb0f6eb72b8688de5b488bef3f9bea03..cff5c4fd9e73fe4fee1694c4dca9a718a1222f52 100644 | 
| --- a/src/mark-compact.cc | 
| +++ b/src/mark-compact.cc | 
| @@ -407,6 +407,8 @@ void MarkCompactCollector::CollectGarbage() { | 
| ASSERT(state_ == PREPARE_GC); | 
| ASSERT(encountered_weak_collections_ == Smi::FromInt(0)); | 
| + heap()->allocation_mementos_found_ = 0; | 
| + | 
| MarkLiveObjects(); | 
| ASSERT(heap_->incremental_marking()->IsStopped()); | 
| @@ -449,6 +451,11 @@ void MarkCompactCollector::CollectGarbage() { | 
| marking_parity_ = EVEN_MARKING_PARITY; | 
| } | 
| + if (FLAG_trace_track_allocation_sites && | 
| + heap()->allocation_mementos_found_ > 0) { | 
| + PrintF("AllocationMementos found during mark-sweep = %d\n", | 
| + heap()->allocation_mementos_found_); | 
| + } | 
| tracer_ = NULL; | 
| } | 
| @@ -2002,6 +2009,15 @@ int MarkCompactCollector::DiscoverAndPromoteBlackObjectsOnPage( | 
| int size = object->Size(); | 
| survivors_size += size; | 
| + if (FLAG_trace_track_allocation_sites && | 
| + AllocationSite::CanTrack(object->map()->instance_type()) && | 
| 
mvstanton
2013/10/02 10:56:45
The CanTrack might be redundant because by offerin
 
Hannes Payer (out of office)
2013/10/02 11:02:19
Done.
 | 
| + object->IsJSObject()) { | 
| + if (AllocationMemento::FindForJSObject(JSObject::cast(object), true) | 
| + != NULL) { | 
| + heap()->allocation_mementos_found_++; | 
| + } | 
| + } | 
| + | 
| offset++; | 
| current_cell >>= 1; | 
| // Aggressively promote young survivors to the old space. |