Review request: 8015422: Large performance hit when the StringTable is walked twice in Parallel Scavenge

Stefan Karlsson stefan.karlsson at oracle.com
Mon May 27 11:50:06 UTC 2013


http://cr.openjdk.java.net/~stefank/8015422/webrev.00/

8015422: Large performance hit when the StringTable is walked twice in 
Parallel Scavenge
Summary: Combine the calls to StringTable::unlink and 
StringTable::oops_do in Parallel Scavenge.

The patch is built on top of this clean-up patch:
  http://cr.openjdk.java.net/~stefank/8015428/webrev.00/
  http://mail.openjdk.java.net/pipermail/hotspot-dev/2013-May/009735.html

The fix has been verified to give ~10% lower young GC times on the CRM 
Sales Opty, the benchmark where this issue was found.

The GC time improvement can also be seen with this simple micro benchmark:
java -Xmx1g -Xms1g -Xmn128m -XX:-UseAdaptiveSizePolicy -XX:+PrintGC 
InternedStringBenchmark

public class InternedStringBenchmark {
     public static int numStrings = 1000000;
     public static String[] strings = new String[numStrings];
     public static Object dummy;

     public static void main(String [] args) {
         for (int i = 0; i < numStrings; i++) {
             strings[i] = String.valueOf(i).intern();
         }
         System.out.println("Interned done");
         // provoke young GCs
         while (true) {
             dummy = new byte[2 * 1024];
         }
     }
}

thanks,
StefanK



More information about the hotspot-gc-dev mailing list