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

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

Issue 2293883002: Make incremental marking tracing format consistent with GC tracing. (Closed)
Patch Set: Move marking restart function to inl file Created 4 years, 3 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/compiler-specific.h" 8 #include "src/base/compiler-specific.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/counters.h" 10 #include "src/counters.h"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // events. 374 // events.
375 // Returns 0 if no events have been recorded. 375 // Returns 0 if no events have been recorded.
376 double AverageSurvivalRatio() const; 376 double AverageSurvivalRatio() const;
377 377
378 // Returns true if at least one survival event was recorded. 378 // Returns true if at least one survival event was recorded.
379 bool SurvivalEventsRecorded() const; 379 bool SurvivalEventsRecorded() const;
380 380
381 // Discard all recorded survival events. 381 // Discard all recorded survival events.
382 void ResetSurvivalEvents(); 382 void ResetSurvivalEvents();
383 383
384 void NotifyIncrementalMarkingStart();
385
384 V8_INLINE void AddScopeSample(Scope::ScopeId scope, double duration) { 386 V8_INLINE void AddScopeSample(Scope::ScopeId scope, double duration) {
385 DCHECK(scope < Scope::NUMBER_OF_SCOPES); 387 DCHECK(scope < Scope::NUMBER_OF_SCOPES);
386 if (scope >= Scope::FIRST_INCREMENTAL_SCOPE && 388 if (scope >= Scope::FIRST_INCREMENTAL_SCOPE &&
387 scope <= Scope::LAST_INCREMENTAL_SCOPE) { 389 scope <= Scope::LAST_INCREMENTAL_SCOPE) {
388 incremental_marking_scopes_[scope].Update(duration); 390 incremental_marking_scopes_[scope].Update(duration);
389 } else { 391 } else {
390 current_.scopes[scope] += duration; 392 current_.scopes[scope] += duration;
391 } 393 }
392 } 394 }
393 395
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 471
470 // Total sweeping time on the main thread. 472 // Total sweeping time on the main thread.
471 // This timer is precise when run with --print-cumulative-gc-stat 473 // This timer is precise when run with --print-cumulative-gc-stat
472 // TODO(hpayer): Account for sweeping time on sweeper threads. Add a 474 // TODO(hpayer): Account for sweeping time on sweeper threads. Add a
473 // different field for that. 475 // different field for that.
474 // TODO(hpayer): This timer right now just holds the sweeping time 476 // TODO(hpayer): This timer right now just holds the sweeping time
475 // of the initial atomic sweeping pause. Make sure that it accumulates 477 // of the initial atomic sweeping pause. Make sure that it accumulates
476 // all sweeping operations performed on the main thread. 478 // all sweeping operations performed on the main thread.
477 double cumulative_sweeping_duration_; 479 double cumulative_sweeping_duration_;
478 480
481 double incremental_marking_start_time_;
482
479 // Timestamp and allocation counter at the last sampled allocation event. 483 // Timestamp and allocation counter at the last sampled allocation event.
480 double allocation_time_ms_; 484 double allocation_time_ms_;
481 size_t new_space_allocation_counter_bytes_; 485 size_t new_space_allocation_counter_bytes_;
482 size_t old_generation_allocation_counter_bytes_; 486 size_t old_generation_allocation_counter_bytes_;
483 487
484 // Accumulated duration and allocated bytes since the last GC. 488 // Accumulated duration and allocated bytes since the last GC.
485 double allocation_duration_since_gc_; 489 double allocation_duration_since_gc_;
486 size_t new_space_allocation_in_bytes_since_gc_; 490 size_t new_space_allocation_in_bytes_since_gc_;
487 size_t old_generation_allocation_in_bytes_since_gc_; 491 size_t old_generation_allocation_in_bytes_since_gc_;
488 492
(...skipping 15 matching lines...) Expand all
504 RingBuffer<BytesAndDuration> recorded_old_generation_allocations_; 508 RingBuffer<BytesAndDuration> recorded_old_generation_allocations_;
505 RingBuffer<double> recorded_context_disposal_times_; 509 RingBuffer<double> recorded_context_disposal_times_;
506 RingBuffer<double> recorded_survival_ratios_; 510 RingBuffer<double> recorded_survival_ratios_;
507 511
508 DISALLOW_COPY_AND_ASSIGN(GCTracer); 512 DISALLOW_COPY_AND_ASSIGN(GCTracer);
509 }; 513 };
510 } // namespace internal 514 } // namespace internal
511 } // namespace v8 515 } // namespace v8
512 516
513 #endif // V8_HEAP_GC_TRACER_H_ 517 #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