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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/heap/gc-tracer.h" | 7 #include "src/heap/gc-tracer.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 current_.pure_incremental_marking_duration = | 211 current_.pure_incremental_marking_duration = |
212 current_.cumulative_pure_incremental_marking_duration - | 212 current_.cumulative_pure_incremental_marking_duration - |
213 previous_incremental_mark_compactor_event_ | 213 previous_incremental_mark_compactor_event_ |
214 .cumulative_pure_incremental_marking_duration; | 214 .cumulative_pure_incremental_marking_duration; |
215 longest_incremental_marking_step_ = 0.0; | 215 longest_incremental_marking_step_ = 0.0; |
216 incremental_mark_compactor_events_.push_front(current_); | 216 incremental_mark_compactor_events_.push_front(current_); |
217 } else { | 217 } else { |
218 DCHECK(current_.incremental_marking_bytes == 0); | 218 DCHECK(current_.incremental_marking_bytes == 0); |
219 DCHECK(current_.incremental_marking_duration == 0); | 219 DCHECK(current_.incremental_marking_duration == 0); |
220 DCHECK(current_.pure_incremental_marking_duration == 0); | 220 DCHECK(current_.pure_incremental_marking_duration == 0); |
221 DCHECK(longest_incremental_marking_step_ == 0.0); | 221 longest_incremental_marking_step_ = 0.0; |
222 mark_compactor_events_.push_front(current_); | 222 mark_compactor_events_.push_front(current_); |
223 } | 223 } |
224 | 224 |
225 // TODO(ernstm): move the code below out of GCTracer. | 225 // TODO(ernstm): move the code below out of GCTracer. |
226 | 226 |
227 if (!FLAG_trace_gc && !FLAG_print_cumulative_gc_stat) return; | 227 if (!FLAG_trace_gc && !FLAG_print_cumulative_gc_stat) return; |
228 | 228 |
229 double duration = current_.end_time - current_.start_time; | 229 double duration = current_.end_time - current_.start_time; |
230 double spent_in_mutator = Max(current_.start_time - previous_.end_time, 0.0); | 230 double spent_in_mutator = Max(current_.start_time - previous_.end_time, 0.0); |
231 | 231 |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 | 587 |
588 | 588 |
589 bool GCTracer::SurvivalEventsRecorded() const { | 589 bool GCTracer::SurvivalEventsRecorded() const { |
590 return survival_events_.size() > 0; | 590 return survival_events_.size() > 0; |
591 } | 591 } |
592 | 592 |
593 | 593 |
594 void GCTracer::ResetSurvivalEvents() { survival_events_.reset(); } | 594 void GCTracer::ResetSurvivalEvents() { survival_events_.reset(); } |
595 } | 595 } |
596 } // namespace v8::internal | 596 } // namespace v8::internal |
OLD | NEW |