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/once.h" | 9 #include "src/base/once.h" |
10 #include "src/base/utils/random-number-generator.h" | 10 #include "src/base/utils/random-number-generator.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "src/heap-profiler.h" | 24 #include "src/heap-profiler.h" |
25 #include "src/isolate-inl.h" | 25 #include "src/isolate-inl.h" |
26 #include "src/natives.h" | 26 #include "src/natives.h" |
27 #include "src/runtime-profiler.h" | 27 #include "src/runtime-profiler.h" |
28 #include "src/scopeinfo.h" | 28 #include "src/scopeinfo.h" |
29 #include "src/snapshot.h" | 29 #include "src/snapshot.h" |
30 #include "src/utils.h" | 30 #include "src/utils.h" |
31 #include "src/v8threads.h" | 31 #include "src/v8threads.h" |
32 #include "src/vm-state-inl.h" | 32 #include "src/vm-state-inl.h" |
33 | 33 |
| 34 #if V8_TARGET_ARCH_PPC && !V8_INTERPRETED_REGEXP |
| 35 #include "src/regexp-macro-assembler.h" // NOLINT |
| 36 #include "src/ppc/regexp-macro-assembler-ppc.h" // NOLINT |
| 37 #endif |
34 #if V8_TARGET_ARCH_ARM && !V8_INTERPRETED_REGEXP | 38 #if V8_TARGET_ARCH_ARM && !V8_INTERPRETED_REGEXP |
35 #include "src/regexp-macro-assembler.h" // NOLINT | 39 #include "src/regexp-macro-assembler.h" // NOLINT |
36 #include "src/arm/regexp-macro-assembler-arm.h" // NOLINT | 40 #include "src/arm/regexp-macro-assembler-arm.h" // NOLINT |
37 #endif | 41 #endif |
38 #if V8_TARGET_ARCH_MIPS && !V8_INTERPRETED_REGEXP | 42 #if V8_TARGET_ARCH_MIPS && !V8_INTERPRETED_REGEXP |
39 #include "src/regexp-macro-assembler.h" // NOLINT | 43 #include "src/regexp-macro-assembler.h" // NOLINT |
40 #include "src/mips/regexp-macro-assembler-mips.h" // NOLINT | 44 #include "src/mips/regexp-macro-assembler-mips.h" // NOLINT |
41 #endif | 45 #endif |
42 #if V8_TARGET_ARCH_MIPS64 && !V8_INTERPRETED_REGEXP | 46 #if V8_TARGET_ARCH_MIPS64 && !V8_INTERPRETED_REGEXP |
43 #include "src/regexp-macro-assembler.h" | 47 #include "src/regexp-macro-assembler.h" |
44 #include "src/mips64/regexp-macro-assembler-mips64.h" | 48 #include "src/mips64/regexp-macro-assembler-mips64.h" |
45 #endif | 49 #endif |
| 50 #include "src/full-codegen.h" |
46 | 51 |
47 namespace v8 { | 52 namespace v8 { |
48 namespace internal { | 53 namespace internal { |
49 | 54 |
50 | 55 |
51 Heap::Heap() | 56 Heap::Heap() |
52 : amount_of_external_allocated_memory_(0), | 57 : amount_of_external_allocated_memory_(0), |
53 amount_of_external_allocated_memory_at_last_global_gc_(0), | 58 amount_of_external_allocated_memory_at_last_global_gc_(0), |
54 isolate_(NULL), | 59 isolate_(NULL), |
55 code_range_size_(0), | 60 code_range_size_(0), |
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 PrintF("[IncrementalMarking] Scavenge during marking.\n"); | 812 PrintF("[IncrementalMarking] Scavenge during marking.\n"); |
808 } | 813 } |
809 } | 814 } |
810 | 815 |
811 if (collector == MARK_COMPACTOR && | 816 if (collector == MARK_COMPACTOR && |
812 !mark_compact_collector()->abort_incremental_marking() && | 817 !mark_compact_collector()->abort_incremental_marking() && |
813 !incremental_marking()->IsStopped() && | 818 !incremental_marking()->IsStopped() && |
814 !incremental_marking()->should_hurry() && | 819 !incremental_marking()->should_hurry() && |
815 FLAG_incremental_marking_steps) { | 820 FLAG_incremental_marking_steps) { |
816 // Make progress in incremental marking. | 821 // Make progress in incremental marking. |
817 const intptr_t kStepSizeWhenDelayedByScavenge = 1 * MB; | 822 const intptr_t kStepSizeWhenDelayedByScavenge = 1 * MB * |
| 823 FullCodeGenerator::kCodeSizeMultiplier / 100; |
818 incremental_marking()->Step(kStepSizeWhenDelayedByScavenge, | 824 incremental_marking()->Step(kStepSizeWhenDelayedByScavenge, |
819 IncrementalMarking::NO_GC_VIA_STACK_GUARD); | 825 IncrementalMarking::NO_GC_VIA_STACK_GUARD); |
820 if (!incremental_marking()->IsComplete() && !FLAG_gc_global) { | 826 if (!incremental_marking()->IsComplete() && !FLAG_gc_global) { |
821 if (FLAG_trace_incremental_marking) { | 827 if (FLAG_trace_incremental_marking) { |
822 PrintF("[IncrementalMarking] Delaying MarkSweep.\n"); | 828 PrintF("[IncrementalMarking] Delaying MarkSweep.\n"); |
823 } | 829 } |
824 collector = SCAVENGER; | 830 collector = SCAVENGER; |
825 collector_reason = "incremental marking delaying mark-sweep"; | 831 collector_reason = "incremental marking delaying mark-sweep"; |
826 } | 832 } |
827 } | 833 } |
(...skipping 5315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6143 static_cast<int>(object_sizes_last_time_[index])); | 6149 static_cast<int>(object_sizes_last_time_[index])); |
6144 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6150 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
6145 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6151 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
6146 | 6152 |
6147 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6153 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
6148 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6154 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
6149 ClearObjectStats(); | 6155 ClearObjectStats(); |
6150 } | 6156 } |
6151 } | 6157 } |
6152 } // namespace v8::internal | 6158 } // namespace v8::internal |
OLD | NEW |