File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
test/hotspot/jtreg/runtime/Vitals Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments