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

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

Issue 2359903002: [heap] New heuristics for incremental marking step size. (Closed)
Patch Set: use space iterator Created 4 years, 2 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 | « src/x64/code-stubs-x64.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 6191 matching lines...) Expand 10 before | Expand all | Expand 10 after
6202 CHECK_LE(kSize, counter2 - counter1); 6202 CHECK_LE(kSize, counter2 - counter1);
6203 CcTest::CollectGarbage(NEW_SPACE); 6203 CcTest::CollectGarbage(NEW_SPACE);
6204 size_t counter3 = heap->OldGenerationAllocationCounter(); 6204 size_t counter3 = heap->OldGenerationAllocationCounter();
6205 CHECK_EQ(0u, counter3 - counter2); 6205 CHECK_EQ(0u, counter3 - counter2);
6206 AllocateInSpace(isolate, kSize, OLD_SPACE); 6206 AllocateInSpace(isolate, kSize, OLD_SPACE);
6207 CcTest::CollectGarbage(OLD_SPACE); 6207 CcTest::CollectGarbage(OLD_SPACE);
6208 size_t counter4 = heap->OldGenerationAllocationCounter(); 6208 size_t counter4 = heap->OldGenerationAllocationCounter();
6209 CHECK_LE(kSize, counter4 - counter3); 6209 CHECK_LE(kSize, counter4 - counter3);
6210 // Test counter overflow. 6210 // Test counter overflow.
6211 size_t max_counter = -1; 6211 size_t max_counter = -1;
6212 heap->set_old_generation_allocation_counter(max_counter - 10 * kSize); 6212 heap->set_old_generation_allocation_counter_at_last_gc(max_counter -
6213 10 * kSize);
6213 size_t start = heap->OldGenerationAllocationCounter(); 6214 size_t start = heap->OldGenerationAllocationCounter();
6214 for (int i = 0; i < 20; i++) { 6215 for (int i = 0; i < 20; i++) {
6215 AllocateInSpace(isolate, kSize, OLD_SPACE); 6216 AllocateInSpace(isolate, kSize, OLD_SPACE);
6216 size_t counter = heap->OldGenerationAllocationCounter(); 6217 size_t counter = heap->OldGenerationAllocationCounter();
6217 CHECK_LE(kSize, counter - start); 6218 CHECK_LE(kSize, counter - start);
6218 start = counter; 6219 start = counter;
6219 } 6220 }
6220 } 6221 }
6221 6222
6222 6223
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
7120 heap::SimulateFullSpace(heap->new_space()); 7121 heap::SimulateFullSpace(heap->new_space());
7121 } 7122 }
7122 heap::GcAndSweep(heap, OLD_SPACE); 7123 heap::GcAndSweep(heap, OLD_SPACE);
7123 for (Page* p : *heap->new_space()) { 7124 for (Page* p : *heap->new_space()) {
7124 CHECK(!p->InIntermediateGeneration()); 7125 CHECK(!p->InIntermediateGeneration());
7125 } 7126 }
7126 } 7127 }
7127 7128
7128 } // namespace internal 7129 } // namespace internal
7129 } // namespace v8 7130 } // namespace v8
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698