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

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

Issue 783453003: Explicitly track whether incremental marking was activated (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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/heap.h » ('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 #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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/heap/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698