| 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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 speed_up = true; | 855 speed_up = true; |
| 856 } | 856 } |
| 857 | 857 |
| 858 if (speed_up) { | 858 if (speed_up) { |
| 859 if (state_ != MARKING) { | 859 if (state_ != MARKING) { |
| 860 if (FLAG_trace_gc) { | 860 if (FLAG_trace_gc) { |
| 861 PrintF("Postponing speeding up marking until marking starts\n"); | 861 PrintF("Postponing speeding up marking until marking starts\n"); |
| 862 } | 862 } |
| 863 } else { | 863 } else { |
| 864 allocation_marking_factor_ += kAllocationMarkingFactorSpeedup; | 864 allocation_marking_factor_ += kAllocationMarkingFactorSpeedup; |
| 865 allocation_marking_factor_ = | 865 allocation_marking_factor_ = static_cast<int>( |
| 866 Min(kMaxAllocationMarkingFactor, | 866 Min(kMaxAllocationMarkingFactor, |
| 867 static_cast<intptr_t>(allocation_marking_factor_ * 1.3)); | 867 static_cast<intptr_t>(allocation_marking_factor_ * 1.3))); |
| 868 if (FLAG_trace_gc) { | 868 if (FLAG_trace_gc) { |
| 869 PrintF("Marking speed increased to %d\n", allocation_marking_factor_); | 869 PrintF("Marking speed increased to %d\n", allocation_marking_factor_); |
| 870 } | 870 } |
| 871 } | 871 } |
| 872 } | 872 } |
| 873 | 873 |
| 874 if (FLAG_trace_incremental_marking || FLAG_trace_gc) { | 874 if (FLAG_trace_incremental_marking || FLAG_trace_gc) { |
| 875 double end = OS::TimeCurrentMillis(); | 875 double end = OS::TimeCurrentMillis(); |
| 876 double delta = (end - start); | 876 double delta = (end - start); |
| 877 longest_step_ = Max(longest_step_, delta); | 877 longest_step_ = Max(longest_step_, delta); |
| (...skipping 17 matching lines...) Expand all 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 |