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

Side by Side Diff: src/heap/gc-idle-time-handler.h

Issue 496253002: Remove dependency on GCTrace from GCIdleTimeHandler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/heap/gc-idle-time-handler.cc » ('j') | 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 #ifndef V8_HEAP_GC_IDLE_TIME_HANDLER_H_ 5 #ifndef V8_HEAP_GC_IDLE_TIME_HANDLER_H_
6 #define V8_HEAP_GC_IDLE_TIME_HANDLER_H_ 6 #define V8_HEAP_GC_IDLE_TIME_HANDLER_H_
7 7
8 #include "src/globals.h" 8 #include "src/globals.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // Minimum time to finalize sweeping phase. The main thread may wait for 88 // Minimum time to finalize sweeping phase. The main thread may wait for
89 // sweeper threads. 89 // sweeper threads.
90 static const size_t kMinTimeForFinalizeSweeping; 90 static const size_t kMinTimeForFinalizeSweeping;
91 91
92 struct HeapState { 92 struct HeapState {
93 int contexts_disposed; 93 int contexts_disposed;
94 size_t size_of_objects; 94 size_t size_of_objects;
95 bool incremental_marking_stopped; 95 bool incremental_marking_stopped;
96 bool can_start_incremental_marking; 96 bool can_start_incremental_marking;
97 bool sweeping_in_progress; 97 bool sweeping_in_progress;
98 size_t mark_compact_speed_in_bytes_per_ms;
99 size_t incremental_marking_speed_in_bytes_per_ms;
98 }; 100 };
99 101
100 GCIdleTimeHandler() 102 GCIdleTimeHandler()
101 : mark_compacts_since_idle_round_started_(0), 103 : mark_compacts_since_idle_round_started_(0),
102 scavenges_since_last_idle_round_(0) {} 104 scavenges_since_last_idle_round_(0) {}
103 105
104 GCIdleTimeAction Compute(size_t idle_time_in_ms, HeapState heap_state, 106 GCIdleTimeAction Compute(size_t idle_time_in_ms, HeapState heap_state);
105 GCTracer* gc_tracer);
106 107
107 void NotifyIdleMarkCompact() { 108 void NotifyIdleMarkCompact() {
108 if (mark_compacts_since_idle_round_started_ < kMaxMarkCompactsInIdleRound) { 109 if (mark_compacts_since_idle_round_started_ < kMaxMarkCompactsInIdleRound) {
109 ++mark_compacts_since_idle_round_started_; 110 ++mark_compacts_since_idle_round_started_;
110 if (mark_compacts_since_idle_round_started_ == 111 if (mark_compacts_since_idle_round_started_ ==
111 kMaxMarkCompactsInIdleRound) { 112 kMaxMarkCompactsInIdleRound) {
112 scavenges_since_last_idle_round_ = 0; 113 scavenges_since_last_idle_round_ = 0;
113 } 114 }
114 } 115 }
115 } 116 }
(...skipping 21 matching lines...) Expand all
137 int mark_compacts_since_idle_round_started_; 138 int mark_compacts_since_idle_round_started_;
138 int scavenges_since_last_idle_round_; 139 int scavenges_since_last_idle_round_;
139 140
140 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); 141 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler);
141 }; 142 };
142 143
143 } // namespace internal 144 } // namespace internal
144 } // namespace v8 145 } // namespace v8
145 146
146 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ 147 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/gc-idle-time-handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698