8336410: runtime/NMT/TotalMallocMmapDiffTest.java Total malloc diff is incorrect. Expected malloc diff range

Reviewed-by: gziemski, stuefe
This commit is contained in:
Johan Sjölen 2024-08-05 14:49:38 +00:00
parent c095c0e6a5
commit 97afbd9603

View File

@ -32,7 +32,7 @@
* java.management
* @build jdk.test.whitebox.WhiteBox
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=summary -Xms32m -Xmx32m TotalMallocMmapDiffTest
* @run main/othervm -Xbootclasspath/a:. -XX:TieredStopAtLevel=1 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=summary -Xms32m -Xmx32m TotalMallocMmapDiffTest
*
*/
@ -43,9 +43,10 @@ import jdk.test.whitebox.WhiteBox;
public class TotalMallocMmapDiffTest {
private static final WhiteBox wb = WhiteBox.getWhiteBox();
private static final long ALLOCATE_SIZE = 250 * 1024 * 1024; // 250MB
private static final double FUDGE_FACTOR = 0.2;
private static final double UPPER_BOUND = ALLOCATE_SIZE * (1 + FUDGE_FACTOR);
private static final double LOWER_BOUND = ALLOCATE_SIZE * (1 - FUDGE_FACTOR);
private static final double FUDGE_FACTOR_UPPER = 0.3;
private static final double FUDGE_FACTOR_LOWER = 0.2;
private static final double UPPER_BOUND = ALLOCATE_SIZE * (1 + FUDGE_FACTOR_UPPER);
private static final double LOWER_BOUND = ALLOCATE_SIZE * (1 - FUDGE_FACTOR_LOWER);
public static void main(String[] args) throws Exception {