Chromium Code Reviews| Index: src/gc-tracer.h |
| diff --git a/src/gc-tracer.h b/src/gc-tracer.h |
| index a9e02b3118daabca29bc07174d17d43c2ae223db..db10d28cfc4257840ae96b123aec44df59ac2989 100644 |
| --- a/src/gc-tracer.h |
| +++ b/src/gc-tracer.h |
| @@ -202,6 +202,35 @@ class GCTracer BASE_EMBEDDED { |
| // Log an incremental marking step. |
| void AddIncrementalMarkingStep(double duration); |
| + // Compute the mean duration of the last scavenger events. |
|
Hannes Payer (out of office)
2014/07/24 15:16:40
Returns 0 if no events have been recorded.
ernstm
2014/07/24 15:22:39
Done.
|
| + double MeanScavengerDuration() const { |
| + return MeanDuration(scavenger_events_); |
| + } |
| + |
| + // Compute the max duratino of the last scavenger events. Returns 0 if no |
|
Hannes Payer (out of office)
2014/07/24 15:16:40
duration
ernstm
2014/07/24 15:22:39
Done.
|
| + // events have been recorded. |
| + double MaxScavengerDuration() const { return MaxDuration(scavenger_events_); } |
| + |
| + // Compute the mean duration of the last mark compactor events. Returns 0 if |
| + // no events have been recorded. |
| + double MeanMarkCompactorDuration() const { |
| + return MeanDuration(mark_compactor_events_); |
| + } |
| + |
| + // Compute the max duration of the last mark compactor events. Return 0 if no |
| + // events have been recorded. |
| + double MaxMarkCompactorDuration() const { |
| + return MaxDuration(mark_compactor_events_); |
| + } |
| + |
| + // Compute the mean step duration of the last incremental marking round. |
| + // Returns 0 if no incremental marking round has been completed. |
| + double MeanIncrementalMarkingDuration() const; |
| + |
| + // Compute the max step duration of the last incremental marking round. |
| + // Returns 0 if no incremental marking round has been completed. |
| + double MaxIncrementalMarkingDuration() const; |
| + |
| private: |
| // Print one detailed trace line in name=value format. |
| // TODO(ernstm): Move to Heap. |
| @@ -211,6 +240,12 @@ class GCTracer BASE_EMBEDDED { |
| // TODO(ernstm): Move to Heap. |
| void Print() const; |
| + // Compute the mean duration of the events in the given ring buffer. |
| + double MeanDuration(const EventBuffer& events) const; |
| + |
| + // Compute the max duration of the events in the given ring buffer. |
| + double MaxDuration(const EventBuffer& events) const; |
| + |
| // Pointer to the heap that owns this tracer. |
| Heap* heap_; |