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

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

Issue 568023002: Use the regular start incremental marking strategy in the idle notification. (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/incremental-marking.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 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after
1541 new_space_.LowerInlineAllocationLimit( 1541 new_space_.LowerInlineAllocationLimit(
1542 new_space_.inline_allocation_limit_step()); 1542 new_space_.inline_allocation_limit_step());
1543 1543
1544 // Update how much has survived scavenge. 1544 // Update how much has survived scavenge.
1545 IncrementYoungSurvivorsCounter(static_cast<int>( 1545 IncrementYoungSurvivorsCounter(static_cast<int>(
1546 (PromotedSpaceSizeOfObjects() - survived_watermark) + new_space_.Size())); 1546 (PromotedSpaceSizeOfObjects() - survived_watermark) + new_space_.Size()));
1547 1547
1548 LOG(isolate_, ResourceEvent("scavenge", "end")); 1548 LOG(isolate_, ResourceEvent("scavenge", "end"));
1549 1549
1550 gc_state_ = NOT_IN_GC; 1550 gc_state_ = NOT_IN_GC;
1551
1552 gc_idle_time_handler_.NotifyScavenge();
1553 } 1551 }
1554 1552
1555 1553
1556 String* Heap::UpdateNewSpaceReferenceInExternalStringTableEntry(Heap* heap, 1554 String* Heap::UpdateNewSpaceReferenceInExternalStringTableEntry(Heap* heap,
1557 Object** p) { 1555 Object** p) {
1558 MapWord first_word = HeapObject::cast(*p)->map_word(); 1556 MapWord first_word = HeapObject::cast(*p)->map_word();
1559 1557
1560 if (!first_word.IsForwardingAddress()) { 1558 if (!first_word.IsForwardingAddress()) {
1561 // Unreachable external string can be finalized. 1559 // Unreachable external string can be finalized.
1562 heap->FinalizeExternalString(String::cast(*p)); 1560 heap->FinalizeExternalString(String::cast(*p));
(...skipping 2735 matching lines...) Expand 10 before | Expand all | Expand 10 after
4298 isolate()->counters()->gc_idle_time_allotted_in_ms()->AddSample( 4296 isolate()->counters()->gc_idle_time_allotted_in_ms()->AddSample(
4299 idle_time_in_ms); 4297 idle_time_in_ms);
4300 HistogramTimerScope idle_notification_scope( 4298 HistogramTimerScope idle_notification_scope(
4301 isolate_->counters()->gc_idle_notification()); 4299 isolate_->counters()->gc_idle_notification());
4302 4300
4303 GCIdleTimeHandler::HeapState heap_state; 4301 GCIdleTimeHandler::HeapState heap_state;
4304 heap_state.contexts_disposed = contexts_disposed_; 4302 heap_state.contexts_disposed = contexts_disposed_;
4305 heap_state.size_of_objects = static_cast<size_t>(SizeOfObjects()); 4303 heap_state.size_of_objects = static_cast<size_t>(SizeOfObjects());
4306 heap_state.incremental_marking_stopped = incremental_marking()->IsStopped(); 4304 heap_state.incremental_marking_stopped = incremental_marking()->IsStopped();
4307 // TODO(ulan): Start incremental marking only for large heaps. 4305 // TODO(ulan): Start incremental marking only for large heaps.
4308 heap_state.can_start_incremental_marking = true; 4306 heap_state.can_start_incremental_marking =
4307 incremental_marking()->ShouldActivate();
4309 heap_state.sweeping_in_progress = 4308 heap_state.sweeping_in_progress =
4310 mark_compact_collector()->sweeping_in_progress(); 4309 mark_compact_collector()->sweeping_in_progress();
4311 heap_state.mark_compact_speed_in_bytes_per_ms = 4310 heap_state.mark_compact_speed_in_bytes_per_ms =
4312 static_cast<size_t>(tracer()->MarkCompactSpeedInBytesPerMillisecond()); 4311 static_cast<size_t>(tracer()->MarkCompactSpeedInBytesPerMillisecond());
4313 heap_state.incremental_marking_speed_in_bytes_per_ms = static_cast<size_t>( 4312 heap_state.incremental_marking_speed_in_bytes_per_ms = static_cast<size_t>(
4314 tracer()->IncrementalMarkingSpeedInBytesPerMillisecond()); 4313 tracer()->IncrementalMarkingSpeedInBytesPerMillisecond());
4315 4314
4316 GCIdleTimeAction action = 4315 GCIdleTimeAction action =
4317 gc_idle_time_handler_.Compute(idle_time_in_ms, heap_state); 4316 gc_idle_time_handler_.Compute(idle_time_in_ms, heap_state);
4318 4317
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after
6128 static_cast<int>(object_sizes_last_time_[index])); 6127 static_cast<int>(object_sizes_last_time_[index]));
6129 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6128 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6130 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6129 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6131 6130
6132 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6131 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6133 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6132 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6134 ClearObjectStats(); 6133 ClearObjectStats();
6135 } 6134 }
6136 } 6135 }
6137 } // namespace v8::internal 6136 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/gc-idle-time-handler-unittest.cc ('k') | src/heap/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698