OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1448 | 1448 |
1449 inline void IncrementYoungSurvivorsCounter(int survived) { | 1449 inline void IncrementYoungSurvivorsCounter(int survived) { |
1450 ASSERT(survived >= 0); | 1450 ASSERT(survived >= 0); |
1451 young_survivors_after_last_gc_ = survived; | 1451 young_survivors_after_last_gc_ = survived; |
1452 survived_since_last_expansion_ += survived; | 1452 survived_since_last_expansion_ += survived; |
1453 } | 1453 } |
1454 | 1454 |
1455 inline bool NextGCIsLikelyToBeFull() { | 1455 inline bool NextGCIsLikelyToBeFull() { |
1456 if (FLAG_gc_global) return true; | 1456 if (FLAG_gc_global) return true; |
1457 | 1457 |
| 1458 if (FLAG_stress_compaction && (gc_count_ & 1) != 0) return true; |
| 1459 |
1458 intptr_t total_promoted = PromotedTotalSize(); | 1460 intptr_t total_promoted = PromotedTotalSize(); |
1459 | 1461 |
1460 intptr_t adjusted_promotion_limit = | 1462 intptr_t adjusted_promotion_limit = |
1461 old_gen_promotion_limit_ - new_space_.Capacity(); | 1463 old_gen_promotion_limit_ - new_space_.Capacity(); |
1462 | 1464 |
1463 if (total_promoted >= adjusted_promotion_limit) return true; | 1465 if (total_promoted >= adjusted_promotion_limit) return true; |
1464 | 1466 |
1465 intptr_t adjusted_allocation_limit = | 1467 intptr_t adjusted_allocation_limit = |
1466 old_gen_allocation_limit_ - new_space_.Capacity() / 5; | 1468 old_gen_allocation_limit_ - new_space_.Capacity() / 5; |
1467 | 1469 |
(...skipping 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2719 AssertNoAllocation no_alloc; // i.e. no gc allowed. | 2721 AssertNoAllocation no_alloc; // i.e. no gc allowed. |
2720 | 2722 |
2721 private: | 2723 private: |
2722 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2724 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
2723 }; | 2725 }; |
2724 #endif // DEBUG || LIVE_OBJECT_LIST | 2726 #endif // DEBUG || LIVE_OBJECT_LIST |
2725 | 2727 |
2726 } } // namespace v8::internal | 2728 } } // namespace v8::internal |
2727 | 2729 |
2728 #endif // V8_HEAP_H_ | 2730 #endif // V8_HEAP_H_ |
OLD | NEW |