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

Side by Side Diff: test/unittests/heap/gc-idle-time-handler-unittest.cc

Issue 1131943004: Make transition to reduce memory mode more conservative in idle time handler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/heap/gc-idle-time-handler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits> 5 #include <limits>
6 6
7 #include "src/heap/gc-idle-time-handler.h" 7 #include "src/heap/gc-idle-time-handler.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 handler()->Compute(idle_time_ms, heap_state); 87 handler()->Compute(idle_time_ms, heap_state);
88 EXPECT_EQ(GCIdleTimeHandler::kReduceLatency, handler()->mode()); 88 EXPECT_EQ(GCIdleTimeHandler::kReduceLatency, handler()->mode());
89 } 89 }
90 90
91 static const size_t kSizeOfObjects = 100 * MB; 91 static const size_t kSizeOfObjects = 100 * MB;
92 static const size_t kMarkCompactSpeed = 200 * KB; 92 static const size_t kMarkCompactSpeed = 200 * KB;
93 static const size_t kMarkingSpeed = 200 * KB; 93 static const size_t kMarkingSpeed = 200 * KB;
94 static const size_t kScavengeSpeed = 100 * KB; 94 static const size_t kScavengeSpeed = 100 * KB;
95 static const size_t kNewSpaceCapacity = 1 * MB; 95 static const size_t kNewSpaceCapacity = 1 * MB;
96 static const size_t kNewSpaceAllocationThroughput = 10 * KB; 96 static const size_t kNewSpaceAllocationThroughput = 10 * KB;
97 static const int kMaxNotifications = 100; 97 static const int kMaxNotifications = 1000;
98 98
99 private: 99 private:
100 GCIdleTimeHandler handler_; 100 GCIdleTimeHandler handler_;
101 }; 101 };
102 102
103 } // namespace 103 } // namespace
104 104
105 105
106 TEST(GCIdleTimeHandler, EstimateMarkingStepSizeInitial) { 106 TEST(GCIdleTimeHandler, EstimateMarkingStepSizeInitial) {
107 size_t step_size = GCIdleTimeHandler::EstimateMarkingStepSize(1, 0); 107 size_t step_size = GCIdleTimeHandler::EstimateMarkingStepSize(1, 0);
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 handler()->NotifyMarkCompact(); 620 handler()->NotifyMarkCompact();
621 handler()->NotifyIdleMarkCompact(); 621 handler()->NotifyIdleMarkCompact();
622 } 622 }
623 action = handler()->Compute(idle_time_ms, heap_state); 623 action = handler()->Compute(idle_time_ms, heap_state);
624 EXPECT_EQ(DONE, action.type); 624 EXPECT_EQ(DONE, action.type);
625 } 625 }
626 626
627 627
628 } // namespace internal 628 } // namespace internal
629 } // namespace v8 629 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/gc-idle-time-handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698