3 ms·
And digging deeper, the Hotspot VM has ~250k lines of C/C++. This provides: 1) Class loader 2) Bytecode interpreter 3) 2 JITs 4) 3 Garbage collectors 5) Hi
by ianopolous 10y ago
And digging deeper, the Hotspot VM has ~250k lines of C/C++. This provides:
1) Class loader
2) Bytecode interpreter
3) 2 JITs
4) 3 Garbage collectors
5) High performance synchronization primitives
My understanding is that the aim of Graal is to replace the JITs, that Truffle will replace (1) and (2) and the Substrate VM will replace (4) and (5).
So most of the C/C++ should disappear. (I don't know what the substrate VM is written in, but it is much smaller regardless)
- nickpsecurity 10y agoGoing by this presentation after reading the Graal slides: http://www.oracle.com/technetwork/java/jvmls2013wimmer-2014084.pdf http://www.oracle.com/technetwork/java/jvmls2013wimmer-20140... The documentation of all of them is terrible as there's no clear explanation of Truffle and Substrate: jumps right into technical stuff with a barrage of techniques. Truffle appears to be a toolkit for generating parsers/compilers plus integration interface for the VM's. I don't see mention of replacing class loader and bytecode interpreter. Whereas Graal is a combo, per slide images, of Hotspot bottom parts and Java-based compiler/JIT. It at least has huge code reduction plus safer code over original VM in their illustrations. Only 60Kloc. Going from there, the linked PDF shows Truffle connecting to either GraalVM or Substrate VM. In one slide, it references GraalVM like it's necessary for integrating with Java applications while calling Substrate embeddable. Makes me think Substrate is standalone apps. In another slide, it visually implies that Substrate compiles your code and just Java classes you need into one executable that maybe can't load others. It's not clear if Substrate is reusing the C/C++ code of 1, 2, 4, or 5 from HotSpot for lower layers. All in all, they're doing interesting things but I'm too confused to evaluate them. Do you have any links that are more specific on these issues, esp how SubstrateVM works or whether Graal uses C/C++ code for bottom layers as in picture? I can't evaluate them without even an internal architecture description.