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

Side by Side Diff: test/cctest/test-heap.cc

Issue 17081002: Fix Regress2237 on gc stress builder. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 2364 matching lines...) Expand 10 before | Expand all | Expand 10 after
2375 // size of the first page a little in SizeOfFirstPage in spaces.cc. The 2375 // size of the first page a little in SizeOfFirstPage in spaces.cc. The
2376 // first page should be small in order to reduce memory used when the VM 2376 // first page should be small in order to reduce memory used when the VM
2377 // boots, but if the 20 small arrays don't fit on the first page then that's 2377 // boots, but if the 20 small arrays don't fit on the first page then that's
2378 // an indication that it is too small. 2378 // an indication that it is too small.
2379 HEAP->CollectAllAvailableGarbage("triggered really hard"); 2379 HEAP->CollectAllAvailableGarbage("triggered really hard");
2380 CHECK_EQ(1, old_pointer_space->CountTotalPages()); 2380 CHECK_EQ(1, old_pointer_space->CountTotalPages());
2381 } 2381 }
2382 2382
2383 2383
2384 TEST(Regress2237) { 2384 TEST(Regress2237) {
2385 i::FLAG_stress_compaction = false;
2385 CcTest::InitializeVM(); 2386 CcTest::InitializeVM();
2386 Isolate* isolate = Isolate::Current(); 2387 Isolate* isolate = Isolate::Current();
2387 Factory* factory = isolate->factory(); 2388 Factory* factory = isolate->factory();
2388 v8::HandleScope scope(CcTest::isolate()); 2389 v8::HandleScope scope(CcTest::isolate());
2389 Handle<String> slice(HEAP->empty_string()); 2390 Handle<String> slice(HEAP->empty_string());
2390 2391
2391 { 2392 {
2392 // Generate a parent that lives in new-space. 2393 // Generate a parent that lives in new-space.
2393 v8::HandleScope inner_scope(CcTest::isolate()); 2394 v8::HandleScope inner_scope(CcTest::isolate());
2394 const char* c = "This text is long enough to trigger sliced strings."; 2395 const char* c = "This text is long enough to trigger sliced strings.";
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
3172 " var a = new Array(n);" 3173 " var a = new Array(n);"
3173 " for (var i = 0; i < n; i += 100) a[i] = i;" 3174 " for (var i = 0; i < n; i += 100) a[i] = i;"
3174 "};" 3175 "};"
3175 "f(10 * 1024 * 1024);"); 3176 "f(10 * 1024 * 1024);");
3176 IncrementalMarking* marking = HEAP->incremental_marking(); 3177 IncrementalMarking* marking = HEAP->incremental_marking();
3177 if (marking->IsStopped()) marking->Start(); 3178 if (marking->IsStopped()) marking->Start();
3178 // This big step should be sufficient to mark the whole array. 3179 // This big step should be sufficient to mark the whole array.
3179 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD); 3180 marking->Step(100 * MB, IncrementalMarking::NO_GC_VIA_STACK_GUARD);
3180 ASSERT(marking->IsComplete()); 3181 ASSERT(marking->IsComplete());
3181 } 3182 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698