Revision: 12269
Author: [email protected]
Date: Tue Aug 7 07:17:35 2012
Log: Add flag to trace the amount of external memory.
[email protected]
Review URL: https://chromiumcodereview.appspot.com/10824196
http://code.google.com/p/v8/source/detail?r=12269
Modified:
/branches/bleeding_edge/src/flag-definitions.h
/branches/bleeding_edge/src/heap-inl.h
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Tue Aug 7 01:19:11 2012
+++ /branches/bleeding_edge/src/flag-definitions.h Tue Aug 7 07:17:35 2012
@@ -370,6 +370,9 @@
"print more details following each garbage collection")
DEFINE_bool(trace_fragmentation, false,
"report fragmentation for old pointer and data pages")
+DEFINE_bool(trace_external_memory, false,
+ "print amount of external allocated memory after each time "
+ "it is adjusted.")
DEFINE_bool(collect_maps, true,
"garbage collect maps from which no objects can be reached")
DEFINE_bool(flush_code, true,
=======================================
--- /branches/bleeding_edge/src/heap-inl.h Mon Aug 6 06:49:13 2012
+++ /branches/bleeding_edge/src/heap-inl.h Tue Aug 7 07:17:35 2012
@@ -487,6 +487,13 @@
amount_of_external_allocated_memory_at_last_global_gc_ = 0;
}
}
+ if (FLAG_trace_external_memory) {
+ PrintPID("%8.0f ms: ", isolate()->time_millis_since_init());
+ PrintF("Adjust amount of external memory: delta=%6" V8_PTR_PREFIX "d
KB, "
+ " amount=%6" V8_PTR_PREFIX "d KB, isolate=0x%08"
V8PRIxPTR ".\n",
+ change_in_bytes / 1024, amount_of_external_allocated_memory_ /
1024,
+ reinterpret_cast<intptr_t>(isolate()));
+ }
ASSERT(amount_of_external_allocated_memory_ >= 0);
return amount_of_external_allocated_memory_;
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev