# HG changeset patch # User pchilanomate # Date 1544467512 18000 # Node ID 13173122094f367e0b2c32a473527bfd760363eb # Parent 3add7ef7c40cfd8b145db1450f98ed36bf180fab 8215050: [TESTBUG] serviceability/tmtools/jstack/WaitNotifyThreadTest.java fails when run with flag -Xcomp Summary: Identified special case when monitor address is not available in jstack Reviewed-by: dholmes, hseigel, coleenp diff -r 3add7ef7c40c -r 13173122094f test/hotspot/jtreg/serviceability/tmtools/jstack/WaitNotifyThreadTest.java --- a/test/hotspot/jtreg/serviceability/tmtools/jstack/WaitNotifyThreadTest.java Mon Dec 10 13:24:17 2018 -0500 +++ b/test/hotspot/jtreg/serviceability/tmtools/jstack/WaitNotifyThreadTest.java Mon Dec 10 13:45:12 2018 -0500 @@ -152,7 +152,11 @@ throw new RuntimeException("Cannot found monitor info associated with " + OBJECT_WAIT + " method"); } if (mi.getLocks().size() == 1) { - assertMonitorInfo("locked", mi.getLocks().getLast(), monitorAddress, RUN_METHOD); + MonitorInfo monInfo = mi.getLocks().getLast(); + if (monitorAddress.equals("no object reference available")) { + monitorAddress = monInfo.getMonitorAddress(); + } + assertMonitorInfo("locked", monInfo, monitorAddress, RUN_METHOD); } else { throw new RuntimeException(RUN_METHOD + " method has to contain one lock record but it contains "