News for hackers. Stuff that matters.
Re:OpenJDK Proposes Project Galahad to Merge GraalVM Native ... by mike_hearn on Wednesday December 21, 2022 @04:02PM (#34086356)
Where did you get the 1% figure from? HotSpot has millions of lines of C++, that seems far too low.

Graal doesn't affect memory management. It's a JIT compiler, not a GC. Although there's a relatively simple GC written in SystemJava for native images, G1, ZGC and Parallel will continue to be the standard GCs in the regular JVM for the foreseeable future and they are all written in C++.

Re:OpenJDK Proposes Project Galahad to Merge GraalVM Native ... by taeric on Wednesday December 21, 2022 @04:09PM (#34086424)
To add to your question, assuming the tooling at github is ok, it has ~20% as c/c++ for https://github.com/openjdk/jdk. I would think most of that would be concentrated in the hotspot code, but I don't know. Would be delighted to know what the original post was referring to.
Re:OpenJDK Proposes Project Galahad to Merge GraalVM Native ... by fathyb on Wednesday December 21, 2022 @04:17PM (#34086522)
I think the entirety of Hotspot is written in C++ [0]? The standard library in the JDK is mostly written in Java, but the VM itself with the GC and JIT code is in C++, which makes sense.

If you do not count the standard library as part of the JVM (but part of the JDK), then the JVM is written mostly in C++.

[0]: https://github.com/openjdk/jdk/tree/master/src/hotspot

Re:OpenJDK Proposes Project Galahad to Merge GraalVM Native ... by taeric on Wednesday December 21, 2022 @06:29PM (#34087777)
That definitely matches my read of the source. Would still be delighted to know there is something else going on, though. :D
Re:OpenJDK Proposes Project Galahad to Merge GraalVM Native ... by samus on Wednesday December 21, 2022 @08:19PM (#34088544)
Because of its inherent memory safety, Java is attractive for anything in the JVM which is not strictly necessary to be coded in C/C++ for some reason (raw performance, low-level, or OS-specific). With Projects Valhalla ann Panama around the corner, there will be even less hard reasons going forward. Also, C/C++ compilers can be tricky dependencies at times.