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

Consider removal of code disabling JIT in Toolkit.getDefaultToolkit

XMLWordPrintable

    • b06
    • generic
    • generic

        getDefulatToolkit() has following code:

                        // We disable the JIT during toolkit initialization. This
                        // tends to touch lots of classes that aren't needed again
                        // later and therefore JITing is counter-productiive.
                        java.lang.Compiler.disable();

        It might be legacy code and because JIT seems to be diabled globally it might affect code working in other threads.

        I've checked couple tests with -XX:+PrintCompilation and observe exactly same set of compiled methods with
        and without this code. It is still possible that tracing what is accessed during toolkit initialization
        is waste of resources but i am not sure that diabling compilation does disable tracing too.

              serb Sergey Bylokhov
              igor Igor Nekrestyanov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: