Chromium Code Reviews| Index: src/heap.cc |
| diff --git a/src/heap.cc b/src/heap.cc |
| index 7d655b4c35a2f6de9987c5645d5c20de6d0dfff0..1614b6cbc407d9e8ae377c25c27e918fa647a3af 100644 |
| --- a/src/heap.cc |
| +++ b/src/heap.cc |
| @@ -445,54 +445,54 @@ void Heap::GarbageCollectionEpilogue() { |
| isolate_->counters()->number_of_symbols()->Set( |
| symbol_table()->NumberOfElements()); |
| - isolate_->counters()->new_space_bytes_available()->Set( |
| - static_cast<int>(new_space()->Available())); |
| - isolate_->counters()->new_space_bytes_committed()->Set( |
| - static_cast<int>(new_space()->CommittedMemory())); |
| - isolate_->counters()->new_space_bytes_used()->Set( |
| - static_cast<int>(new_space()->SizeOfObjects())); |
| - |
| - isolate_->counters()->old_pointer_space_bytes_available()->Set( |
| - static_cast<int>(old_pointer_space()->Available())); |
| - isolate_->counters()->old_pointer_space_bytes_committed()->Set( |
| - static_cast<int>(old_pointer_space()->CommittedMemory())); |
| - isolate_->counters()->old_pointer_space_bytes_used()->Set( |
| - static_cast<int>(old_pointer_space()->SizeOfObjects())); |
| - |
| - isolate_->counters()->old_data_space_bytes_available()->Set( |
| - static_cast<int>(old_data_space()->Available())); |
| - isolate_->counters()->old_data_space_bytes_committed()->Set( |
| - static_cast<int>(old_data_space()->CommittedMemory())); |
| - isolate_->counters()->old_data_space_bytes_used()->Set( |
| - static_cast<int>(old_data_space()->SizeOfObjects())); |
| - |
| - isolate_->counters()->code_space_bytes_available()->Set( |
| - static_cast<int>(code_space()->Available())); |
| - isolate_->counters()->code_space_bytes_committed()->Set( |
| - static_cast<int>(code_space()->CommittedMemory())); |
| - isolate_->counters()->code_space_bytes_used()->Set( |
| - static_cast<int>(code_space()->SizeOfObjects())); |
| - |
| - isolate_->counters()->map_space_bytes_available()->Set( |
| - static_cast<int>(map_space()->Available())); |
| - isolate_->counters()->map_space_bytes_committed()->Set( |
| - static_cast<int>(map_space()->CommittedMemory())); |
| - isolate_->counters()->map_space_bytes_used()->Set( |
| - static_cast<int>(map_space()->SizeOfObjects())); |
| - |
| - isolate_->counters()->cell_space_bytes_available()->Set( |
| - static_cast<int>(cell_space()->Available())); |
| - isolate_->counters()->cell_space_bytes_committed()->Set( |
| - static_cast<int>(cell_space()->CommittedMemory())); |
| - isolate_->counters()->cell_space_bytes_used()->Set( |
| - static_cast<int>(cell_space()->SizeOfObjects())); |
| - |
| - isolate_->counters()->lo_space_bytes_available()->Set( |
| - static_cast<int>(lo_space()->Available())); |
| - isolate_->counters()->lo_space_bytes_committed()->Set( |
| - static_cast<int>(lo_space()->CommittedMemory())); |
| - isolate_->counters()->lo_space_bytes_used()->Set( |
| - static_cast<int>(lo_space()->SizeOfObjects())); |
| + isolate_->counters()->new_space_bytes_available()->AddSample( |
| + static_cast<int>(new_space()->Available()) / 1024); |
|
Michael Starzinger
2012/07/02 21:09:56
Better use the "KB" macro here. And on the followi
|
| + isolate_->counters()->new_space_bytes_committed()->AddSample( |
| + static_cast<int>(new_space()->CommittedMemory()) / 1024); |
| + isolate_->counters()->new_space_bytes_used()->AddSample( |
| + static_cast<int>(new_space()->SizeOfObjects()) / 1024); |
| + |
| + isolate_->counters()->old_pointer_space_bytes_available()->AddSample( |
| + static_cast<int>(old_pointer_space()->Available()) / 1024); |
| + isolate_->counters()->old_pointer_space_bytes_committed()->AddSample( |
| + static_cast<int>(old_pointer_space()->CommittedMemory()) / 1024); |
| + isolate_->counters()->old_pointer_space_bytes_used()->AddSample( |
| + static_cast<int>(old_pointer_space()->SizeOfObjects()) / 1024); |
| + |
| + isolate_->counters()->old_data_space_bytes_available()->AddSample( |
| + static_cast<int>(old_data_space()->Available()) / 1024); |
| + isolate_->counters()->old_data_space_bytes_committed()->AddSample( |
| + static_cast<int>(old_data_space()->CommittedMemory()) / 1024); |
| + isolate_->counters()->old_data_space_bytes_used()->AddSample( |
| + static_cast<int>(old_data_space()->SizeOfObjects()) / 1024); |
| + |
| + isolate_->counters()->code_space_bytes_available()->AddSample( |
| + static_cast<int>(code_space()->Available()) / 1024); |
| + isolate_->counters()->code_space_bytes_committed()->AddSample( |
| + static_cast<int>(code_space()->CommittedMemory()) / 1024); |
| + isolate_->counters()->code_space_bytes_used()->AddSample( |
| + static_cast<int>(code_space()->SizeOfObjects()) / 1024); |
| + |
| + isolate_->counters()->map_space_bytes_available()->AddSample( |
| + static_cast<int>(map_space()->Available()) / 1024); |
| + isolate_->counters()->map_space_bytes_committed()->AddSample( |
| + static_cast<int>(map_space()->CommittedMemory()) / 1024); |
| + isolate_->counters()->map_space_bytes_used()->AddSample( |
| + static_cast<int>(map_space()->SizeOfObjects()) / 1024); |
| + |
| + isolate_->counters()->cell_space_bytes_available()->AddSample( |
| + static_cast<int>(cell_space()->Available()) / 1024); |
| + isolate_->counters()->cell_space_bytes_committed()->AddSample( |
| + static_cast<int>(cell_space()->CommittedMemory()) / 1024); |
| + isolate_->counters()->cell_space_bytes_used()->AddSample( |
| + static_cast<int>(cell_space()->SizeOfObjects()) / 1024); |
| + |
| + isolate_->counters()->lo_space_bytes_available()->AddSample( |
| + static_cast<int>(lo_space()->Available()) / 1024); |
| + isolate_->counters()->lo_space_bytes_committed()->AddSample( |
| + static_cast<int>(lo_space()->CommittedMemory()) / 1024); |
| + isolate_->counters()->lo_space_bytes_used()->AddSample( |
| + static_cast<int>(lo_space()->SizeOfObjects()) / 1024); |
| #if defined(DEBUG) |
| ReportStatisticsAfterGC(); |