Revision: 23954
Author: [email protected]
Date: Mon Sep 15 15:15:23 2014 UTC
Log: Use an upper bound for marking time estimation in idle
notification.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/571913003
https://code.google.com/p/v8/source/detail?r=23954
Modified:
/branches/bleeding_edge/src/heap/gc-idle-time-handler-unittest.cc
/branches/bleeding_edge/src/heap/gc-idle-time-handler.cc
=======================================
--- /branches/bleeding_edge/src/heap/gc-idle-time-handler-unittest.cc Mon
Sep 1 09:12:50 2014 UTC
+++ /branches/bleeding_edge/src/heap/gc-idle-time-handler-unittest.cc Mon
Sep 15 15:15:23 2014 UTC
@@ -32,8 +32,8 @@
}
static const size_t kSizeOfObjects = 100 * MB;
- static const size_t kMarkCompactSpeed = 100 * KB;
- static const size_t kMarkingSpeed = 100 * KB;
+ static const size_t kMarkCompactSpeed = 200 * KB;
+ static const size_t kMarkingSpeed = 200 * KB;
private:
GCIdleTimeHandler handler_;
@@ -87,7 +87,7 @@
TEST(GCIdleTimeHandler, EstimateMarkCompactTimeNonZero) {
size_t size = 100 * MB;
- size_t speed = 10 * KB;
+ size_t speed = 1 * MB;
size_t time = GCIdleTimeHandler::EstimateMarkCompactTime(size, speed);
EXPECT_EQ(size / speed, time);
}
=======================================
--- /branches/bleeding_edge/src/heap/gc-idle-time-handler.cc Thu Sep 11
11:54:49 2014 UTC
+++ /branches/bleeding_edge/src/heap/gc-idle-time-handler.cc Mon Sep 15
15:15:23 2014 UTC
@@ -10,7 +10,7 @@
namespace internal {
const double GCIdleTimeHandler::kConservativeTimeRatio = 0.9;
-const size_t GCIdleTimeHandler::kMaxMarkCompactTimeInMs = 1000000;
+const size_t GCIdleTimeHandler::kMaxMarkCompactTimeInMs = 1000;
const size_t GCIdleTimeHandler::kMinTimeForFinalizeSweeping = 100;
const int GCIdleTimeHandler::kMaxMarkCompactsInIdleRound = 7;
const int GCIdleTimeHandler::kIdleScavengeThreshold = 5;
@@ -78,9 +78,10 @@
}
}
if (heap_state.incremental_marking_stopped) {
- if (idle_time_in_ms >= EstimateMarkCompactTime(
- heap_state.size_of_objects,
-
heap_state.mark_compact_speed_in_bytes_per_ms) ||
+ size_t estimated_time_in_ms =
+ EstimateMarkCompactTime(heap_state.size_of_objects,
+
heap_state.mark_compact_speed_in_bytes_per_ms);
+ if (idle_time_in_ms >= estimated_time_in_ms ||
(heap_state.size_of_objects < kSmallHeapSize &&
heap_state.contexts_disposed > 0)) {
// If there are no more than two GCs left in this idle round and we
are
--
--
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.