Computer Science ›› 2026, Vol. 53 ›› Issue (11A): 260400015-1016.doi: 10.11896/jsjkx.260400015

• Computer Software & Architecture • Previous Articles     Next Articles

Machine Learning Based Profile Maturity Classification Method

ZHANG Wenjie1, CAI Chunhao2, ZHANG Haijun2, LIANG Shuping2, XIAO Zhiyong1   

  1. 1 School of Artificial Intelligence and Computer Science,Jiangnan University,Wuxi,Jiangsu 214122,China
    2 Department of Language and Compiler Research and Development,Wuxi Institute of Advanced Technology,Wuxi,Jiangsu 214122,China
  • Online:2026-11-16 Published:2026-11-16
  • About author:ZHANG Wenjie,born in 2002,postgra-duate,is a member of CCF(No.A17232G).His main research interests include high-level language virtual machines and just-in-time compilation.
    XIAO Zhiyong,born in 1986,Ph.D,associate professor.His main research interests include big data analytics and cloud computing.
  • Supported by:
    This work was supported by the Shandong Province Science and Technology SME Innovation Capacity Improvement Project(2025TSGCCZZB0356).

Abstract: The C2 compiler in the Java virtual machine relies on runtime profile to perform speculative optimizations.Currently,the C2 compiler determines profile maturity and whether to apply speculative optimizations using only heuristic rules,ignoring the code structure characteristics of hotspot methods.This may cause certain methods to undergo aggressive speculative optimizations before their profiles are truly mature,leading to frequent deoptimizations,increasing unnecessary compilation overhead,and prolonging JVM warm-up time.To address this issue,this paper proposes PMC(Profile Maturity Classifier),a machine-learning-based profile classifier that categorizes hotspot method profiles into two classes:Mature and Immature.Speculative optimizations are disabled for Immature profiles and enabled for Mature profiles.PMC is integrated into the C2 compiler’s compilation workflow and evaluated on the DaCapo benchmark suite.Experimental results show that,across all workloads,PMC reduces JVM warm-up time by an average of approximately 2.39% while maintaining peak performance,with a maximum improvement of 10.71%.

Key words: Just in time compiler, Java virtual machine, Speculative optimization, Deoptimization

CLC Number: 

  • TP314
