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

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

Issue 8494012: Clean up the marking speed heuristics. This reduces the (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: 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 | « no previous file | src/incremental-marking.cc » ('j') | src/incremental-marking.cc » ('J')
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 static const intptr_t kAllocatedThreshold = 65536; 89 static const intptr_t kAllocatedThreshold = 65536;
90 // Start off by marking this many times more memory than has been allocated. 90 // Start off by marking this many times more memory than has been allocated.
91 static const intptr_t kInitialAllocationMarkingFactor = 1; 91 static const intptr_t kInitialAllocationMarkingFactor = 1;
92 // But if we are promoting a lot of data we need to mark faster to keep up 92 // But if we are promoting a lot of data we need to mark faster to keep up
93 // with the data that is entering the old space through promotion. 93 // with the data that is entering the old space through promotion.
94 static const intptr_t kFastMarking = 3; 94 static const intptr_t kFastMarking = 3;
95 // After this many steps we increase the marking/allocating factor. 95 // After this many steps we increase the marking/allocating factor.
96 static const intptr_t kAllocationMarkingFactorSpeedupInterval = 1024; 96 static const intptr_t kAllocationMarkingFactorSpeedupInterval = 1024;
97 // This is how much we increase the marking/allocating factor by. 97 // This is how much we increase the marking/allocating factor by.
98 static const intptr_t kAllocationMarkingFactorSpeedup = 2; 98 static const intptr_t kAllocationMarkingFactorSpeedup = 2;
99 static const intptr_t kMaxAllocationMarkingFactor = 1000000000; 99 static const intptr_t kMaxAllocationMarkingFactor = 100000;
100 100
101 void OldSpaceStep(intptr_t allocated) { 101 void OldSpaceStep(intptr_t allocated) {
102 Step(allocated * kFastMarking / kInitialAllocationMarkingFactor); 102 Step(allocated * kFastMarking / kInitialAllocationMarkingFactor);
103 } 103 }
104 void Step(intptr_t allocated); 104 void Step(intptr_t allocated);
105 105
106 inline void RestartIfNotMarking() { 106 inline void RestartIfNotMarking() {
107 if (state_ == COMPLETE) { 107 if (state_ == COMPLETE) {
108 state_ = MARKING; 108 state_ = MARKING;
109 if (FLAG_trace_incremental_marking) { 109 if (FLAG_trace_incremental_marking) {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 int steps_count_; 255 int steps_count_;
256 double steps_took_; 256 double steps_took_;
257 double longest_step_; 257 double longest_step_;
258 int64_t old_generation_space_available_at_start_of_incremental_; 258 int64_t old_generation_space_available_at_start_of_incremental_;
259 int64_t old_generation_space_used_at_start_of_incremental_; 259 int64_t old_generation_space_used_at_start_of_incremental_;
260 int steps_count_since_last_gc_; 260 int steps_count_since_last_gc_;
261 double steps_took_since_last_gc_; 261 double steps_took_since_last_gc_;
262 int64_t bytes_rescanned_; 262 int64_t bytes_rescanned_;
263 bool should_hurry_; 263 bool should_hurry_;
264 int allocation_marking_factor_; 264 int allocation_marking_factor_;
265 intptr_t bytes_scanned_;
265 intptr_t allocated_; 266 intptr_t allocated_;
266 267
267 int no_marking_scope_depth_; 268 int no_marking_scope_depth_;
268 269
269 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); 270 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking);
270 }; 271 };
271 272
272 } } // namespace v8::internal 273 } } // namespace v8::internal
273 274
274 #endif // V8_INCREMENTAL_MARKING_H_ 275 #endif // V8_INCREMENTAL_MARKING_H_
OLDNEW
« no previous file with comments | « no previous file | src/incremental-marking.cc » ('j') | src/incremental-marking.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698