| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 93 |
| 94 void MarkingComplete(CompletionAction action); | 94 void MarkingComplete(CompletionAction action); |
| 95 | 95 |
| 96 // It's hard to know how much work the incremental marker should do to make | 96 // It's hard to know how much work the incremental marker should do to make |
| 97 // progress in the face of the mutator creating new work for it. We start | 97 // progress in the face of the mutator creating new work for it. We start |
| 98 // of at a moderate rate of work and gradually increase the speed of the | 98 // of at a moderate rate of work and gradually increase the speed of the |
| 99 // incremental marker until it completes. | 99 // incremental marker until it completes. |
| 100 // Do some marking every time this much memory has been allocated or that many | 100 // Do some marking every time this much memory has been allocated or that many |
| 101 // heavy (color-checking) write barriers have been invoked. | 101 // heavy (color-checking) write barriers have been invoked. |
| 102 static const intptr_t kAllocatedThreshold = 65536; | 102 static const intptr_t kAllocatedThreshold = 65536; |
| 103 static const intptr_t kWriteBarriersInvokedThreshold = 65536; | 103 static const intptr_t kWriteBarriersInvokedThreshold = 32768; |
| 104 // Start off by marking this many times more memory than has been allocated. | 104 // Start off by marking this many times more memory than has been allocated. |
| 105 static const intptr_t kInitialMarkingSpeed = 1; | 105 static const intptr_t kInitialMarkingSpeed = 1; |
| 106 // But if we are promoting a lot of data we need to mark faster to keep up | 106 // But if we are promoting a lot of data we need to mark faster to keep up |
| 107 // with the data that is entering the old space through promotion. | 107 // with the data that is entering the old space through promotion. |
| 108 static const intptr_t kFastMarking = 3; | 108 static const intptr_t kFastMarking = 3; |
| 109 // After this many steps we increase the marking/allocating factor. | 109 // After this many steps we increase the marking/allocating factor. |
| 110 static const intptr_t kMarkingSpeedAccellerationInterval = 1024; | 110 static const intptr_t kMarkingSpeedAccellerationInterval = 1024; |
| 111 // This is how much we increase the marking/allocating factor by. | 111 // This is how much we increase the marking/allocating factor by. |
| 112 static const intptr_t kMarkingSpeedAccelleration = 2; | 112 static const intptr_t kMarkingSpeedAccelleration = 2; |
| 113 static const intptr_t kMaxMarkingSpeed = 1000; | 113 static const intptr_t kMaxMarkingSpeed = 1000; |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 int no_marking_scope_depth_; | 279 int no_marking_scope_depth_; |
| 280 | 280 |
| 281 int unscanned_bytes_of_large_object_; | 281 int unscanned_bytes_of_large_object_; |
| 282 | 282 |
| 283 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 283 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
| 284 }; | 284 }; |
| 285 | 285 |
| 286 } } // namespace v8::internal | 286 } } // namespace v8::internal |
| 287 | 287 |
| 288 #endif // V8_INCREMENTAL_MARKING_H_ | 288 #endif // V8_INCREMENTAL_MARKING_H_ |
| OLD | NEW |