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 4433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4444 if (remaining_idle_time_in_ms > 0) { | 4444 if (remaining_idle_time_in_ms > 0) { |
4445 TryFinalizeIdleIncrementalMarking( | 4445 TryFinalizeIdleIncrementalMarking( |
4446 remaining_idle_time_in_ms, heap_state.size_of_objects, | 4446 remaining_idle_time_in_ms, heap_state.size_of_objects, |
4447 heap_state.mark_compact_speed_in_bytes_per_ms); | 4447 heap_state.mark_compact_speed_in_bytes_per_ms); |
4448 } | 4448 } |
4449 break; | 4449 break; |
4450 } | 4450 } |
4451 case DO_FULL_GC: { | 4451 case DO_FULL_GC: { |
4452 HistogramTimerScope scope(isolate_->counters()->gc_context()); | 4452 HistogramTimerScope scope(isolate_->counters()->gc_context()); |
4453 if (contexts_disposed_) { | 4453 if (contexts_disposed_) { |
4454 CollectAllGarbage(kReduceMemoryFootprintMask, | 4454 CollectAllGarbage(kNoGCFlags, "idle notification: contexts disposed"); |
4455 "idle notification: contexts disposed"); | |
4456 gc_idle_time_handler_.NotifyIdleMarkCompact(); | 4455 gc_idle_time_handler_.NotifyIdleMarkCompact(); |
4457 gc_count_at_last_idle_gc_ = gc_count_; | 4456 gc_count_at_last_idle_gc_ = gc_count_; |
4458 } else { | 4457 } else { |
4459 IdleMarkCompact("idle notification: finalize idle round"); | 4458 IdleMarkCompact("idle notification: finalize idle round"); |
4460 } | 4459 } |
4461 break; | 4460 break; |
4462 } | 4461 } |
4463 case DO_SCAVENGE: | 4462 case DO_SCAVENGE: |
4464 CollectGarbage(NEW_SPACE, "idle notification: scavenge"); | 4463 CollectGarbage(NEW_SPACE, "idle notification: scavenge"); |
4465 break; | 4464 break; |
(...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6308 static_cast<int>(object_sizes_last_time_[index])); | 6307 static_cast<int>(object_sizes_last_time_[index])); |
6309 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6308 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6310 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6309 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6311 | 6310 |
6312 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6311 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6313 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6312 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6314 ClearObjectStats(); | 6313 ClearObjectStats(); |
6315 } | 6314 } |
6316 } | 6315 } |
6317 } // namespace v8::internal | 6316 } // namespace v8::internal |
OLD | NEW |