| OLD | NEW |
| 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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 (heap_->PromotedTotalSize() > | 835 (heap_->PromotedTotalSize() > |
| 836 (allocation_marking_factor_ + 1) * | 836 (allocation_marking_factor_ + 1) * |
| 837 old_generation_space_used_at_start_of_incremental_); | 837 old_generation_space_used_at_start_of_incremental_); |
| 838 if (size_of_old_space_multiplied_by_n_during_marking) { | 838 if (size_of_old_space_multiplied_by_n_during_marking) { |
| 839 speed_up = true; | 839 speed_up = true; |
| 840 if (FLAG_trace_gc) { | 840 if (FLAG_trace_gc) { |
| 841 PrintF("Speed up marking because of heap size increase\n"); | 841 PrintF("Speed up marking because of heap size increase\n"); |
| 842 } | 842 } |
| 843 } | 843 } |
| 844 | 844 |
| 845 intptr_t promoted_during_marking = heap_->PromotedTotalSize() | 845 int64_t promoted_during_marking = heap_->PromotedTotalSize() |
| 846 - old_generation_space_used_at_start_of_incremental_; | 846 - old_generation_space_used_at_start_of_incremental_; |
| 847 intptr_t delay = allocation_marking_factor_ * MB; | 847 intptr_t delay = allocation_marking_factor_ * MB; |
| 848 intptr_t scavenge_slack = heap_->MaxSemiSpaceSize(); | 848 intptr_t scavenge_slack = heap_->MaxSemiSpaceSize(); |
| 849 | 849 |
| 850 // We try to scan at at least twice the speed that we are allocating. | 850 // We try to scan at at least twice the speed that we are allocating. |
| 851 if (promoted_during_marking > bytes_scanned_ / 2 + scavenge_slack + delay) { | 851 if (promoted_during_marking > bytes_scanned_ / 2 + scavenge_slack + delay) { |
| 852 if (FLAG_trace_gc) { | 852 if (FLAG_trace_gc) { |
| 853 PrintF("Speed up marking because marker was not keeping up\n"); | 853 PrintF("Speed up marking because marker was not keeping up\n"); |
| 854 } | 854 } |
| 855 speed_up = true; | 855 speed_up = true; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | 895 allocation_marking_factor_ = kInitialAllocationMarkingFactor; |
| 896 bytes_scanned_ = 0; | 896 bytes_scanned_ = 0; |
| 897 } | 897 } |
| 898 | 898 |
| 899 | 899 |
| 900 int64_t IncrementalMarking::SpaceLeftInOldSpace() { | 900 int64_t IncrementalMarking::SpaceLeftInOldSpace() { |
| 901 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); | 901 return heap_->MaxOldGenerationSize() - heap_->PromotedSpaceSize(); |
| 902 } | 902 } |
| 903 | 903 |
| 904 } } // namespace v8::internal | 904 } } // namespace v8::internal |
| OLD | NEW |