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

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

Issue 766663006: Use incremental marking deque in idle notification. (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/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 4371 matching lines...) Expand 10 before | Expand all | Expand 10 after
4382 new_space_.Shrink(); 4382 new_space_.Shrink();
4383 UncommitFromSpace(); 4383 UncommitFromSpace();
4384 } 4384 }
4385 } 4385 }
4386 4386
4387 4387
4388 void Heap::TryFinalizeIdleIncrementalMarking( 4388 void Heap::TryFinalizeIdleIncrementalMarking(
4389 double idle_time_in_ms, size_t size_of_objects, 4389 double idle_time_in_ms, size_t size_of_objects,
4390 size_t final_incremental_mark_compact_speed_in_bytes_per_ms) { 4390 size_t final_incremental_mark_compact_speed_in_bytes_per_ms) {
4391 if (incremental_marking()->IsComplete() || 4391 if (incremental_marking()->IsComplete() ||
4392 (mark_compact_collector()->IsMarkingDequeEmpty() && 4392 (incremental_marking()->IsMarkingDequeEmpty() &&
4393 gc_idle_time_handler_.ShouldDoFinalIncrementalMarkCompact( 4393 gc_idle_time_handler_.ShouldDoFinalIncrementalMarkCompact(
4394 static_cast<size_t>(idle_time_in_ms), size_of_objects, 4394 static_cast<size_t>(idle_time_in_ms), size_of_objects,
4395 final_incremental_mark_compact_speed_in_bytes_per_ms))) { 4395 final_incremental_mark_compact_speed_in_bytes_per_ms))) {
4396 CollectAllGarbage(kNoGCFlags, "idle notification: finalize incremental"); 4396 CollectAllGarbage(kNoGCFlags, "idle notification: finalize incremental");
4397 } 4397 }
4398 } 4398 }
4399 4399
4400 4400
4401 bool Heap::WorthActivatingIncrementalMarking() { 4401 bool Heap::WorthActivatingIncrementalMarking() {
4402 return incremental_marking()->IsStopped() && 4402 return incremental_marking()->IsStopped() &&
(...skipping 1944 matching lines...) Expand 10 before | Expand all | Expand 10 after
6347 static_cast<int>(object_sizes_last_time_[index])); 6347 static_cast<int>(object_sizes_last_time_[index]));
6348 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6348 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6349 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6349 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6350 6350
6351 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6351 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6352 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6352 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6353 ClearObjectStats(); 6353 ClearObjectStats();
6354 } 6354 }
6355 } 6355 }
6356 } // namespace v8::internal 6356 } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/heap/incremental-marking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698