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

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

Issue 1186903005: Add option to compute average scavenge speed w.r.t survived objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: bump limit Created 5 years, 6 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 | « no previous file | 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 private: 79 private:
80 T elements_[MAX_SIZE + 1]; 80 T elements_[MAX_SIZE + 1];
81 size_t begin_; 81 size_t begin_;
82 size_t end_; 82 size_t end_;
83 83
84 DISALLOW_COPY_AND_ASSIGN(RingBuffer); 84 DISALLOW_COPY_AND_ASSIGN(RingBuffer);
85 }; 85 };
86 86
87 87
88 enum ScavengeSpeedMode { kForAllObjects, kForSurvivedObjects };
89
90
88 // GCTracer collects and prints ONE line after each garbage collector 91 // GCTracer collects and prints ONE line after each garbage collector
89 // invocation IFF --trace_gc is used. 92 // invocation IFF --trace_gc is used.
90 // TODO(ernstm): Unit tests. 93 // TODO(ernstm): Unit tests.
91 class GCTracer { 94 class GCTracer {
92 public: 95 public:
93 class Scope { 96 class Scope {
94 public: 97 public:
95 enum ScopeId { 98 enum ScopeId {
96 EXTERNAL, 99 EXTERNAL,
97 MC_MARK, 100 MC_MARK,
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // Total amount of space either wasted or contained in one of free lists 223 // Total amount of space either wasted or contained in one of free lists
221 // before the current GC. 224 // before the current GC.
222 intptr_t start_holes_size; 225 intptr_t start_holes_size;
223 226
224 // Total amount of space either wasted or contained in one of free lists 227 // Total amount of space either wasted or contained in one of free lists
225 // after the current GC. 228 // after the current GC.
226 intptr_t end_holes_size; 229 intptr_t end_holes_size;
227 230
228 // Size of new space objects in constructor. 231 // Size of new space objects in constructor.
229 intptr_t new_space_object_size; 232 intptr_t new_space_object_size;
233 // Size of survived new space objects in desctructor.
234 intptr_t survived_new_space_object_size;
230 235
231 // Number of incremental marking steps since creation of tracer. 236 // Number of incremental marking steps since creation of tracer.
232 // (value at start of event) 237 // (value at start of event)
233 int cumulative_incremental_marking_steps; 238 int cumulative_incremental_marking_steps;
234 239
235 // Incremental marking steps since 240 // Incremental marking steps since
236 // - last event for SCAVENGER events 241 // - last event for SCAVENGER events
237 // - last INCREMENTAL_MARK_COMPACTOR event for INCREMENTAL_MARK_COMPACTOR 242 // - last INCREMENTAL_MARK_COMPACTOR event for INCREMENTAL_MARK_COMPACTOR
238 // events 243 // events
239 int incremental_marking_steps; 244 int incremental_marking_steps;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 // Compute the max step duration of the last incremental marking round. 369 // Compute the max step duration of the last incremental marking round.
365 // Returns 0 if no incremental marking round has been completed. 370 // Returns 0 if no incremental marking round has been completed.
366 double MaxIncrementalMarkingDuration() const; 371 double MaxIncrementalMarkingDuration() const;
367 372
368 // Compute the average incremental marking speed in bytes/millisecond. 373 // Compute the average incremental marking speed in bytes/millisecond.
369 // Returns 0 if no events have been recorded. 374 // Returns 0 if no events have been recorded.
370 intptr_t IncrementalMarkingSpeedInBytesPerMillisecond() const; 375 intptr_t IncrementalMarkingSpeedInBytesPerMillisecond() const;
371 376
372 // Compute the average scavenge speed in bytes/millisecond. 377 // Compute the average scavenge speed in bytes/millisecond.
373 // Returns 0 if no events have been recorded. 378 // Returns 0 if no events have been recorded.
374 intptr_t ScavengeSpeedInBytesPerMillisecond() const; 379 intptr_t ScavengeSpeedInBytesPerMillisecond(
380 ScavengeSpeedMode mode = kForAllObjects) const;
375 381
376 // Compute the average mark-sweep speed in bytes/millisecond. 382 // Compute the average mark-sweep speed in bytes/millisecond.
377 // Returns 0 if no events have been recorded. 383 // Returns 0 if no events have been recorded.
378 intptr_t MarkCompactSpeedInBytesPerMillisecond() const; 384 intptr_t MarkCompactSpeedInBytesPerMillisecond() const;
379 385
380 // Compute the average incremental mark-sweep finalize speed in 386 // Compute the average incremental mark-sweep finalize speed in
381 // bytes/millisecond. 387 // bytes/millisecond.
382 // Returns 0 if no events have been recorded. 388 // Returns 0 if no events have been recorded.
383 intptr_t FinalIncrementalMarkCompactSpeedInBytesPerMillisecond() const; 389 intptr_t FinalIncrementalMarkCompactSpeedInBytesPerMillisecond() const;
384 390
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 535
530 // Counts how many tracers were started without stopping. 536 // Counts how many tracers were started without stopping.
531 int start_counter_; 537 int start_counter_;
532 538
533 DISALLOW_COPY_AND_ASSIGN(GCTracer); 539 DISALLOW_COPY_AND_ASSIGN(GCTracer);
534 }; 540 };
535 } 541 }
536 } // namespace v8::internal 542 } // namespace v8::internal
537 543
538 #endif // V8_HEAP_GC_TRACER_H_ 544 #endif // V8_HEAP_GC_TRACER_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/gc-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698