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

Unified Diff: src/heap/mark-compact.cc

Issue 1023153002: Limit rate of full garbage collections triggered by idle notification. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index de381aab356657374f1e62f083173045d949ded0..f7afc641c4c4af4212175f46f1010d0700abe5a4 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -53,7 +53,8 @@ MarkCompactCollector::MarkCompactCollector(Heap* heap)
marking_deque_memory_(NULL),
marking_deque_memory_committed_(false),
code_flusher_(NULL),
- have_code_to_deoptimize_(false) {
+ have_code_to_deoptimize_(false),
+ last_mark_compact_time_(0) {
}
#ifdef VERIFY_HEAP
@@ -878,6 +879,9 @@ void MarkCompactCollector::Finish() {
}
heap_->incremental_marking()->ClearIdleMarkingDelayCounter();
+ last_mark_compact_time_ = static_cast<size_t>(
+ V8::GetCurrentPlatform()->MonotonicallyIncreasingTime() *
+ static_cast<double>(base::Time::kMillisecondsPerSecond));
}

Powered by Google App Engine
This is Rietveld 408576698