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

Side by Side Diff: src/incremental-marking.h

Issue 8065003: Shrink the new space and uncommit marking deque on low memory notification. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 9 years, 1 month 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 | « src/heap.cc ('k') | src/incremental-marking.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 } 206 }
207 207
208 void EnterNoMarkingScope() { 208 void EnterNoMarkingScope() {
209 no_marking_scope_depth_++; 209 no_marking_scope_depth_++;
210 } 210 }
211 211
212 void LeaveNoMarkingScope() { 212 void LeaveNoMarkingScope() {
213 no_marking_scope_depth_--; 213 no_marking_scope_depth_--;
214 } 214 }
215 215
216 void UncommitMarkingDeque();
217
216 private: 218 private:
217 void set_should_hurry(bool val) { 219 void set_should_hurry(bool val) {
218 should_hurry_ = val; 220 should_hurry_ = val;
219 } 221 }
220 222
221 int64_t SpaceLeftInOldSpace(); 223 int64_t SpaceLeftInOldSpace();
222 224
223 void ResetStepCounters(); 225 void ResetStepCounters();
224 226
225 enum CompactionFlag { ALLOW_COMPACTION, PREVENT_COMPACTION }; 227 enum CompactionFlag { ALLOW_COMPACTION, PREVENT_COMPACTION };
(...skipping 17 matching lines...) Expand all
243 void EnsureMarkingDequeIsCommitted(); 245 void EnsureMarkingDequeIsCommitted();
244 246
245 void VisitGlobalContext(Context* ctx, ObjectVisitor* v); 247 void VisitGlobalContext(Context* ctx, ObjectVisitor* v);
246 248
247 Heap* heap_; 249 Heap* heap_;
248 250
249 State state_; 251 State state_;
250 bool is_compacting_; 252 bool is_compacting_;
251 253
252 VirtualMemory* marking_deque_memory_; 254 VirtualMemory* marking_deque_memory_;
255 bool marking_deque_memory_committed_;
253 MarkingDeque marking_deque_; 256 MarkingDeque marking_deque_;
254 257
255 int steps_count_; 258 int steps_count_;
256 double steps_took_; 259 double steps_took_;
257 double longest_step_; 260 double longest_step_;
258 int64_t old_generation_space_available_at_start_of_incremental_; 261 int64_t old_generation_space_available_at_start_of_incremental_;
259 int64_t old_generation_space_used_at_start_of_incremental_; 262 int64_t old_generation_space_used_at_start_of_incremental_;
260 int steps_count_since_last_gc_; 263 int steps_count_since_last_gc_;
261 double steps_took_since_last_gc_; 264 double steps_took_since_last_gc_;
262 int64_t bytes_rescanned_; 265 int64_t bytes_rescanned_;
263 bool should_hurry_; 266 bool should_hurry_;
264 int allocation_marking_factor_; 267 int allocation_marking_factor_;
265 intptr_t bytes_scanned_; 268 intptr_t bytes_scanned_;
266 intptr_t allocated_; 269 intptr_t allocated_;
267 270
268 int no_marking_scope_depth_; 271 int no_marking_scope_depth_;
269 272
270 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); 273 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking);
271 }; 274 };
272 275
273 } } // namespace v8::internal 276 } } // namespace v8::internal
274 277
275 #endif // V8_INCREMENTAL_MARKING_H_ 278 #endif // V8_INCREMENTAL_MARKING_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698