Debian Codegraph @

js/src/jit-test/tests/gc/pretenure-object-long-lived.js

raw
1 // Allocate many long-lived objects and check that we pretenure them.
2
3 load(libdir + "pretenure.js");
4
5 setupPretenureTest();
6
7 allocateObjects(nurseryCount, true); // Warm up.
8
9 let { minor, major } = runTestAndCountCollections(
10 () => allocateObjects(tenuredCount, true)
11 );
12
13 // Check that after the warm up period we 'only' do major GCs (we allow one
14 // nursery collection).
15 print(`${minor} minor GCs, ${major} major GCs`);
16 assertEq(minor <= 1, true);
17 assertEq(major >= 5, true);