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

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

Issue 563493002: Allow IdleNotification to trigger Scavenges. (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 | « src/heap/gc-idle-time-handler-unittest.cc ('k') | src/heap/spaces.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 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 4294 matching lines...) Expand 10 before | Expand all | Expand 10 after
4305 heap_state.size_of_objects = static_cast<size_t>(SizeOfObjects()); 4305 heap_state.size_of_objects = static_cast<size_t>(SizeOfObjects());
4306 heap_state.incremental_marking_stopped = incremental_marking()->IsStopped(); 4306 heap_state.incremental_marking_stopped = incremental_marking()->IsStopped();
4307 // TODO(ulan): Start incremental marking only for large heaps. 4307 // TODO(ulan): Start incremental marking only for large heaps.
4308 heap_state.can_start_incremental_marking = true; 4308 heap_state.can_start_incremental_marking = true;
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 heap_state.scavenge_speed_in_bytes_per_ms =
4316 static_cast<size_t>(tracer()->ScavengeSpeedInBytesPerMillisecond());
4317 heap_state.available_new_space_memory = new_space_.Available();
4318 heap_state.new_space_capacity = new_space_.Capacity();
4315 4319
4316 GCIdleTimeAction action = 4320 GCIdleTimeAction action =
4317 gc_idle_time_handler_.Compute(idle_time_in_ms, heap_state); 4321 gc_idle_time_handler_.Compute(idle_time_in_ms, heap_state);
4318 4322
4319 contexts_disposed_ = 0; 4323 contexts_disposed_ = 0;
4320 bool result = false; 4324 bool result = false;
4321 switch (action.type) { 4325 switch (action.type) {
4322 case DO_INCREMENTAL_MARKING: 4326 case DO_INCREMENTAL_MARKING:
4323 if (incremental_marking()->IsStopped()) { 4327 if (incremental_marking()->IsStopped()) {
4324 incremental_marking()->Start(); 4328 incremental_marking()->Start();
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after
6126 static_cast<int>(object_sizes_last_time_[index])); 6130 static_cast<int>(object_sizes_last_time_[index]));
6127 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6131 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6128 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6132 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6129 6133
6130 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6134 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6131 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6135 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6132 ClearObjectStats(); 6136 ClearObjectStats();
6133 } 6137 }
6134 } 6138 }
6135 } // namespace v8::internal 6139 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/gc-idle-time-handler-unittest.cc ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698