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

Side by Side Diff: test/cctest/test-mark-compact.cc

Issue 794583003: Retain maps for several garbage collections (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 6 years 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
« no previous file with comments | « test/cctest/test-heap.cc ('k') | 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 // 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
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
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
OLDNEW
« no previous file with comments | « test/cctest/test-heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698