OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
8 #include "src/api.h" | 8 #include "src/api.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 | 837 |
838 { | 838 { |
839 HistogramTimerScope histogram_timer_scope( | 839 HistogramTimerScope histogram_timer_scope( |
840 (collector == SCAVENGER) ? isolate_->counters()->gc_scavenger() | 840 (collector == SCAVENGER) ? isolate_->counters()->gc_scavenger() |
841 : isolate_->counters()->gc_compactor()); | 841 : isolate_->counters()->gc_compactor()); |
842 next_gc_likely_to_collect_more = | 842 next_gc_likely_to_collect_more = |
843 PerformGarbageCollection(collector, gc_callback_flags); | 843 PerformGarbageCollection(collector, gc_callback_flags); |
844 } | 844 } |
845 | 845 |
846 GarbageCollectionEpilogue(); | 846 GarbageCollectionEpilogue(); |
847 tracer()->Stop(); | 847 tracer()->Stop(collector); |
848 } | 848 } |
849 | 849 |
850 // Start incremental marking for the next cycle. The heap snapshot | 850 // Start incremental marking for the next cycle. The heap snapshot |
851 // generator needs incremental marking to stay off after it aborted. | 851 // generator needs incremental marking to stay off after it aborted. |
852 if (!mark_compact_collector()->abort_incremental_marking() && | 852 if (!mark_compact_collector()->abort_incremental_marking() && |
853 WorthActivatingIncrementalMarking()) { | 853 WorthActivatingIncrementalMarking()) { |
854 incremental_marking()->Start(); | 854 incremental_marking()->Start(); |
855 } | 855 } |
856 | 856 |
857 return next_gc_likely_to_collect_more; | 857 return next_gc_likely_to_collect_more; |
(...skipping 5453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6311 static_cast<int>(object_sizes_last_time_[index])); | 6311 static_cast<int>(object_sizes_last_time_[index])); |
6312 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6312 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6313 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6313 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6314 | 6314 |
6315 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6315 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6316 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6316 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6317 ClearObjectStats(); | 6317 ClearObjectStats(); |
6318 } | 6318 } |
6319 } | 6319 } |
6320 } // namespace v8::internal | 6320 } // namespace v8::internal |
OLD | NEW |