| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 start_time - previous_.end_time, | 114 start_time - previous_.end_time, |
| 115 reinterpret_cast<intptr_t>((heap_->new_space()->top()) - | 115 reinterpret_cast<intptr_t>((heap_->new_space()->top()) - |
| 116 new_space_top_after_gc_)); | 116 new_space_top_after_gc_)); |
| 117 } | 117 } |
| 118 if (current_.type == Event::INCREMENTAL_MARK_COMPACTOR) | 118 if (current_.type == Event::INCREMENTAL_MARK_COMPACTOR) |
| 119 previous_incremental_mark_compactor_event_ = current_; | 119 previous_incremental_mark_compactor_event_ = current_; |
| 120 | 120 |
| 121 if (collector == SCAVENGER) { | 121 if (collector == SCAVENGER) { |
| 122 current_ = Event(Event::SCAVENGER, gc_reason, collector_reason); | 122 current_ = Event(Event::SCAVENGER, gc_reason, collector_reason); |
| 123 } else if (collector == MARK_COMPACTOR) { | 123 } else if (collector == MARK_COMPACTOR) { |
| 124 if (heap_->incremental_marking()->IsMarking()) { | 124 if (heap_->incremental_marking()->WasActivated()) { |
| 125 current_ = | 125 current_ = |
| 126 Event(Event::INCREMENTAL_MARK_COMPACTOR, gc_reason, collector_reason); | 126 Event(Event::INCREMENTAL_MARK_COMPACTOR, gc_reason, collector_reason); |
| 127 } else { | 127 } else { |
| 128 current_ = Event(Event::MARK_COMPACTOR, gc_reason, collector_reason); | 128 current_ = Event(Event::MARK_COMPACTOR, gc_reason, collector_reason); |
| 129 } | 129 } |
| 130 } | 130 } |
| 131 | 131 |
| 132 current_.start_time = start_time; | 132 current_.start_time = start_time; |
| 133 current_.start_object_size = heap_->SizeOfObjects(); | 133 current_.start_object_size = heap_->SizeOfObjects(); |
| 134 current_.start_memory_size = heap_->isolate()->memory_allocator()->Size(); | 134 current_.start_memory_size = heap_->isolate()->memory_allocator()->Size(); |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 context_disposal_events_.begin(); | 551 context_disposal_events_.begin(); |
| 552 while (iter != context_disposal_events_.end()) { | 552 while (iter != context_disposal_events_.end()) { |
| 553 end = iter->time_; | 553 end = iter->time_; |
| 554 ++iter; | 554 ++iter; |
| 555 } | 555 } |
| 556 | 556 |
| 557 return (begin - end) / context_disposal_events_.size(); | 557 return (begin - end) / context_disposal_events_.size(); |
| 558 } | 558 } |
| 559 } | 559 } |
| 560 } // namespace v8::internal | 560 } // namespace v8::internal |
| OLD | NEW |