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

Unified Diff: src/heap.cc

Issue 12209090: Precise GC time measurements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 10 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
« src/heap.h ('K') | « src/heap.h ('k') | no next file » | 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 8cef1aea5394f07db103f61e639695339bcb8343..3fc0c55c3682d4e146e0ed5bc2de0ae4dfa2dcf8 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -6348,7 +6348,7 @@ void Heap::TearDown() {
PrintF("\n");
PrintF("gc_count=%d ", gc_count_);
PrintF("mark_sweep_count=%d ", ms_count_);
- PrintF("max_gc_pause=%d ", get_max_gc_pause());
+ PrintF("max_gc_pause=%.1f ", get_max_gc_pause());
PrintF("total_gc_time=%d ", total_gc_time_ms_);
PrintF("min_in_mutator=%d ", get_min_in_mutator());
PrintF("max_alive_after_gc=%" V8_PTR_PREFIX "d ",
@@ -7033,7 +7033,7 @@ GCTracer::~GCTracer() {
heap_->alive_after_last_gc_ = heap_->SizeOfObjects();
heap_->last_gc_end_timestamp_ = OS::TimeCurrentMillis();
- int time = static_cast<int>(heap_->last_gc_end_timestamp_ - start_time_);
+ float time = heap_->last_gc_end_timestamp_ - start_time_;
// Update cumulative GC statistics if required.
if (FLAG_print_cumulative_gc_stat) {
@@ -7070,7 +7070,7 @@ GCTracer::~GCTracer() {
end_memory_size_mb);
if (external_time > 0) PrintF("%d / ", external_time);
- PrintF("%d ms", time);
+ PrintF("%.1f ms", time);
if (steps_count_ > 0) {
if (collector_ == SCAVENGER) {
PrintF(" (+ %d ms in %d steps since last GC)",
@@ -7095,7 +7095,7 @@ GCTracer::~GCTracer() {
PrintF(".\n");
} else {
- PrintF("pause=%d ", time);
+ PrintF("pause=%.1f ", time);
PrintF("mutator=%d ", static_cast<int>(spent_in_mutator_));
PrintF("gc=");
switch (collector_) {
« src/heap.h ('K') | « src/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698