Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(286)

Side by Side Diff: src/heap/gc-tracer.h

Issue 1297153002: Version 4.5.103.23 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.5
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap/gc-tracer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 typedef RingBuffer<Event, kRingBufferMaxSize> EventBuffer; 285 typedef RingBuffer<Event, kRingBufferMaxSize> EventBuffer;
286 286
287 typedef RingBuffer<AllocationEvent, kRingBufferMaxSize> AllocationEventBuffer; 287 typedef RingBuffer<AllocationEvent, kRingBufferMaxSize> AllocationEventBuffer;
288 288
289 typedef RingBuffer<ContextDisposalEvent, kRingBufferMaxSize> 289 typedef RingBuffer<ContextDisposalEvent, kRingBufferMaxSize>
290 ContextDisposalEventBuffer; 290 ContextDisposalEventBuffer;
291 291
292 typedef RingBuffer<SurvivalEvent, kRingBufferMaxSize> SurvivalEventBuffer; 292 typedef RingBuffer<SurvivalEvent, kRingBufferMaxSize> SurvivalEventBuffer;
293 293
294 static const int kThroughputTimeFrameMs = 5000;
295
294 explicit GCTracer(Heap* heap); 296 explicit GCTracer(Heap* heap);
295 297
296 // Start collecting data. 298 // Start collecting data.
297 void Start(GarbageCollector collector, const char* gc_reason, 299 void Start(GarbageCollector collector, const char* gc_reason,
298 const char* collector_reason); 300 const char* collector_reason);
299 301
300 // Stop collecting data and print results. 302 // Stop collecting data and print results.
301 void Stop(GarbageCollector collector); 303 void Stop(GarbageCollector collector);
302 304
303 // Sample and accumulate bytes allocated since the last GC. 305 // Sample and accumulate bytes allocated since the last GC.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 // last time_ms milliseconds. 403 // last time_ms milliseconds.
402 // Returns 0 if no allocation events have been recorded. 404 // Returns 0 if no allocation events have been recorded.
403 size_t OldGenerationAllocationThroughputInBytesPerMillisecond( 405 size_t OldGenerationAllocationThroughputInBytesPerMillisecond(
404 double time_ms = 0) const; 406 double time_ms = 0) const;
405 407
406 // Allocation throughput in heap in bytes/millisecond in the last time_ms 408 // Allocation throughput in heap in bytes/millisecond in the last time_ms
407 // milliseconds. 409 // milliseconds.
408 // Returns 0 if no allocation events have been recorded. 410 // Returns 0 if no allocation events have been recorded.
409 size_t AllocationThroughputInBytesPerMillisecond(double time_ms) const; 411 size_t AllocationThroughputInBytesPerMillisecond(double time_ms) const;
410 412
413 // Allocation throughput in heap in bytes/milliseconds in
414 // the last five seconds.
Michael Lippautz 2015/08/18 06:53:05 Something for ToT: Should be kThroughputTimeFrameM
415 // Returns 0 if no allocation events have been recorded.
416 size_t CurrentAllocationThroughputInBytesPerMillisecond() const;
417
411 // Allocation throughput in old generation in bytes/milliseconds in 418 // Allocation throughput in old generation in bytes/milliseconds in
412 // the last five seconds. 419 // the last five seconds.
413 // Returns 0 if no allocation events have been recorded. 420 // Returns 0 if no allocation events have been recorded.
414 size_t CurrentOldGenerationAllocationThroughputInBytesPerMillisecond() const; 421 size_t CurrentOldGenerationAllocationThroughputInBytesPerMillisecond() const;
415 422
416 // Computes the context disposal rate in milliseconds. It takes the time 423 // Computes the context disposal rate in milliseconds. It takes the time
417 // frame of the first recorded context disposal to the current time and 424 // frame of the first recorded context disposal to the current time and
418 // divides it by the number of recorded events. 425 // divides it by the number of recorded events.
419 // Returns 0 if no events have been recorded. 426 // Returns 0 if no events have been recorded.
420 double ContextDisposalRateInMilliseconds() const; 427 double ContextDisposalRateInMilliseconds() const;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 542
536 // Counts how many tracers were started without stopping. 543 // Counts how many tracers were started without stopping.
537 int start_counter_; 544 int start_counter_;
538 545
539 DISALLOW_COPY_AND_ASSIGN(GCTracer); 546 DISALLOW_COPY_AND_ASSIGN(GCTracer);
540 }; 547 };
541 } 548 }
542 } // namespace v8::internal 549 } // namespace v8::internal
543 550
544 #endif // V8_HEAP_GC_TRACER_H_ 551 #endif // V8_HEAP_GC_TRACER_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap/gc-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698