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

Unified Diff: src/heap/gc-tracer.cc

Issue 492763002: Move idle notification handling to GCIdleTimeHandler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Undo more changes Created 6 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
Index: src/heap/gc-tracer.cc
diff --git a/src/heap/gc-tracer.cc b/src/heap/gc-tracer.cc
index a0f1c464cc26f33d1dae45c36a1f5ac76a606a6c..7e81777038a5b6ed2d41199cce551b3151ebb4a7 100644
--- a/src/heap/gc-tracer.cc
+++ b/src/heap/gc-tracer.cc
@@ -418,5 +418,21 @@ intptr_t GCTracer::ScavengeSpeedInBytesPerMillisecond() const {
return static_cast<intptr_t>(bytes / durations);
}
+
+
+intptr_t GCTracer::MaxMarkSweepSpeedInBytesPerMillisecond() const {
+ intptr_t speed = 0;
+ EventBuffer::const_iterator iter = mark_compactor_events_.begin();
+ while (iter != mark_compactor_events_.end()) {
+ intptr_t bytes = iter->new_space_object_size;
+ double duration = iter->end_time - iter->start_time;
+ if (duration > 0) {
+ intptr_t current_speed = static_cast<intptr_t>(bytes / duration);
+ speed = Max(speed, current_speed);
+ }
+ ++iter;
+ }
+ return speed;
+}
}
} // namespace v8::internal

Powered by Google App Engine
This is Rietveld 408576698