Skip to content

Commit 97afbd9

Browse files
committed
8336410: runtime/NMT/TotalMallocMmapDiffTest.java Total malloc diff is incorrect. Expected malloc diff range
Reviewed-by: gziemski, stuefe
1 parent c095c0e commit 97afbd9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/hotspot/jtreg/runtime/NMT/TotalMallocMmapDiffTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* java.management
3333
* @build jdk.test.whitebox.WhiteBox
3434
* @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox
35-
* @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=summary -Xms32m -Xmx32m TotalMallocMmapDiffTest
35+
* @run main/othervm -Xbootclasspath/a:. -XX:TieredStopAtLevel=1 -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:NativeMemoryTracking=summary -Xms32m -Xmx32m TotalMallocMmapDiffTest
3636
*
3737
*/
3838

@@ -43,9 +43,10 @@
4343
public class TotalMallocMmapDiffTest {
4444
private static final WhiteBox wb = WhiteBox.getWhiteBox();
4545
private static final long ALLOCATE_SIZE = 250 * 1024 * 1024; // 250MB
46-
private static final double FUDGE_FACTOR = 0.2;
47-
private static final double UPPER_BOUND = ALLOCATE_SIZE * (1 + FUDGE_FACTOR);
48-
private static final double LOWER_BOUND = ALLOCATE_SIZE * (1 - FUDGE_FACTOR);
46+
private static final double FUDGE_FACTOR_UPPER = 0.3;
47+
private static final double FUDGE_FACTOR_LOWER = 0.2;
48+
private static final double UPPER_BOUND = ALLOCATE_SIZE * (1 + FUDGE_FACTOR_UPPER);
49+
private static final double LOWER_BOUND = ALLOCATE_SIZE * (1 - FUDGE_FACTOR_LOWER);
4950

5051
public static void main(String[] args) throws Exception {
5152

0 commit comments

Comments
 (0)