[1] KOTZMANN T,WIMMER C,MÖSSENBÖCK H,et al.Design of the Java HotSpotTM client compiler for Java 6[J].ACM Transactions on Architecture and Code Optimization(TACO),2008,5(1):1-32.
[2] PALECZNY M,VICK C,CLICK C.The java {HotSpotTM}server compiler[C]//Java(TM) Virtual Machine Research and Technology Symposium(JVM 01).2001.
[3] LION D,CHIU A,SUN H,et al.{Don’t} get caught in the cold,warm-up your {JVM}:Understand and eliminate {JVM} warm-up overhead in {Data-Parallel} systems[C]//12th USENIX Symposium on Operating Systems Design and Implementation(OSDI 16).2016:383-400.
[4] WU Q,JOHN L K.Performance of Java in Function-as-a-Ser-vice Computing[C]//2022 IEEE/ACM 15th International Conference on Utility and Cloud Computing(UCC).IEEE,2022:261-266.
[5] JACKSON D,CLYNCH G.An investigation of the impact oflanguage runtime on the performance and cost of serverless functions[C]//2018 IEEE/ACM International Conference on Utility and Cloud Computing Companion(UCC Companion).IEEE,2018:154-160.
[6] SHIV K,IYER R,NEWBURNC,et al.Impact of JIT/JVM optimizations on Java application performance[C]//Seventh Workshop on Interaction Between Compilers and Computer Architectures(INTERACT-7 2003).IEEE,2003:5-13.
[7] SUGANUMA T,YASUE T,KAWAHITO M,et al.A dynamic optimization framework for a Java just-in-time compiler[J].ACM SIGPLAN Notices,2001,36(11):180-195.
[8] WÜRTHINGER T,WIMMER C,MÖSSENBÖCK H.Arraybounds check elimination in the context of deoptimization[J].Science of Computer Programming,2009,74(5/6):279-295.
[9] FINK S J,QIAN F.Design,implementation and evaluation ofadaptive recompilation with on-stackreplacement[C]//International Symposium on Code Generation and Optimization(CGO 2003).IEEE,2003:241-252.
[10] PROKOPEC A,ROSÀ A,LEOPOLDSEDER D,et al.Renaissance:benchmarking suite for parallel applications on the JVM[C]//Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation.2019:31-47.
[11] ROTEM N,CUMMINS C.Profile guided optimization withoutprofiles:A machine learning approach[J].arXiv:2112.14679,2021.
[12] MILIKIC L,CUGUROVIC M,JOVANOVIC V.GraalNN:Con-text-Sensitive Static Profiling with Graph Neural Networks[C]//Proceedings of the 23rd ACM/IEEE International Symposium on Code Generation and Optimization.2025:123-136.
[13] ĞUGUROVIĆ M,JANIĞIĆ M V,JOVANOVIĆV,et al.GraalSP:Polyglot,efficient,and robust machine learning-based static profiler[J].Journal of Systems and Software,2024,213:112058.
[14] ZHENG Y,BULEJ L,BINDER W.An empirical study on deoptimization in the graal compiler[C]//31st European Conference on Object-Oriented Programming(ECOOP 2017).Schloss Dagstuhl-Leibniz-Zentrum für Informatik,2017:30:1-30:30.
[15] PEDREGOSA F,VAROQUAUX G,GRAMFORT A,et al.Scikit-learn:Machine learning in Python[J].Journal of Machine Learning Research,2011,12:2825-2830.
[16] BLACKBURN S M,GARNER R,HOFFMANN C,et al.TheDaCapo benchmarks:Java benchmarking development and analysis[C]//Proceedings of the 21st Annual ACM IGPLAN Conference on Object-oriented Programming Systems,Languages,and Ppplications.2006:169-190.
[17] BLACKBURN S M,CAI Z,CHEN R,et al.Rethinking Java Performance Analysis[C]//Proceedings of the 30th ACM International Conference on Architectural Support for Programming Languages and Operating Systems,Volume 1.2025:940-954.
[18] WADE A W,KULKARNI P A,JANTZ M R.AOT vs.JIT:im-pact of profile data on code quality[C]//Proceedings of the 18th ACM SIGPLAN/SIGBED Conference on Languages,Compi-lers,and Tools for Embedded Systems.2017:1-10.
[19] WADE A W,KULKARNI P A,JANTZM R.Exploring impact of profile data on code quality in the hotspot JVM[J].ACM Transactions on Embedded Computing Systems(TECS),2020,19(6):1-26.
[20] WIMMER C,STANCU C,HOFER P,et al.Initialize once,startfast:application initialization at build time[J].Proceedings of the ACM on Programming Languages,2019,3(OOPSLA):1-29.
[21] REIJERS N,SHIH C S.Improved ahead-of-time compilation ofstack-based JVM bytecode on resource-constrained devices[J].ACM Transactions on Sensor Networks(TOSN),2019,15(3):1-44.
[22] MAJO Z,HARTMANN T,MOHLER M,et al.Integrating profile caching into the hotspot multi-tier compilation system[C]//Proceedings of the 14th International Conference on Managed Languages and Runtimes.2017:105-118.
[23] ZHANG Y,GU T,ZHENG X,et al.Towards a serverless java runtime[C]//2021 36th IEEE/ACM International Conference on Automated Software Engineering(ASE).IEEE,2021:1156-1160.
[24] KHRABROV A,PIRVU M,SUNDARESAN V,et al.{JIT-Server}:Disaggregated Caching {JIT} Compiler for the {JVM} in the Cloud[C]//2022 USENIX Annual Technical Conference(USENIX ATC 22).2022:869-884.
[25] FLÜCKIGER O,JEČMEN J,KRYNSKI S,et al.Deoptless:speculation with dispatched on-stack replacement and specialized continuations[C]//Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation.2022:749-761.
[26] CUGUROVIC M,PROKOPEC A,SPASOJEVIC B,et al.GraalMHC:ML-Based Method-Hotness Classification for Binary-Size Reduction in Optimizing Compi-lers[C]//Proceedings of the 35th ACM SIGPLAN International Conference on Compiler Construction.2026:1-13.
[1] . Portability of Dalvik in iOS [J]. Computer Science, 2012, 39(Z6): 375-379.
[2] QI De-Yu, XIE Jing-Ming (College of Computer Engineering and Science, South China University of Technology,Guangzhou 510641). [J]. Computer Science, 2007, 34(6): 248-250.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!