Chromium Code Reviews| 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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 650 next_gc_likely_to_collect_more = | 650 next_gc_likely_to_collect_more = |
| 651 PerformGarbageCollection(collector, &tracer); | 651 PerformGarbageCollection(collector, &tracer); |
| 652 } | 652 } |
| 653 | 653 |
| 654 ASSERT(collector == SCAVENGER || incremental_marking()->IsStopped()); | 654 ASSERT(collector == SCAVENGER || incremental_marking()->IsStopped()); |
| 655 | 655 |
| 656 // This can do debug callbacks and restart incremental marking. | 656 // This can do debug callbacks and restart incremental marking. |
| 657 GarbageCollectionEpilogue(); | 657 GarbageCollectionEpilogue(); |
| 658 } | 658 } |
| 659 | 659 |
| 660 if (incremental_marking()->IsStopped()) { | 660 // Start incremental marking for the next cycle. The heap snapshot |
| 661 if (incremental_marking()->WorthActivating() && NextGCIsLikelyToBeFull()) { | 661 // generator needs incremental marking to stay off after it aborted. |
| 662 incremental_marking()->Start(); | 662 if (!mark_compact_collector()->abort_incremental_marking_ && |
|
Toon Verwaest
2012/11/27 12:07:26
Please make a protected accessor for abort_increme
Michael Starzinger
2012/11/27 13:18:11
Done.
| |
| 663 } | 663 incremental_marking()->IsStopped() && |
| 664 incremental_marking()->WorthActivating() && | |
| 665 NextGCIsLikelyToBeFull()) { | |
| 666 incremental_marking()->Start(); | |
| 664 } | 667 } |
| 665 | 668 |
| 666 return next_gc_likely_to_collect_more; | 669 return next_gc_likely_to_collect_more; |
| 667 } | 670 } |
| 668 | 671 |
| 669 | 672 |
| 670 void Heap::PerformScavenge() { | 673 void Heap::PerformScavenge() { |
| 671 GCTracer tracer(this, NULL, NULL); | 674 GCTracer tracer(this, NULL, NULL); |
| 672 if (incremental_marking()->IsStopped()) { | 675 if (incremental_marking()->IsStopped()) { |
| 673 PerformGarbageCollection(SCAVENGER, &tracer); | 676 PerformGarbageCollection(SCAVENGER, &tracer); |
| (...skipping 6655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7329 static_cast<int>(object_sizes_last_time_[index])); | 7332 static_cast<int>(object_sizes_last_time_[index])); |
| 7330 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) | 7333 FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 7331 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 7334 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 7332 | 7335 |
| 7333 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 7336 memcpy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 7334 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 7337 memcpy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 7335 ClearObjectStats(); | 7338 ClearObjectStats(); |
| 7336 } | 7339 } |
| 7337 | 7340 |
| 7338 } } // namespace v8::internal | 7341 } } // namespace v8::internal |
| OLD | NEW |