| 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 namespace v8 { | 8 namespace v8 { |
| 9 namespace internal { | 9 namespace internal { |
| 10 | 10 |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 intptr_t end_memory_size; | 164 intptr_t end_memory_size; |
| 165 | 165 |
| 166 // Total amount of space either wasted or contained in one of free lists | 166 // Total amount of space either wasted or contained in one of free lists |
| 167 // before the current GC. | 167 // before the current GC. |
| 168 intptr_t start_holes_size; | 168 intptr_t start_holes_size; |
| 169 | 169 |
| 170 // Total amount of space either wasted or contained in one of free lists | 170 // Total amount of space either wasted or contained in one of free lists |
| 171 // after the current GC. | 171 // after the current GC. |
| 172 intptr_t end_holes_size; | 172 intptr_t end_holes_size; |
| 173 | 173 |
| 174 // Size of new space objects in constructor. |
| 175 intptr_t new_space_object_size; |
| 176 |
| 174 // Number of incremental marking steps since creation of tracer. | 177 // Number of incremental marking steps since creation of tracer. |
| 175 // (value at start of event) | 178 // (value at start of event) |
| 176 int cumulative_incremental_marking_steps; | 179 int cumulative_incremental_marking_steps; |
| 177 | 180 |
| 178 // Incremental marking steps since | 181 // Incremental marking steps since |
| 179 // - last event for SCAVENGER events | 182 // - last event for SCAVENGER events |
| 180 // - last MARK_COMPACTOR event for MARK_COMPACTOR events | 183 // - last MARK_COMPACTOR event for MARK_COMPACTOR events |
| 181 int incremental_marking_steps; | 184 int incremental_marking_steps; |
| 182 | 185 |
| 183 // Bytes marked since creation of tracer (value at start of event). | 186 // Bytes marked since creation of tracer (value at start of event). |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 } | 276 } |
| 274 | 277 |
| 275 // Compute the mean step duration of the last incremental marking round. | 278 // Compute the mean step duration of the last incremental marking round. |
| 276 // Returns 0 if no incremental marking round has been completed. | 279 // Returns 0 if no incremental marking round has been completed. |
| 277 double MeanIncrementalMarkingDuration() const; | 280 double MeanIncrementalMarkingDuration() const; |
| 278 | 281 |
| 279 // Compute the max step duration of the last incremental marking round. | 282 // Compute the max step duration of the last incremental marking round. |
| 280 // Returns 0 if no incremental marking round has been completed. | 283 // Returns 0 if no incremental marking round has been completed. |
| 281 double MaxIncrementalMarkingDuration() const; | 284 double MaxIncrementalMarkingDuration() const; |
| 282 | 285 |
| 283 // Compute the average incremental marking speed in bytes/second. Returns 0 if | 286 // Compute the average incremental marking speed in bytes/millisecond. |
| 284 // no events have been recorded. | 287 // Returns 0 if no events have been recorded. |
| 285 intptr_t IncrementalMarkingSpeedInBytesPerMillisecond() const; | 288 intptr_t IncrementalMarkingSpeedInBytesPerMillisecond() const; |
| 286 | 289 |
| 290 // Compute the average scavenge speed in bytes/millisecond. |
| 291 // Returns 0 if no events have been recorded. |
| 292 intptr_t ScavengeSpeedInBytesPerMillisecond() const; |
| 293 |
| 287 private: | 294 private: |
| 288 // Print one detailed trace line in name=value format. | 295 // Print one detailed trace line in name=value format. |
| 289 // TODO(ernstm): Move to Heap. | 296 // TODO(ernstm): Move to Heap. |
| 290 void PrintNVP() const; | 297 void PrintNVP() const; |
| 291 | 298 |
| 292 // Print one trace line. | 299 // Print one trace line. |
| 293 // TODO(ernstm): Move to Heap. | 300 // TODO(ernstm): Move to Heap. |
| 294 void Print() const; | 301 void Print() const; |
| 295 | 302 |
| 296 // Compute the mean duration of the events in the given ring buffer. | 303 // Compute the mean duration of the events in the given ring buffer. |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 // of the initial atomic sweeping pause. Make sure that it accumulates | 354 // of the initial atomic sweeping pause. Make sure that it accumulates |
| 348 // all sweeping operations performed on the main thread. | 355 // all sweeping operations performed on the main thread. |
| 349 double cumulative_sweeping_duration_; | 356 double cumulative_sweeping_duration_; |
| 350 | 357 |
| 351 DISALLOW_COPY_AND_ASSIGN(GCTracer); | 358 DISALLOW_COPY_AND_ASSIGN(GCTracer); |
| 352 }; | 359 }; |
| 353 } | 360 } |
| 354 } // namespace v8::internal | 361 } // namespace v8::internal |
| 355 | 362 |
| 356 #endif // V8_HEAP_GC_TRACER_H_ | 363 #endif // V8_HEAP_GC_TRACER_H_ |
| OLD | NEW |