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