Chromium Code Reviews| Index: src/v8-counters.h |
| diff --git a/src/v8-counters.h b/src/v8-counters.h |
| index 4a5755c3e6bd1c03e3b22bec6c2b20702de5b08e..0b97855df554d003096589f5802a77d1c881c833 100644 |
| --- a/src/v8-counters.h |
| +++ b/src/v8-counters.h |
| @@ -65,7 +65,18 @@ namespace internal { |
| HP(external_fragmentation_cell_space, \ |
| V8.MemoryExternalFragmentationCellSpace) \ |
| HP(external_fragmentation_lo_space, \ |
| - V8.MemoryExternalFragmentationLoSpace) |
| + V8.MemoryExternalFragmentationLoSpace) \ |
| + HP(map_space_fraction_of_total, \ |
| + V8.MemoryFractionMapSpace) \ |
| + HP(cell_space_fraction_of_total, \ |
| + V8.MemoryFractionCellSpace) \ |
| + |
| + |
| +#define HISTOGRAM_MEMORY_LIST(HM) \ |
| + HM(total_heap_size, V8.MemoryHeapSizeTotal) \ |
| + HM(live_heap_size, V8.MemoryHeapSizeLive) \ |
| + HM(total_map_space_size, V8.MemoryMapSpaceSize) \ |
| + HM(total_cell_space_size, V8.MemoryCellSpaceSize) |
|
Michael Starzinger
2012/08/08 18:44:36
We should start using consistent names for the hea
jochen (gone - plz use gerrit)
2012/08/09 13:31:29
Done.
|
| // WARNING: STATS_COUNTER_LIST_* is a very large macro that is causing MSVC |
| @@ -303,6 +314,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 +354,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 +395,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) |