| 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/objects-visiting-inl.h" | 24 #include "src/objects-visiting-inl.h" |
| 25 #include "src/objects-visiting.h" | 25 #include "src/objects-visiting.h" |
| 26 #include "src/runtime-profiler.h" | 26 #include "src/runtime-profiler.h" |
| 27 #include "src/scopeinfo.h" | 27 #include "src/scopeinfo.h" |
| 28 #include "src/snapshot.h" | 28 #include "src/snapshot.h" |
| 29 #include "src/store-buffer.h" | 29 #include "src/store-buffer.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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 818 PrintF("[IncrementalMarking] Scavenge during marking.\n"); | 823 PrintF("[IncrementalMarking] Scavenge during marking.\n"); |
| 819 } | 824 } |
| 820 } | 825 } |
| 821 | 826 |
| 822 if (collector == MARK_COMPACTOR && | 827 if (collector == MARK_COMPACTOR && |
| 823 !mark_compact_collector()->abort_incremental_marking() && | 828 !mark_compact_collector()->abort_incremental_marking() && |
| 824 !incremental_marking()->IsStopped() && | 829 !incremental_marking()->IsStopped() && |
| 825 !incremental_marking()->should_hurry() && | 830 !incremental_marking()->should_hurry() && |
| 826 FLAG_incremental_marking_steps) { | 831 FLAG_incremental_marking_steps) { |
| 827 // Make progress in incremental marking. | 832 // Make progress in incremental marking. |
| 828 const intptr_t kStepSizeWhenDelayedByScavenge = 1 * MB; | 833 const intptr_t kStepSizeWhenDelayedByScavenge = 1 * MB * |
| 834 FullCodeGenerator::kCodeSizeMultiplier / 100; |
| 829 incremental_marking()->Step(kStepSizeWhenDelayedByScavenge, | 835 incremental_marking()->Step(kStepSizeWhenDelayedByScavenge, |
| 830 IncrementalMarking::NO_GC_VIA_STACK_GUARD); | 836 IncrementalMarking::NO_GC_VIA_STACK_GUARD); |
| 831 if (!incremental_marking()->IsComplete() && !FLAG_gc_global) { | 837 if (!incremental_marking()->IsComplete() && !FLAG_gc_global) { |
| 832 if (FLAG_trace_incremental_marking) { | 838 if (FLAG_trace_incremental_marking) { |
| 833 PrintF("[IncrementalMarking] Delaying MarkSweep.\n"); | 839 PrintF("[IncrementalMarking] Delaying MarkSweep.\n"); |
| 834 } | 840 } |
| 835 collector = SCAVENGER; | 841 collector = SCAVENGER; |
| 836 collector_reason = "incremental marking delaying mark-sweep"; | 842 collector_reason = "incremental marking delaying mark-sweep"; |
| 837 } | 843 } |
| 838 } | 844 } |
| (...skipping 5391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6230 static_cast<int>(object_sizes_last_time_[index])); | 6236 static_cast<int>(object_sizes_last_time_[index])); |
| 6231 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6237 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 6232 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6238 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 6233 | 6239 |
| 6234 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6240 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 6235 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6241 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 6236 ClearObjectStats(); | 6242 ClearObjectStats(); |
| 6237 } | 6243 } |
| 6238 | 6244 |
| 6239 } } // namespace v8::internal | 6245 } } // namespace v8::internal |
| OLD | NEW |