| OLD | NEW |
| 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 4459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 4478 // If the IdleNotifcation is called with a large hint we will wait for |
| 4479 // the sweepter threads here. | 4479 // the sweepter threads here. |
| 4480 if (hint >= kMinHintForFullGC && IsConcurrentSweepingInProgress()) { | 4480 if (hint >= kMinHintForFullGC && |
| 4481 WaitUntilSweepingCompleted(); | 4481 mark_compact_collector()->IsConcurrentSweepingInProgress()) { |
| 4482 mark_compact_collector()->WaitUntilSweepingCompleted(); |
| 4482 } | 4483 } |
| 4483 | 4484 |
| 4484 return false; | 4485 return false; |
| 4485 } | 4486 } |
| 4486 | 4487 |
| 4487 | 4488 |
| 4488 bool Heap::IdleGlobalGC() { | 4489 bool Heap::IdleGlobalGC() { |
| 4489 static const int kIdlesBeforeScavenge = 4; | 4490 static const int kIdlesBeforeScavenge = 4; |
| 4490 static const int kIdlesBeforeMarkSweep = 7; | 4491 static const int kIdlesBeforeMarkSweep = 7; |
| 4491 static const int kIdlesBeforeMarkCompact = 8; | 4492 static const int kIdlesBeforeMarkCompact = 8; |
| (...skipping 2011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6503 static_cast<int>(object_sizes_last_time_[index])); | 6504 static_cast<int>(object_sizes_last_time_[index])); |
| 6504 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6505 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 6505 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6506 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 6506 | 6507 |
| 6507 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6508 OS::MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 6508 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6509 OS::MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 6509 ClearObjectStats(); | 6510 ClearObjectStats(); |
| 6510 } | 6511 } |
| 6511 | 6512 |
| 6512 } } // namespace v8::internal | 6513 } } // namespace v8::internal |
| OLD | NEW |