Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8047216

Sudden increase of frame size

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 9
    • 8
    • hotspot
    • None
    • sparc
    • solaris_10

      It looks like there is a big increase of frame size in JDK 8.
      For testing I use simple program, which measures a deep of recursion:

      public class StackOverflow {
          static int level;
          
          public static void main(String[] args) {
              try {
                  new StackOverflow().recurse();
              } catch (StackOverflowError e) {
                  System.out.println("Final Level "+level+" for JDK "+System.getProperty("java.version"));
              }
              
          }
          
          void recurse() {
              level++;
              if (level%100 == 0) System.out.println("Level "+level);
              recurse();
          }
          
      }

      There is a infinite recursion and the program measures how deep it can go before StackOverflowError happened. Interesting thing is that there is a big difference between JDK 7 and JDK 8. I am running the test on solaris sparc using 64bit JDK with fixed stack size Xss2M - to rule out different stack size defaults. Here are the results of command "binaries/solaris-sparcv9/bin/java -Xss2M -jar StackOverflow.jar" for different JDKs:
      JDK 1.6.0_65-b14 15992
      JDK 1.7.0_60-b19 15991
      JDK 1.8.0-b132 4914
      JDK 1.8.0_20-ea-b19 4843
      JDK 1.9.0-ea-b18 4843

      There is a significant difference between JDK 7 and JDK 8. It looks like this regression happened sometime after JDK 1.8.0-ea-b101, since this build still returns 15050. Similar regression can be observed on other platforms (Linux, Mac OS X) although it is not that big as on solaris/sparc.

            Unassigned Unassigned
            thurka Tomáš Hůrka
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: