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

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

Issue 2138783002: TestCodeFlushingIncrementalScavenge should not allocate on black pages. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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
« 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 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 // object is still located in new-space. 1472 // object is still located in new-space.
1473 const int kAgingThreshold = 6; 1473 const int kAgingThreshold = 6;
1474 for (int i = 0; i < kAgingThreshold; i++) { 1474 for (int i = 0; i < kAgingThreshold; i++) {
1475 function->shared()->code()->MakeOlder(static_cast<MarkingParity>(i % 2)); 1475 function->shared()->code()->MakeOlder(static_cast<MarkingParity>(i % 2));
1476 function2->shared()->code()->MakeOlder(static_cast<MarkingParity>(i % 2)); 1476 function2->shared()->code()->MakeOlder(static_cast<MarkingParity>(i % 2));
1477 } 1477 }
1478 1478
1479 // Simulate incremental marking so that the functions are enqueued as 1479 // Simulate incremental marking so that the functions are enqueued as
1480 // code flushing candidates. Then kill one of the functions. Finally 1480 // code flushing candidates. Then kill one of the functions. Finally
1481 // perform a scavenge while incremental marking is still running. 1481 // perform a scavenge while incremental marking is still running.
1482 heap::SimulateIncrementalMarking(CcTest::heap()); 1482 heap::SimulateIncrementalMarking(CcTest::heap(), false);
1483 *function2.location() = NULL; 1483 *function2.location() = NULL;
1484 CcTest::heap()->CollectGarbage(NEW_SPACE, "test scavenge while marking"); 1484 CcTest::heap()->CollectGarbage(NEW_SPACE, "test scavenge while marking");
1485 1485
1486 // Simulate one final GC to make sure the candidate queue is sane. 1486 // Simulate one final GC to make sure the candidate queue is sane.
1487 CcTest::heap()->CollectAllGarbage(); 1487 CcTest::heap()->CollectAllGarbage();
1488 CHECK(!function->shared()->is_compiled() || function->IsOptimized()); 1488 CHECK(!function->shared()->is_compiled() || function->IsOptimized());
1489 CHECK(!function->is_compiled() || function->IsOptimized()); 1489 CHECK(!function->is_compiled() || function->IsOptimized());
1490 } 1490 }
1491 1491
1492 1492
(...skipping 5378 matching lines...) Expand 10 before | Expand all | Expand 10 after
6871 chunk, chunk->area_end() - kPointerSize, chunk->area_end()); 6871 chunk, chunk->area_end() - kPointerSize, chunk->area_end());
6872 slots[chunk->area_end() - kPointerSize] = false; 6872 slots[chunk->area_end() - kPointerSize] = false;
6873 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) { 6873 RememberedSet<OLD_TO_NEW>::Iterate(chunk, [&slots](Address addr) {
6874 CHECK(slots[addr]); 6874 CHECK(slots[addr]);
6875 return KEEP_SLOT; 6875 return KEEP_SLOT;
6876 }); 6876 });
6877 } 6877 }
6878 6878
6879 } // namespace internal 6879 } // namespace internal
6880 } // namespace v8 6880 } // namespace v8
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