Chromium Code Reviews

Unified Diff: src/heap.cc

Issue 155764: Heap profiling: add logging of heap memory stats (capacity, used) under 'log-gc' flag. (Closed)
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | src/log.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
diff --git a/src/heap.cc b/src/heap.cc
index 9f5d30385bd701596c5c5e4d7147cb722e1121b4..cad175587fc1870e97c680d1297a4adc23925633 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -3406,6 +3406,8 @@ void HeapProfiler::CollectStats(HeapObject* obj, HistogramInfo* info) {
#ifdef ENABLE_LOGGING_AND_PROFILING
void HeapProfiler::WriteSample() {
LOG(HeapSampleBeginEvent("Heap", "allocated"));
+ LOG(HeapSampleStats(
+ "Heap", "allocated", Heap::Capacity(), Heap::SizeOfObjects()));
HistogramInfo info[LAST_TYPE+1];
#define DEF_TYPE_NAME(name) info[name].set_name(#name);
« no previous file with comments | « no previous file | src/log.h » ('j') | no next file with comments »

Powered by Google App Engine