RFR (XS) 8202360: [TESTBUG] runtime/LoadClass/TestResize.java needs to print output when it fails

David Holmes david.holmes at oracle.com
Wed May 16 21:54:13 UTC 2018

Hi Gerard,

On 17/05/2018 3:47 AM, Gerard Ziemski wrote:
> Hi all,
> Please review this small enhancement where we print out additional information (i.e. output from PrintSystemDictionaryAtExit), when we detect the failure.
> https://bugs.openjdk.java.net/browse/JDK-8202360
> http://cr.openjdk.java.net/~gziemski/8202360_rev1/

I don't understand what your fix is doing - sorry.

What I wanted to see was the complete history of lines of the form

"Java dictionary (table_size=107, classes=6)"

so that we can see how the table size and number of classes have changed 
leading up to the failure. But I realize now that we already get that 
from the:

System.out.println("PASS table_size:"+table_size+", classes:"+classes+" 

All that is missing is the printing of the table_size and classes when 
we throw the exception. That can be trivially fixed:

          if (loadFactor > MAX_LOAD_FACTOR) {
+          System.out.println("FAIL table_size:"+table_size+", 
            throw new RuntimeException("Load factor too high, expected 
MAX "+MAX_LOAD_FACTOR+", got "+loadFactor);
          } else {
            System.out.println("PASS table_size:"+table_size+", 
classes:"+classes+" OK");


> Testing: mach5 hs-tier1,2 (running) and hotspot/jtreg/runtime/LoadClass/TestResize.java via jtreg locally
> cheers

More information about the hotspot-runtime-dev mailing list