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

Unified Diff: src/heap.cc

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 | « no previous file | src/v8-counters.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 48cf266826dd53b6dae18a328a1959c206c12eb7..2ec740c08c8ab1ae25e621993419599a34c2ee7f 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -453,6 +453,22 @@ void Heap::GarbageCollectionEpilogue() {
if (CommittedMemory() > 0) {
isolate_->counters()->external_fragmentation_total()->AddSample(
static_cast<int>(100 - (SizeOfObjects() * 100.0) / CommittedMemory()));
+
+ isolate_->counters()->heap_fraction_map_space()->AddSample(
+ static_cast<int>(
+ (map_space()->CommittedMemory() * 100.0) / CommittedMemory()));
+ isolate_->counters()->heap_fraction_cell_space()->AddSample(
+ static_cast<int>(
+ (cell_space()->CommittedMemory() * 100.0) / CommittedMemory()));
+
+ isolate_->counters()->heap_sample_total_committed()->AddSample(
+ CommittedMemory() / KB);
+ isolate_->counters()->heap_sample_total_used()->AddSample(
+ SizeOfObjects() / KB);
+ isolate_->counters()->heap_sample_map_space_committed()->AddSample(
+ map_space()->CommittedMemory() / KB);
+ isolate_->counters()->heap_sample_cell_space_committed()->AddSample(
+ cell_space()->CommittedMemory() / KB);
}
#define UPDATE_COUNTERS_FOR_SPACE(space) \
« no previous file with comments | « no previous file | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698