 Chromium Code Reviews
 Chromium Code Reviews 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
    
  
    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| Index: src/heap.cc | 
| diff --git a/src/heap.cc b/src/heap.cc | 
| index 48cf266826dd53b6dae18a328a1959c206c12eb7..ff5328fd99bbd8ce56cbcad319b4afe245b0ec49 100644 | 
| --- a/src/heap.cc | 
| +++ b/src/heap.cc | 
| @@ -453,6 +453,20 @@ void Heap::GarbageCollectionEpilogue() { | 
| if (CommittedMemory() > 0) { | 
| isolate_->counters()->external_fragmentation_total()->AddSample( | 
| static_cast<int>(100 - (SizeOfObjects() * 100.0) / CommittedMemory())); | 
| + | 
| + isolate_->counters()->map_space_fraction_of_total()->AddSample( | 
| + static_cast<int>( | 
| + (map_space()->CommittedMemory() * 100.0) / CommittedMemory())); | 
| + isolate_->counters()->cell_space_fraction_of_total()->AddSample( | 
| + static_cast<int>( | 
| + (cell_space()->CommittedMemory() * 100.0) / CommittedMemory())); | 
| + | 
| + isolate_->counters()->total_heap_size()->AddSample(CommittedMemory() / KB); | 
| 
Michael Starzinger
2012/08/08 18:44:36
It doesn't make much of a difference, but we could
 
jochen (gone - plz use gerrit)
2012/08/09 13:31:29
We'd just keep adding 0 samples (probably during s
 | 
| + isolate_->counters()->live_heap_size()->AddSample(SizeOfObjects() / KB); | 
| + isolate_->counters()->total_map_space_size()->AddSample( | 
| + map_space()->CommittedMemory() / KB); | 
| + isolate_->counters()->total_cell_space_size()->AddSample( | 
| + cell_space()->CommittedMemory() / KB); | 
| } | 
| #define UPDATE_COUNTERS_FOR_SPACE(space) \ |