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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // Simulate a full old space to make promotion fail. | 120 // Simulate a full old space to make promotion fail. |
121 SimulateFullSpace(heap->old_pointer_space()); | 121 SimulateFullSpace(heap->old_pointer_space()); |
122 | 122 |
123 // Call mark compact GC, and it should pass. | 123 // Call mark compact GC, and it should pass. |
124 heap->CollectGarbage(OLD_POINTER_SPACE); | 124 heap->CollectGarbage(OLD_POINTER_SPACE); |
125 } | 125 } |
126 | 126 |
127 | 127 |
128 TEST(MarkCompactCollector) { | 128 TEST(MarkCompactCollector) { |
129 FLAG_incremental_marking = false; | 129 FLAG_incremental_marking = false; |
| 130 FLAG_retain_maps_for_n_gc = 0; |
130 CcTest::InitializeVM(); | 131 CcTest::InitializeVM(); |
131 Isolate* isolate = CcTest::i_isolate(); | 132 Isolate* isolate = CcTest::i_isolate(); |
132 TestHeap* heap = CcTest::test_heap(); | 133 TestHeap* heap = CcTest::test_heap(); |
133 Factory* factory = isolate->factory(); | 134 Factory* factory = isolate->factory(); |
134 | 135 |
135 v8::HandleScope sc(CcTest::isolate()); | 136 v8::HandleScope sc(CcTest::isolate()); |
136 Handle<GlobalObject> global(isolate->context()->global_object()); | 137 Handle<GlobalObject> global(isolate->context()->global_object()); |
137 | 138 |
138 // call mark-compact when heap is empty | 139 // call mark-compact when heap is empty |
139 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 1"); | 140 heap->CollectGarbage(OLD_POINTER_SPACE, "trigger 1"); |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 | 487 |
487 | 488 |
488 TEST(RegressJoinThreadsOnIsolateDeinit) { | 489 TEST(RegressJoinThreadsOnIsolateDeinit) { |
489 intptr_t size_limit = ShortLivingIsolate() * 2; | 490 intptr_t size_limit = ShortLivingIsolate() * 2; |
490 for (int i = 0; i < 10; i++) { | 491 for (int i = 0; i < 10; i++) { |
491 CHECK_GT(size_limit, ShortLivingIsolate()); | 492 CHECK_GT(size_limit, ShortLivingIsolate()); |
492 } | 493 } |
493 } | 494 } |
494 | 495 |
495 #endif // __linux__ and !USE_SIMULATOR | 496 #endif // __linux__ and !USE_SIMULATOR |
OLD | NEW |