An advanced JDK with ahead-of-time Native Image compilation
I am fortunate enough to base my research on a real world industry ready virtual machine. In particular, my research aims at improving the static analysis used in GraalVM Native Image, which is an ahead-of-time compiler for Java.
My first paper was about speeding up Native Image compilation with a faster analysis (Kozak et al., 2023) and now we have a few other papers on the go, which should hopefully appear here shortly.
References
2023
MPLR
Comparing Rapid Type Analysis with Points-To Analysis in GraalVM Native Image
David Kozak , Vojin Jovanovic , Codrut Stancu , and 2 more authors
In Proceedings of the 20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes , 2023
Whole-program analysis is an essential technique that enables advanced compiler optimizations. An important example of such a method is points-to analysis used by ahead-of-time (AOT) compilers to discover program elements (classes, methods, fields) used on at least one program path. GraalVM Native Image uses a points-to analysis to optimize Java applications, which is a time-consuming step of the build. We explore how much the analysis time can be improved by replacing the points-to analysis with a rapid type analysis (RTA), which computes reachable elements faster by allowing more imprecision. We propose several extensions of previous approaches to RTA: making it parallel, incremental, and supporting heap snapshotting. We present an extensive experimental evaluation of the effects of using RTA instead of points-to analysis, in which RTA allowed us to reduce the analysis time for Spring Petclinic (a popular demo application of the Spring framework) by 64% and the overall build time by 35% at the cost of increasing the image size due to the imprecision by 15%.
@inproceedings{mplr23,author={Kozak, David and Jovanovic, Vojin and Stancu, Codrut and Vojnar, Tom\'{a}\v{s} and Wimmer, Christian},title={Comparing Rapid Type Analysis with Points-To Analysis in GraalVM Native Image},year={2023},isbn={9798400703805},publisher={Association for Computing Machinery},address={New York, NY, USA},url={https://doi.org/10.1145/3617651.3622980},doi={10.1145/3617651.3622980},booktitle={Proceedings of the 20th ACM SIGPLAN International Conference on Managed Programming Languages and Runtimes},pages={129–142},numpages={14},keywords={GraalVM, Java, ahead-of-time compilation, compiler, optimization, static analysis},location={Cascais, Portugal},series={MPLR 2023},}