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

Side by Side Diff: src/heap/heap.cc

Issue 552723004: Reset context disposed counter after executing the idle garbage collection operation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 4298 matching lines...) Expand 10 before | Expand all | Expand 10 after
4309 heap_state.sweeping_in_progress = 4309 heap_state.sweeping_in_progress =
4310 mark_compact_collector()->sweeping_in_progress(); 4310 mark_compact_collector()->sweeping_in_progress();
4311 heap_state.mark_compact_speed_in_bytes_per_ms = 4311 heap_state.mark_compact_speed_in_bytes_per_ms =
4312 static_cast<size_t>(tracer()->MarkCompactSpeedInBytesPerMillisecond()); 4312 static_cast<size_t>(tracer()->MarkCompactSpeedInBytesPerMillisecond());
4313 heap_state.incremental_marking_speed_in_bytes_per_ms = static_cast<size_t>( 4313 heap_state.incremental_marking_speed_in_bytes_per_ms = static_cast<size_t>(
4314 tracer()->IncrementalMarkingSpeedInBytesPerMillisecond()); 4314 tracer()->IncrementalMarkingSpeedInBytesPerMillisecond());
4315 4315
4316 GCIdleTimeAction action = 4316 GCIdleTimeAction action =
4317 gc_idle_time_handler_.Compute(idle_time_in_ms, heap_state); 4317 gc_idle_time_handler_.Compute(idle_time_in_ms, heap_state);
4318 4318
4319 contexts_disposed_ = 0;
4320 bool result = false; 4319 bool result = false;
4321 switch (action.type) { 4320 switch (action.type) {
4322 case DO_INCREMENTAL_MARKING: 4321 case DO_INCREMENTAL_MARKING:
4323 if (incremental_marking()->IsStopped()) { 4322 if (incremental_marking()->IsStopped()) {
4324 incremental_marking()->Start(); 4323 incremental_marking()->Start();
4325 } 4324 }
4326 AdvanceIdleIncrementalMarking(action.parameter); 4325 AdvanceIdleIncrementalMarking(action.parameter);
4327 break; 4326 break;
4328 case DO_FULL_GC: { 4327 case DO_FULL_GC: {
4329 HistogramTimerScope scope(isolate_->counters()->gc_context()); 4328 HistogramTimerScope scope(isolate_->counters()->gc_context());
(...skipping 15 matching lines...) Expand all
4345 break; 4344 break;
4346 } 4345 }
4347 if (FLAG_trace_idle_notification) { 4346 if (FLAG_trace_idle_notification) {
4348 int actual_time_ms = static_cast<int>(timer.Elapsed().InMilliseconds()); 4347 int actual_time_ms = static_cast<int>(timer.Elapsed().InMilliseconds());
4349 PrintF("Idle notification: requested idle time %d ms, actual time %d ms [", 4348 PrintF("Idle notification: requested idle time %d ms, actual time %d ms [",
4350 idle_time_in_ms, actual_time_ms); 4349 idle_time_in_ms, actual_time_ms);
4351 action.Print(); 4350 action.Print();
4352 PrintF("]\n"); 4351 PrintF("]\n");
4353 } 4352 }
4354 4353
4354 contexts_disposed_ = 0;
4355 return result; 4355 return result;
4356 } 4356 }
4357 4357
4358 4358
4359 #ifdef DEBUG 4359 #ifdef DEBUG
4360 4360
4361 void Heap::Print() { 4361 void Heap::Print() {
4362 if (!HasBeenSetUp()) return; 4362 if (!HasBeenSetUp()) return;
4363 isolate()->PrintStack(stdout); 4363 isolate()->PrintStack(stdout);
4364 AllSpaces spaces(this); 4364 AllSpaces spaces(this);
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after
6126 static_cast<int>(object_sizes_last_time_[index])); 6126 static_cast<int>(object_sizes_last_time_[index]));
6127 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6127 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6128 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6128 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6129 6129
6130 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6130 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6131 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6131 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6132 ClearObjectStats(); 6132 ClearObjectStats();
6133 } 6133 }
6134 } 6134 }
6135 } // namespace v8::internal 6135 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698