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 991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1002 { | 1002 { |
1003 tracer()->Start(collector, gc_reason, collector_reason); | 1003 tracer()->Start(collector, gc_reason, collector_reason); |
1004 DCHECK(AllowHeapAllocation::IsAllowed()); | 1004 DCHECK(AllowHeapAllocation::IsAllowed()); |
1005 DisallowHeapAllocation no_allocation_during_gc; | 1005 DisallowHeapAllocation no_allocation_during_gc; |
1006 GarbageCollectionPrologue(); | 1006 GarbageCollectionPrologue(); |
1007 | 1007 |
1008 { | 1008 { |
1009 HistogramTimer* gc_type_timer = GCTypeTimer(collector); | 1009 HistogramTimer* gc_type_timer = GCTypeTimer(collector); |
1010 HistogramTimerScope histogram_timer_scope(gc_type_timer); | 1010 HistogramTimerScope histogram_timer_scope(gc_type_timer); |
1011 TRACE_EVENT0("v8", gc_type_timer->name()); | 1011 TRACE_EVENT0("v8", gc_type_timer->name()); |
1012 RuntimeCallTimerScope timer( | |
ulan
2016/03/23 13:59:56
Please move this to GcTracer::Start / Stop similar
| |
1013 isolate(), &isolate()->counters()->runtime_call_stats()->GC); | |
1012 | 1014 |
1013 next_gc_likely_to_collect_more = | 1015 next_gc_likely_to_collect_more = |
1014 PerformGarbageCollection(collector, gc_callback_flags); | 1016 PerformGarbageCollection(collector, gc_callback_flags); |
1015 } | 1017 } |
1016 | 1018 |
1017 GarbageCollectionEpilogue(); | 1019 GarbageCollectionEpilogue(); |
1018 if (collector == MARK_COMPACTOR && FLAG_track_detached_contexts) { | 1020 if (collector == MARK_COMPACTOR && FLAG_track_detached_contexts) { |
1019 isolate()->CheckDetachedContextsAfterGC(); | 1021 isolate()->CheckDetachedContextsAfterGC(); |
1020 } | 1022 } |
1021 | 1023 |
(...skipping 5391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6413 } | 6415 } |
6414 | 6416 |
6415 | 6417 |
6416 // static | 6418 // static |
6417 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6419 int Heap::GetStaticVisitorIdForMap(Map* map) { |
6418 return StaticVisitorBase::GetVisitorId(map); | 6420 return StaticVisitorBase::GetVisitorId(map); |
6419 } | 6421 } |
6420 | 6422 |
6421 } // namespace internal | 6423 } // namespace internal |
6422 } // namespace v8 | 6424 } // namespace v8 |
OLD | NEW |