Reviewers: Michael Starzinger,
Description:
Precise scavenging time measurements.
BUG=
Please review this at https://codereview.chromium.org/12209090/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/heap.h
M src/heap.cc
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_) {
Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index
42546af5d3e4c6aa0f663903226544a0af884cb8..b1dc917a84486d878ad65ba5111cfdde660fed96
100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -1596,7 +1596,7 @@ class Heap {
}
// Returns maximum GC pause.
- int get_max_gc_pause() { return max_gc_pause_; }
+ float get_max_gc_pause() { return max_gc_pause_; }
// Returns maximum size of objects alive after GC.
intptr_t get_max_alive_after_gc() { return max_alive_after_gc_; }
@@ -2184,7 +2184,7 @@ class Heap {
size_t object_sizes_last_time_[OBJECT_STATS_COUNT];
// Maximum GC pause.
- int max_gc_pause_;
+ float max_gc_pause_;
// Total time spent in GC.
int total_gc_time_ms_;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.