On Sun, 19 Mar 2023 09:01:26 GMT, Eirik Bjorsnos <d...@openjdk.org> wrote:

> Please help review this PR which suggests we remove the class 
> `java.lang.Compiler`. The class seems non-functional for a decade, and was 
> terminally deprecated in Java 9. Time has come to let it go.

A search of 3M classes in 130k artifacts found just 8 references to this class. 
6 of the 8 are versions of the same thing seem to be an off-label usage in a 
class named net.openhft.chronicle.core.Jvm where it calls Compiler.enable() 
instead of Thread.onSpinWait on older JDK releases.

I remember the Azul mails from 2016 on this topic but I don't think they 
provided sufficient insight why an application would using this barely 
documented API. Anything relying on these methods to do something is probably 
very tied to the VM implementation.

-Djava.compiler=NONE pre-dates "full speed debugging" and I would think all 
traces can be removed now. Yes, there is still a reference to this system 
property in System.getProperties that could be looked at too. All of these 
things are low priority. The good thing about removing java.lang.Compiler is 
that is avoids new developers from stumbling on it.

-------------

PR: https://git.openjdk.org/jdk/pull/13092

Reply via email to