Skip to content

Commit c8d5cbe

Browse files
SapMachine SAP#2088: Failure in VitalsValuesSanityCheck
1 parent 738cb98 commit c8d5cbe

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/hotspot/jtreg/runtime/Vitals/VitalsValuesSanityCheck.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,12 @@ public void run(CommandExecutor executor) {
319319
// we should not see mlc > rss
320320
if (jvm_nmt_mlc != -1) {
321321
if (Platform.isDebugBuild()) {
322-
if (proc_rss_all < jvm_nmt_mlc) {
323-
throw new RuntimeException("NMT mlc higher than RSS?");
322+
// Give a little slack for two reasons:
323+
// - Not all allocated memory has to be in RSS, since some could be swapped out.
324+
// - The peak RSS and peak malloc size are not taken at the exactly same time.
325+
// Both should not lead to a large difference, so we allow a 25 percent deviation.
326+
if (proc_rss_all * 1.25 <= jvm_nmt_mlc) {
327+
throw new RuntimeException("NMT mlc more than 25 percent higher than RSS?");
324328
}
325329
}
326330
}

0 commit comments

Comments
 (0)