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

Some Unsafe.defineAnonymousClass classes are bytecode-verified

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • None

      From the talks we had with VM guys, the VM anonymous classes are supposed to be non-verified by default. However, in some cases they are verified, as seen in performance profiles.

      Running the targeted test with fastdebug build and -XX:+TraceClassInitialization:
       http://cr.openjdk.java.net/~shade/8059605/unsafe-dac-verify/src/main/java/org/openjdk/UnsafeDefineAnonymousClass.java
       http://cr.openjdk.java.net/~shade/8059605/unsafe-dac-verify/target/test.jar

      $ ~/trunks/jdk9-dev/build/linux-x86_64-normal-server-fastdebug/images/j2sdk-image/bin/java -XX:+TraceClassInitialization -jar target/test.jar
      ...
      3325 Initializing 'Class2847'(no method) (0x00000007c033d830)
      Start class verification for: Class2848/737945227
      End class verification for: Class2848/737945227
      3326 Initializing 'Class2848'(no method) (0x00000007c033dc30)
      Start class verification for: Class2849/797814020
      End class verification for: Class2849/797814020
      3327 Initializing 'Class2849'(no method) (0x00000007c033e030)
      Start class verification for: Class2850/702846463
      End class verification for: Class2850/702846463
      ...

            Unassigned Unassigned
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: