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 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
856 // generator needs incremental marking to stay off after it aborted. | 856 // generator needs incremental marking to stay off after it aborted. |
857 if (!mark_compact_collector()->abort_incremental_marking() && | 857 if (!mark_compact_collector()->abort_incremental_marking() && |
858 WorthActivatingIncrementalMarking()) { | 858 WorthActivatingIncrementalMarking()) { |
859 incremental_marking()->Start(); | 859 incremental_marking()->Start(); |
860 } | 860 } |
861 | 861 |
862 return next_gc_likely_to_collect_more; | 862 return next_gc_likely_to_collect_more; |
863 } | 863 } |
864 | 864 |
865 | 865 |
866 int Heap::NotifyContextDisposed() { | 866 int Heap::NotifyContextDisposed(bool dependant_context) { |
| 867 // TODO(hpayer): Reset heap shrinking if dependant_context is false. |
867 if (isolate()->concurrent_recompilation_enabled()) { | 868 if (isolate()->concurrent_recompilation_enabled()) { |
868 // Flush the queued recompilation tasks. | 869 // Flush the queued recompilation tasks. |
869 isolate()->optimizing_compiler_thread()->Flush(); | 870 isolate()->optimizing_compiler_thread()->Flush(); |
870 } | 871 } |
871 flush_monomorphic_ics_ = true; | 872 flush_monomorphic_ics_ = true; |
872 AgeInlineCaches(); | 873 AgeInlineCaches(); |
873 tracer()->AddContextDisposalTime(base::OS::TimeCurrentMillis()); | 874 tracer()->AddContextDisposalTime(base::OS::TimeCurrentMillis()); |
874 return ++contexts_disposed_; | 875 return ++contexts_disposed_; |
875 } | 876 } |
876 | 877 |
(...skipping 5556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6433 static_cast<int>(object_sizes_last_time_[index])); | 6434 static_cast<int>(object_sizes_last_time_[index])); |
6434 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6435 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6435 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6436 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6436 | 6437 |
6437 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6438 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6438 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6439 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6439 ClearObjectStats(); | 6440 ClearObjectStats(); |
6440 } | 6441 } |
6441 } | 6442 } |
6442 } // namespace v8::internal | 6443 } // namespace v8::internal |
OLD | NEW |