From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- js/src/jit-test/tests/gc/pretenure-array-long-lived.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 js/src/jit-test/tests/gc/pretenure-array-long-lived.js (limited to 'js/src/jit-test/tests/gc/pretenure-array-long-lived.js') diff --git a/js/src/jit-test/tests/gc/pretenure-array-long-lived.js b/js/src/jit-test/tests/gc/pretenure-array-long-lived.js new file mode 100644 index 0000000000..77ea7c0efc --- /dev/null +++ b/js/src/jit-test/tests/gc/pretenure-array-long-lived.js @@ -0,0 +1,17 @@ +// Allocate many long-lived objects and check that we pretenure them. + +load(libdir + "pretenure.js"); + +setupPretenureTest(); + +allocateArrays(nurseryCount, true); // Warm up. + +let { minor, major } = runTestAndCountCollections( + () => allocateArrays(tenuredCount, true) +); + +// Check that after the warm up period we 'only' do major GCs (we allow one +// nursery collection). +print(`${minor} minor GCs, ${major} major GCs`); +assertEq(minor <= 1, true); +assertEq(major >= 5, true); -- cgit v1.2.3