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

Side by Side Diff: src/heap.cc

Issue 259243002: Wait for sweepter threads in idle notifcation with large hints. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 "v8.h" 5 #include "v8.h"
6 6
7 #include "accessors.h" 7 #include "accessors.h"
8 #include "api.h" 8 #include "api.h"
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "codegen.h" 10 #include "codegen.h"
(...skipping 4457 matching lines...) Expand 10 before | Expand all | Expand 10 after
4468 if (!incremental_marking()->IsStopped() && 4468 if (!incremental_marking()->IsStopped() &&
4469 hint > kMinHintForIncrementalMarking) { 4469 hint > kMinHintForIncrementalMarking) {
4470 AdvanceIdleIncrementalMarking(step_size); 4470 AdvanceIdleIncrementalMarking(step_size);
4471 } 4471 }
4472 4472
4473 if (mark_sweeps_since_idle_round_started_ >= kMaxMarkSweepsInIdleRound) { 4473 if (mark_sweeps_since_idle_round_started_ >= kMaxMarkSweepsInIdleRound) {
4474 FinishIdleRound(); 4474 FinishIdleRound();
4475 return true; 4475 return true;
4476 } 4476 }
4477 4477
4478 // If the IdleNotifcation is called with a large hint we will wait for
4479 // the sweepter threads here.
4480 if (hint >= kMinHintForFullGC && IsConcurrentSweepingInProgress()) {
4481 WaitUntilSweepingCompleted();
4482 }
4483
4478 return false; 4484 return false;
4479 } 4485 }
4480 4486
4481 4487
4482 bool Heap::IdleGlobalGC() { 4488 bool Heap::IdleGlobalGC() {
4483 static const int kIdlesBeforeScavenge = 4; 4489 static const int kIdlesBeforeScavenge = 4;
4484 static const int kIdlesBeforeMarkSweep = 7; 4490 static const int kIdlesBeforeMarkSweep = 7;
4485 static const int kIdlesBeforeMarkCompact = 8; 4491 static const int kIdlesBeforeMarkCompact = 8;
4486 static const int kMaxIdleCount = kIdlesBeforeMarkCompact + 1; 4492 static const int kMaxIdleCount = kIdlesBeforeMarkCompact + 1;
4487 static const unsigned int kGCsBetweenCleanup = 4; 4493 static const unsigned int kGCsBetweenCleanup = 4;
(...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after
6497 static_cast<int>(object_sizes_last_time_[index])); 6503 static_cast<int>(object_sizes_last_time_[index]));
6498 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6504 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6499 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6505 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6500 6506
6501 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6507 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6502 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6508 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6503 ClearObjectStats(); 6509 ClearObjectStats();
6504 } 6510 }
6505 6511
6506 } } // namespace v8::internal 6512 } } // 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