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

Unified Diff: src/mark-compact.cc

Issue 25655004: Print out how many AllocationMementos were found during mark-sweep. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 2 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
« src/heap-inl.h ('K') | « src/heap-inl.h ('k') | src/objects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« src/heap-inl.h ('K') | « src/heap-inl.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698