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

Side by Side Diff: src/heap/gc-tracer.h

Issue 2416243002: Make unittests work in component build (Closed)
Patch Set: updates Created 4 years, 2 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
« no previous file with comments | « src/heap/gc-idle-time-handler.h ('k') | src/heap/heap.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #ifndef V8_HEAP_GC_TRACER_H_ 5 #ifndef V8_HEAP_GC_TRACER_H_
6 #define V8_HEAP_GC_TRACER_H_ 6 #define V8_HEAP_GC_TRACER_H_
7 7
8 #include "src/base/compiler-specific.h" 8 #include "src/base/compiler-specific.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/base/ring-buffer.h" 10 #include "src/base/ring-buffer.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 F(SCAVENGER_WEAK) 88 F(SCAVENGER_WEAK)
89 89
90 #define TRACE_GC(tracer, scope_id) \ 90 #define TRACE_GC(tracer, scope_id) \
91 GCTracer::Scope::ScopeId gc_tracer_scope_id(scope_id); \ 91 GCTracer::Scope::ScopeId gc_tracer_scope_id(scope_id); \
92 GCTracer::Scope gc_tracer_scope(tracer, gc_tracer_scope_id); \ 92 GCTracer::Scope gc_tracer_scope(tracer, gc_tracer_scope_id); \
93 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"), \ 93 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"), \
94 GCTracer::Scope::Name(gc_tracer_scope_id)) 94 GCTracer::Scope::Name(gc_tracer_scope_id))
95 95
96 // GCTracer collects and prints ONE line after each garbage collector 96 // GCTracer collects and prints ONE line after each garbage collector
97 // invocation IFF --trace_gc is used. 97 // invocation IFF --trace_gc is used.
98 class GCTracer { 98 class V8_EXPORT_PRIVATE GCTracer {
99 public: 99 public:
100 struct IncrementalMarkingInfos { 100 struct IncrementalMarkingInfos {
101 IncrementalMarkingInfos() : duration(0), longest_step(0), steps(0) {} 101 IncrementalMarkingInfos() : duration(0), longest_step(0), steps(0) {}
102 102
103 void Update(double duration) { 103 void Update(double duration) {
104 steps++; 104 steps++;
105 this->duration += duration; 105 this->duration += duration;
106 if (duration > longest_step) { 106 if (duration > longest_step) {
107 longest_step = duration; 107 longest_step = duration;
108 } 108 }
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 base::RingBuffer<BytesAndDuration> recorded_old_generation_allocations_; 425 base::RingBuffer<BytesAndDuration> recorded_old_generation_allocations_;
426 base::RingBuffer<double> recorded_context_disposal_times_; 426 base::RingBuffer<double> recorded_context_disposal_times_;
427 base::RingBuffer<double> recorded_survival_ratios_; 427 base::RingBuffer<double> recorded_survival_ratios_;
428 428
429 DISALLOW_COPY_AND_ASSIGN(GCTracer); 429 DISALLOW_COPY_AND_ASSIGN(GCTracer);
430 }; 430 };
431 } // namespace internal 431 } // namespace internal
432 } // namespace v8 432 } // namespace v8
433 433
434 #endif // V8_HEAP_GC_TRACER_H_ 434 #endif // V8_HEAP_GC_TRACER_H_
OLDNEW
« no previous file with comments | « src/heap/gc-idle-time-handler.h ('k') | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698