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

Unified Diff: src/v8-counters.h

Issue 10854043: Add histograms for total allocated/live heap size, as well as allocated size and percentage of tota… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 8 years, 4 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/v8-counters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/v8-counters.h
diff --git a/src/v8-counters.h b/src/v8-counters.h
index 4a5755c3e6bd1c03e3b22bec6c2b20702de5b08e..fad3454812377a159733766f87f49a930e362e5d 100644
--- a/src/v8-counters.h
+++ b/src/v8-counters.h
@@ -65,7 +65,20 @@ namespace internal {
HP(external_fragmentation_cell_space, \
V8.MemoryExternalFragmentationCellSpace) \
HP(external_fragmentation_lo_space, \
- V8.MemoryExternalFragmentationLoSpace)
+ V8.MemoryExternalFragmentationLoSpace) \
+ HP(heap_fraction_map_space, \
+ V8.MemoryHeapFractionMapSpace) \
+ HP(heap_fraction_cell_space, \
+ V8.MemoryHeapFractionCellSpace) \
+
+
+#define HISTOGRAM_MEMORY_LIST(HM) \
+ HM(heap_sample_total_committed, V8.MemoryHeapSampleTotalCommitted) \
+ HM(heap_sample_total_used, V8.MemoryHeapSampleTotalUsed) \
+ HM(heap_sample_map_space_committed, \
+ V8.MemoryHeapSampleMapSpaceCommitted) \
+ HM(heap_sample_cell_space_committed, \
+ V8.MemoryHeapSampleCellSpaceCommitted)
// WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC
@@ -303,6 +316,11 @@ class Counters {
HISTOGRAM_PERCENTAGE_LIST(HP)
#undef HP
+#define HM(name, caption) \
+ Histogram* name() { return &name##_; }
+ HISTOGRAM_MEMORY_LIST(HM)
+#undef HM
+
#define SC(name, caption) \
StatsCounter* name() { return &name##_; }
STATS_COUNTER_LIST_1(SC)
@@ -338,6 +356,9 @@ class Counters {
#define PERCENTAGE_ID(name, caption) k_##name,
HISTOGRAM_PERCENTAGE_LIST(PERCENTAGE_ID)
#undef PERCENTAGE_ID
+#define MEMORY_ID(name, caption) k_##name,
+ HISTOGRAM_MEMORY_LIST(MEMORY_ID)
+#undef MEMORY_ID
#define COUNTER_ID(name, caption) k_##name,
STATS_COUNTER_LIST_1(COUNTER_ID)
STATS_COUNTER_LIST_2(COUNTER_ID)
@@ -376,6 +397,11 @@ class Counters {
HISTOGRAM_PERCENTAGE_LIST(HP)
#undef HP
+#define HM(name, caption) \
+ Histogram name##_;
+ HISTOGRAM_MEMORY_LIST(HM)
+#undef HM
+
#define SC(name, caption) \
StatsCounter name##_;
STATS_COUNTER_LIST_1(SC)
« no previous file with comments | « src/heap.cc ('k') | src/v8-counters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698