Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1024)

Side by Side Diff: src/heap/heap.cc

Issue 1825093002: [counters] adding runtime call timers for GC (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: adding gc timer Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/heap/gc-tracer.h ('K') | « src/heap/gc-tracer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« src/heap/gc-tracer.h ('K') | « src/heap/gc-tracer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698