| 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/heap/heap.h" | 5 #include "src/heap/heap.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 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 761 GCTracer::Scope gc_scope(tracer(), | 761 GCTracer::Scope gc_scope(tracer(), |
| 762 GCTracer::Scope::MC_INCREMENTAL_WEAKCLOSURE); | 762 GCTracer::Scope::MC_INCREMENTAL_WEAKCLOSURE); |
| 763 | 763 |
| 764 { | 764 { |
| 765 GCCallbacksScope scope(this); | 765 GCCallbacksScope scope(this); |
| 766 if (scope.CheckReenter()) { | 766 if (scope.CheckReenter()) { |
| 767 AllowHeapAllocation allow_allocation; | 767 AllowHeapAllocation allow_allocation; |
| 768 GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL); | 768 GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL); |
| 769 VMState<EXTERNAL> state(isolate_); | 769 VMState<EXTERNAL> state(isolate_); |
| 770 HandleScope handle_scope(isolate_); | 770 HandleScope handle_scope(isolate_); |
| 771 // TODO(mlippautz): Report kGCTypeIncremental once blink updates its | 771 CallGCPrologueCallbacks(kGCTypeIncrementalMarking, kNoGCCallbackFlags); |
| 772 // filtering. | |
| 773 CallGCPrologueCallbacks(kGCTypeMarkSweepCompact, kNoGCCallbackFlags); | |
| 774 } | 772 } |
| 775 } | 773 } |
| 776 incremental_marking()->MarkObjectGroups(); | 774 incremental_marking()->MarkObjectGroups(); |
| 777 { | 775 { |
| 778 GCCallbacksScope scope(this); | 776 GCCallbacksScope scope(this); |
| 779 if (scope.CheckReenter()) { | 777 if (scope.CheckReenter()) { |
| 780 AllowHeapAllocation allow_allocation; | 778 AllowHeapAllocation allow_allocation; |
| 781 GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL); | 779 GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL); |
| 782 VMState<EXTERNAL> state(isolate_); | 780 VMState<EXTERNAL> state(isolate_); |
| 783 HandleScope handle_scope(isolate_); | 781 HandleScope handle_scope(isolate_); |
| 784 // TODO(mlippautz): Report kGCTypeIncremental once blink updates its | 782 CallGCEpilogueCallbacks(kGCTypeIncrementalMarking, kNoGCCallbackFlags); |
| 785 // filtering. | |
| 786 CallGCEpilogueCallbacks(kGCTypeMarkSweepCompact, kNoGCCallbackFlags); | |
| 787 } | 783 } |
| 788 } | 784 } |
| 789 } | 785 } |
| 790 | 786 |
| 791 | 787 |
| 792 void Heap::CollectAllGarbage(int flags, const char* gc_reason, | 788 void Heap::CollectAllGarbage(int flags, const char* gc_reason, |
| 793 const v8::GCCallbackFlags gc_callback_flags) { | 789 const v8::GCCallbackFlags gc_callback_flags) { |
| 794 // Since we are ignoring the return value, the exact choice of space does | 790 // Since we are ignoring the return value, the exact choice of space does |
| 795 // not matter, so long as we do not specify NEW_SPACE, which would not | 791 // not matter, so long as we do not specify NEW_SPACE, which would not |
| 796 // cause a full GC. | 792 // cause a full GC. |
| (...skipping 5979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6776 *object_type = "CODE_TYPE"; \ | 6772 *object_type = "CODE_TYPE"; \ |
| 6777 *object_sub_type = "CODE_AGE/" #name; \ | 6773 *object_sub_type = "CODE_AGE/" #name; \ |
| 6778 return true; | 6774 return true; |
| 6779 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) | 6775 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) |
| 6780 #undef COMPARE_AND_RETURN_NAME | 6776 #undef COMPARE_AND_RETURN_NAME |
| 6781 } | 6777 } |
| 6782 return false; | 6778 return false; |
| 6783 } | 6779 } |
| 6784 } // namespace internal | 6780 } // namespace internal |
| 6785 } // namespace v8 | 6781 } // namespace v8 |
| OLD | NEW |