| 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 double pure_incremental_marking_duration; | 281 double pure_incremental_marking_duration; |
| 282 | 282 |
| 283 // Longest incremental marking step since start of marking. | 283 // Longest incremental marking step since start of marking. |
| 284 // (value at start of event) | 284 // (value at start of event) |
| 285 double longest_incremental_marking_step; | 285 double longest_incremental_marking_step; |
| 286 | 286 |
| 287 // Amounts of time spent in different scopes during GC. | 287 // Amounts of time spent in different scopes during GC. |
| 288 double scopes[Scope::NUMBER_OF_SCOPES]; | 288 double scopes[Scope::NUMBER_OF_SCOPES]; |
| 289 }; | 289 }; |
| 290 | 290 |
| 291 static const int kThroughputTimeFrameMs = 5000; |
| 292 |
| 291 static const size_t kRingBufferMaxSize = 10; | 293 static const size_t kRingBufferMaxSize = 10; |
| 292 | 294 |
| 293 typedef RingBuffer<Event, kRingBufferMaxSize> EventBuffer; | 295 typedef RingBuffer<Event, kRingBufferMaxSize> EventBuffer; |
| 294 | 296 |
| 295 typedef RingBuffer<AllocationEvent, kRingBufferMaxSize> AllocationEventBuffer; | 297 typedef RingBuffer<AllocationEvent, kRingBufferMaxSize> AllocationEventBuffer; |
| 296 | 298 |
| 297 typedef RingBuffer<ContextDisposalEvent, kRingBufferMaxSize> | 299 typedef RingBuffer<ContextDisposalEvent, kRingBufferMaxSize> |
| 298 ContextDisposalEventBuffer; | 300 ContextDisposalEventBuffer; |
| 299 | 301 |
| 300 typedef RingBuffer<SurvivalEvent, kRingBufferMaxSize> SurvivalEventBuffer; | 302 typedef RingBuffer<SurvivalEvent, kRingBufferMaxSize> SurvivalEventBuffer; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 // last time_ms milliseconds. | 411 // last time_ms milliseconds. |
| 410 // Returns 0 if no allocation events have been recorded. | 412 // Returns 0 if no allocation events have been recorded. |
| 411 size_t OldGenerationAllocationThroughputInBytesPerMillisecond( | 413 size_t OldGenerationAllocationThroughputInBytesPerMillisecond( |
| 412 double time_ms = 0) const; | 414 double time_ms = 0) const; |
| 413 | 415 |
| 414 // Allocation throughput in heap in bytes/millisecond in the last time_ms | 416 // Allocation throughput in heap in bytes/millisecond in the last time_ms |
| 415 // milliseconds. | 417 // milliseconds. |
| 416 // Returns 0 if no allocation events have been recorded. | 418 // Returns 0 if no allocation events have been recorded. |
| 417 size_t AllocationThroughputInBytesPerMillisecond(double time_ms) const; | 419 size_t AllocationThroughputInBytesPerMillisecond(double time_ms) const; |
| 418 | 420 |
| 421 // Allocation throughput in new space in bytes/milliseconds in |
| 422 // the last five seconds. |
| 423 // Returns 0 if no allocation events have been recorded. |
| 424 size_t CurrentNewSpaceAllocationThroughputInBytesPerMillisecond() const; |
| 425 |
| 419 // Allocation throughput in old generation in bytes/milliseconds in | 426 // Allocation throughput in old generation in bytes/milliseconds in |
| 420 // the last five seconds. | 427 // the last five seconds. |
| 421 // Returns 0 if no allocation events have been recorded. | 428 // Returns 0 if no allocation events have been recorded. |
| 422 size_t CurrentOldGenerationAllocationThroughputInBytesPerMillisecond() const; | 429 size_t CurrentOldGenerationAllocationThroughputInBytesPerMillisecond() const; |
| 423 | 430 |
| 424 // Computes the context disposal rate in milliseconds. It takes the time | 431 // Computes the context disposal rate in milliseconds. It takes the time |
| 425 // frame of the first recorded context disposal to the current time and | 432 // frame of the first recorded context disposal to the current time and |
| 426 // divides it by the number of recorded events. | 433 // divides it by the number of recorded events. |
| 427 // Returns 0 if no events have been recorded. | 434 // Returns 0 if no events have been recorded. |
| 428 double ContextDisposalRateInMilliseconds() const; | 435 double ContextDisposalRateInMilliseconds() const; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 | 550 |
| 544 // Counts how many tracers were started without stopping. | 551 // Counts how many tracers were started without stopping. |
| 545 int start_counter_; | 552 int start_counter_; |
| 546 | 553 |
| 547 DISALLOW_COPY_AND_ASSIGN(GCTracer); | 554 DISALLOW_COPY_AND_ASSIGN(GCTracer); |
| 548 }; | 555 }; |
| 549 } | 556 } |
| 550 } // namespace v8::internal | 557 } // namespace v8::internal |
| 551 | 558 |
| 552 #endif // V8_HEAP_GC_TRACER_H_ | 559 #endif // V8_HEAP_GC_TRACER_H_ |
| OLD | NEW |