Reviewers: rmcilroy,
Description:
Rename kMaxFrameRenderingIdleTime to kMaxActiveIdleTime and adjust it to the
currently maximum value of 50ms passed in by the Blink scheduler.
BUG=468692
LOG=n
Please review this at https://codereview.chromium.org/1024543002/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+8, -7 lines):
M src/heap/gc-idle-time-handler.h
M src/heap/gc-idle-time-handler.cc
M src/heap/heap.cc
Index: src/heap/gc-idle-time-handler.cc
diff --git a/src/heap/gc-idle-time-handler.cc
b/src/heap/gc-idle-time-handler.cc
index
a1c9c7f23225a96280c98f914934c033146417ae..814008c90d25322396bf9cafb1a21e1182a38424
100644
--- a/src/heap/gc-idle-time-handler.cc
+++ b/src/heap/gc-idle-time-handler.cc
@@ -117,7 +117,7 @@ bool GCIdleTimeHandler::ShouldDoScavenge(
size_t scavenge_speed_in_bytes_per_ms,
size_t new_space_allocation_throughput_in_bytes_per_ms) {
size_t new_space_allocation_limit =
- kMaxFrameRenderingIdleTime * scavenge_speed_in_bytes_per_ms;
+ kMaxActiveIdleTime * scavenge_speed_in_bytes_per_ms;
// If the limit is larger than the new space size, then scavenging used
to be
// really fast. We can take advantage of the whole new space.
@@ -133,8 +133,7 @@ bool GCIdleTimeHandler::ShouldDoScavenge(
} else {
// We have to trigger scavenge before we reach the end of new space.
new_space_allocation_limit -=
- new_space_allocation_throughput_in_bytes_per_ms *
- kMaxFrameRenderingIdleTime;
+ new_space_allocation_throughput_in_bytes_per_ms *
kMaxActiveIdleTime;
}
if (scavenge_speed_in_bytes_per_ms == 0) {
@@ -244,7 +243,7 @@ GCIdleTimeAction GCIdleTimeHandler::Compute(double
idle_time_in_ms,
// can get rid of this special case and always start incremental
marking.
int remaining_mark_sweeps =
kMaxMarkCompactsInIdleRound -
mark_compacts_since_idle_round_started_;
- if (static_cast<size_t>(idle_time_in_ms) >
kMaxFrameRenderingIdleTime &&
+ if (static_cast<size_t>(idle_time_in_ms) > kMaxActiveIdleTime &&
(remaining_mark_sweeps <= 2 ||
!heap_state.can_start_incremental_marking)) {
return GCIdleTimeAction::FullGC();
Index: src/heap/gc-idle-time-handler.h
diff --git a/src/heap/gc-idle-time-handler.h
b/src/heap/gc-idle-time-handler.h
index
3d2e304e623b62709053d5a80dc42943667132a2..c0706c6256ffb640d7e1b11faaf38d5964f0bec1
100644
--- a/src/heap/gc-idle-time-handler.h
+++ b/src/heap/gc-idle-time-handler.h
@@ -122,8 +122,10 @@ class GCIdleTimeHandler {
// Number of scavenges that will trigger start of new idle round.
static const int kIdleScavengeThreshold;
- // That is the maximum idle time we will have during frame rendering.
- static const size_t kMaxFrameRenderingIdleTime = 16;
+ // This is the maximum idle time we will have during active frame
rendering.
+ // Note that it can be more than 16ms when there is currently no
rendering
+ // going on.
+ static const size_t kMaxActiveIdleTime = 50;
// If we haven't recorded any scavenger events yet, we use a conservative
// lower bound for the scavenger speed.
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index
66f98ced9816c26714e874e22b99d0232c87c53b..cfe9a7fa4914ffdfe3352de80a50788ff793a3c1
100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -4678,7 +4678,7 @@ bool Heap::IdleNotification(double
deadline_in_seconds) {
bool Heap::RecentIdleNotificationHappened() {
return (last_idle_notification_time_ +
- GCIdleTimeHandler::kMaxFrameRenderingIdleTime) >
+ GCIdleTimeHandler::kMaxActiveIdleTime) >
MonotonicallyIncreasingTimeInMs();
}
--
--
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/d/optout.