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 #include "src/counters.h" | 9 #include "src/counters.h" |
10 #include "src/globals.h" | 10 #include "src/globals.h" |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 // Log time spent in sweeping on main thread. | 369 // Log time spent in sweeping on main thread. |
370 void AddSweepingTime(double duration) { | 370 void AddSweepingTime(double duration) { |
371 cumulative_sweeping_duration_ += duration; | 371 cumulative_sweeping_duration_ += duration; |
372 } | 372 } |
373 | 373 |
374 // Time spent in sweeping on main thread. | 374 // Time spent in sweeping on main thread. |
375 double cumulative_sweeping_duration() const { | 375 double cumulative_sweeping_duration() const { |
376 return cumulative_sweeping_duration_; | 376 return cumulative_sweeping_duration_; |
377 } | 377 } |
378 | 378 |
379 // Compute the mean duration of the last scavenger events. Returns 0 if no | |
380 // events have been recorded. | |
381 double MeanScavengerDuration() const { | |
382 return MeanDuration(scavenger_events_); | |
383 } | |
384 | |
385 // Compute the max duration of the last scavenger events. Returns 0 if no | |
386 // events have been recorded. | |
387 double MaxScavengerDuration() const { return MaxDuration(scavenger_events_); } | |
388 | |
389 // Compute the mean duration of the last mark compactor events. Returns 0 if | |
390 // no events have been recorded. | |
391 double MeanMarkCompactorDuration() const { | |
392 return MeanDuration(mark_compactor_events_); | |
393 } | |
394 | |
395 // Compute the max duration of the last mark compactor events. Return 0 if no | |
396 // events have been recorded. | |
397 double MaxMarkCompactorDuration() const { | |
398 return MaxDuration(mark_compactor_events_); | |
399 } | |
400 | |
401 // Compute the mean duration of the last incremental mark compactor | |
402 // events. Returns 0 if no events have been recorded. | |
403 double MeanIncrementalMarkCompactorDuration() const { | |
404 return MeanDuration(incremental_mark_compactor_events_); | |
405 } | |
406 | |
407 // Compute the mean step duration of the last incremental marking round. | |
408 // Returns 0 if no incremental marking round has been completed. | |
409 double MeanIncrementalMarkingDuration() const; | |
410 | |
411 // Compute the max step duration of the last incremental marking round. | |
412 // Returns 0 if no incremental marking round has been completed. | |
413 double MaxIncrementalMarkingDuration() const; | |
414 | |
415 // Compute the average incremental marking speed in bytes/millisecond. | 379 // Compute the average incremental marking speed in bytes/millisecond. |
416 // Returns 0 if no events have been recorded. | 380 // Returns 0 if no events have been recorded. |
417 intptr_t IncrementalMarkingSpeedInBytesPerMillisecond() const; | 381 intptr_t IncrementalMarkingSpeedInBytesPerMillisecond() const; |
418 | 382 |
419 // Compute the average scavenge speed in bytes/millisecond. | 383 // Compute the average scavenge speed in bytes/millisecond. |
420 // Returns 0 if no events have been recorded. | 384 // Returns 0 if no events have been recorded. |
421 intptr_t ScavengeSpeedInBytesPerMillisecond( | 385 intptr_t ScavengeSpeedInBytesPerMillisecond( |
422 ScavengeSpeedMode mode = kForAllObjects) const; | 386 ScavengeSpeedMode mode = kForAllObjects) const; |
423 | 387 |
424 // Compute the average compaction speed in bytes/millisecond. | 388 // Compute the average compaction speed in bytes/millisecond. |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 | 580 |
617 // Separate timer used for --runtime_call_stats | 581 // Separate timer used for --runtime_call_stats |
618 RuntimeCallTimer timer_; | 582 RuntimeCallTimer timer_; |
619 | 583 |
620 DISALLOW_COPY_AND_ASSIGN(GCTracer); | 584 DISALLOW_COPY_AND_ASSIGN(GCTracer); |
621 }; | 585 }; |
622 } // namespace internal | 586 } // namespace internal |
623 } // namespace v8 | 587 } // namespace v8 |
624 | 588 |
625 #endif // V8_HEAP_GC_TRACER_H_ | 589 #endif // V8_HEAP_GC_TRACER_H_ |
OLD | NEW |