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.