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

Performance regression caused by non-inlined hot methods due to post call noop instructions

XMLWordPrintable

    • b06
    • x86_64, aarch64
    • generic

      Turning on --enable-preview (Loom) causes a set of performance regressions due to different inline tree.

      Some microbenchmarks:
      org.openjdk.bench.java.lang.StringBuilders.fromLatin1String
      regression from 9 ns/op - 18 ns/op

      org.openjdk.bench.java.lang.StringBuilders.fromLatin1StringBuilder
      regression from 15 ns/op -> 25 ns/op

      org.openjdk.bench.java.lang.reflect.Clazz.getMethodDifferentClassLoader
      regression from ~240 ns/op -> 280 ns/op
      and many others.

      The reason for the performance regression is the fact that C2 generates post call noop instructions (required for Loom) which increases the instruction size of generated methods and some methods became higher than InlineSmallCode threshold.

      Some typical non-inlined hot methods:
      java.lang.AbstractStringBuilder::<init>
      Class::getMethod
      etc.

            skuksenko Sergey Kuksenko
            skuksenko Sergey Kuksenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: