OLD | NEW |
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/platform/platform.h" | 8 #include "src/base/platform/platform.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 typedef RingBuffer<ContextDisposalEvent, kRingBufferMaxSize> | 257 typedef RingBuffer<ContextDisposalEvent, kRingBufferMaxSize> |
258 ContextDisposalEventBuffer; | 258 ContextDisposalEventBuffer; |
259 | 259 |
260 explicit GCTracer(Heap* heap); | 260 explicit GCTracer(Heap* heap); |
261 | 261 |
262 // Start collecting data. | 262 // Start collecting data. |
263 void Start(GarbageCollector collector, const char* gc_reason, | 263 void Start(GarbageCollector collector, const char* gc_reason, |
264 const char* collector_reason); | 264 const char* collector_reason); |
265 | 265 |
266 // Stop collecting data and print results. | 266 // Stop collecting data and print results. |
267 void Stop(); | 267 void Stop(GarbageCollector collector); |
268 | 268 |
269 // Log an allocation throughput event. | 269 // Log an allocation throughput event. |
270 void AddNewSpaceAllocationTime(double duration, intptr_t allocation_in_bytes); | 270 void AddNewSpaceAllocationTime(double duration, intptr_t allocation_in_bytes); |
271 | 271 |
272 void AddContextDisposalTime(double time); | 272 void AddContextDisposalTime(double time); |
273 | 273 |
274 // Log an incremental marking step. | 274 // Log an incremental marking step. |
275 void AddIncrementalMarkingStep(double duration, intptr_t bytes); | 275 void AddIncrementalMarkingStep(double duration, intptr_t bytes); |
276 | 276 |
277 // Log time spent in marking. | 277 // Log time spent in marking. |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 // different field for that. | 412 // different field for that. |
413 // TODO(hpayer): This timer right now just holds the sweeping time | 413 // TODO(hpayer): This timer right now just holds the sweeping time |
414 // of the initial atomic sweeping pause. Make sure that it accumulates | 414 // of the initial atomic sweeping pause. Make sure that it accumulates |
415 // all sweeping operations performed on the main thread. | 415 // all sweeping operations performed on the main thread. |
416 double cumulative_sweeping_duration_; | 416 double cumulative_sweeping_duration_; |
417 | 417 |
418 // Holds the new space top pointer recorded at the end of the last garbage | 418 // Holds the new space top pointer recorded at the end of the last garbage |
419 // collection. | 419 // collection. |
420 intptr_t new_space_top_after_gc_; | 420 intptr_t new_space_top_after_gc_; |
421 | 421 |
| 422 // Counts how many tracers were started without stopping. |
| 423 int start_counter_; |
| 424 |
422 DISALLOW_COPY_AND_ASSIGN(GCTracer); | 425 DISALLOW_COPY_AND_ASSIGN(GCTracer); |
423 }; | 426 }; |
424 } | 427 } |
425 } // namespace v8::internal | 428 } // namespace v8::internal |
426 | 429 |
427 #endif // V8_HEAP_GC_TRACER_H_ | 430 #endif // V8_HEAP_GC_TRACER_H_ |
OLD | NEW |