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

Exclude AOT tooling classes from AOT cache

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • 25
    • None
    • hotspot

      "AOT tooling classes" are classes that are used only in the AOT training/assembly phases and are not needed in production runs.

      These classes should be excluded to save footprint. With the upcoming JDK-8325147 (Ahead-of-Time Method Profiling), profiles for the tooling classes should be also be excluded, or else the JVM may compile many methods at start-up which aren't going to be used.

      ==============

      For example, when running HelloWorld with -XX:AOTMode=record, these classes are loaded only by java/lang/invoke/GenerateJLIClassesHelper to generate lambda form holder classes customized for this application. Excluding these classes shrinks the AOT cache from 9,981,952 to 9,682,944 bytes.

      java/lang/classfile/attribute/ExceptionsAttribute
      java/lang/classfile/CodeBuilder$1
      java/lang/invoke/ClassSpecializer$Factory$1
      java/lang/invoke/ClassSpecializer$Factory$1$1
      java/lang/invoke/ClassSpecializer$Factory$1$1Var
      java/lang/invoke/ClassSpecializer$Factory$1$2
      java/lang/invoke/ClassSpecializer$Factory$1$3
      java/lang/invoke/ClassSpecializer$Factory$1$4
      java/lang/invoke/ClassSpecializer$Factory$1$5
      java/lang/invoke/ClassSpecializer$Factory$1$5$1
      java/lang/invoke/GenerateJLIClassesHelper
      java/lang/invoke/GenerateJLIClassesHelper$HolderClassBuilder
      java/lang/invoke/MethodHandleImpl$2
      java/lang/invoke/MethodHandleImpl$IntrinsicMethodHandle
      java/util/ArrayList$Itr
      java/util/ArrayList$SubList
      java/util/Arrays$ArrayList
      java/util/NavigableMap
      java/util/NavigableSet
      java/util/SequencedMap
      java/util/SequencedSet
      java/util/SortedMap
      java/util/SortedSet
      java/util/Spliterators$ArraySpliterator
      java/util/stream/ForEachOps
      java/util/stream/ForEachOps$ForEachOp
      java/util/stream/ForEachOps$ForEachOp$OfRef
      java/util/stream/TerminalSink
      java/util/TreeMap
      java/util/TreeMap$Entry
      java/util/TreeMap$EntryIterator
      java/util/TreeMap$EntrySet
      java/util/TreeMap$KeyIterator
      java/util/TreeMap$KeySet
      java/util/TreeMap$PrivateEntryIterator
      java/util/TreeMap$ValueIterator
      java/util/TreeMap$Values
      java/util/TreeSet
      jdk/internal/classfile/impl/AbstractAttributeMapper$ExceptionsMapper
      jdk/internal/classfile/impl/UnboundAttribute$UnboundExceptionsAttribute

            iklam Ioi Lam
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: