Chromium Code Reviews| 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/ast/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" |
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 821 TRACE_EVENT0("v8", "V8.GCIncrementalMarkingFinalize"); | 821 TRACE_EVENT0("v8", "V8.GCIncrementalMarkingFinalize"); |
| 822 | 822 |
| 823 { | 823 { |
| 824 GCCallbacksScope scope(this); | 824 GCCallbacksScope scope(this); |
| 825 if (scope.CheckReenter()) { | 825 if (scope.CheckReenter()) { |
| 826 AllowHeapAllocation allow_allocation; | 826 AllowHeapAllocation allow_allocation; |
| 827 GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL); | 827 GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL); |
| 828 VMState<EXTERNAL> state(isolate_); | 828 VMState<EXTERNAL> state(isolate_); |
| 829 HandleScope handle_scope(isolate_); | 829 HandleScope handle_scope(isolate_); |
| 830 CallGCPrologueCallbacks(kGCTypeIncrementalMarking, kNoGCCallbackFlags); | 830 CallGCPrologueCallbacks(kGCTypeIncrementalMarking, kNoGCCallbackFlags); |
| 831 if (FLAG_trace_object_groups) { | |
|
ulan
2016/03/09 14:37:49
Let's move it in CallGCPrologueCallbacks and we ne
Marcel Hlopko
2016/03/09 17:20:23
Done.
| |
| 832 isolate_->global_handles()->PrintObjectGroups(); | |
| 833 } | |
| 831 } | 834 } |
| 832 } | 835 } |
| 833 incremental_marking()->FinalizeIncrementally(); | 836 incremental_marking()->FinalizeIncrementally(); |
| 834 { | 837 { |
| 835 GCCallbacksScope scope(this); | 838 GCCallbacksScope scope(this); |
| 836 if (scope.CheckReenter()) { | 839 if (scope.CheckReenter()) { |
| 837 AllowHeapAllocation allow_allocation; | 840 AllowHeapAllocation allow_allocation; |
| 838 GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL); | 841 GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL); |
| 839 VMState<EXTERNAL> state(isolate_); | 842 VMState<EXTERNAL> state(isolate_); |
| 840 HandleScope handle_scope(isolate_); | 843 HandleScope handle_scope(isolate_); |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1278 collector == MARK_COMPACTOR ? kGCTypeMarkSweepCompact : kGCTypeScavenge; | 1281 collector == MARK_COMPACTOR ? kGCTypeMarkSweepCompact : kGCTypeScavenge; |
| 1279 | 1282 |
| 1280 { | 1283 { |
| 1281 GCCallbacksScope scope(this); | 1284 GCCallbacksScope scope(this); |
| 1282 if (scope.CheckReenter()) { | 1285 if (scope.CheckReenter()) { |
| 1283 AllowHeapAllocation allow_allocation; | 1286 AllowHeapAllocation allow_allocation; |
| 1284 GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL); | 1287 GCTracer::Scope scope(tracer(), GCTracer::Scope::EXTERNAL); |
| 1285 VMState<EXTERNAL> state(isolate_); | 1288 VMState<EXTERNAL> state(isolate_); |
| 1286 HandleScope handle_scope(isolate_); | 1289 HandleScope handle_scope(isolate_); |
| 1287 CallGCPrologueCallbacks(gc_type, kNoGCCallbackFlags); | 1290 CallGCPrologueCallbacks(gc_type, kNoGCCallbackFlags); |
| 1291 if (FLAG_trace_object_groups) { | |
|
ulan
2016/03/09 14:37:49
See comment above.
Marcel Hlopko
2016/03/09 17:20:23
Done.
| |
| 1292 isolate_->global_handles()->PrintObjectGroups(); | |
| 1293 } | |
| 1288 } | 1294 } |
| 1289 } | 1295 } |
| 1290 | 1296 |
| 1291 EnsureFromSpaceIsCommitted(); | 1297 EnsureFromSpaceIsCommitted(); |
| 1292 | 1298 |
| 1293 int start_new_space_size = Heap::new_space()->SizeAsInt(); | 1299 int start_new_space_size = Heap::new_space()->SizeAsInt(); |
| 1294 | 1300 |
| 1295 if (IsHighSurvivalRate()) { | 1301 if (IsHighSurvivalRate()) { |
| 1296 // We speed up the incremental marker if it is running so that it | 1302 // We speed up the incremental marker if it is running so that it |
| 1297 // does not fall behind the rate of promotion, which would cause a | 1303 // does not fall behind the rate of promotion, which would cause a |
| (...skipping 5045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6343 } | 6349 } |
| 6344 | 6350 |
| 6345 | 6351 |
| 6346 // static | 6352 // static |
| 6347 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6353 int Heap::GetStaticVisitorIdForMap(Map* map) { |
| 6348 return StaticVisitorBase::GetVisitorId(map); | 6354 return StaticVisitorBase::GetVisitorId(map); |
| 6349 } | 6355 } |
| 6350 | 6356 |
| 6351 } // namespace internal | 6357 } // namespace internal |
| 6352 } // namespace v8 | 6358 } // namespace v8 |
| OLD | NEW |