Dynamic Look Ahead Compilation: A Technique to Hide JIT Compilation Latencies in Multicore Environment

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5501)


Object-code virtualization, commonly used to achieve software portability, relies on a virtual execution environment, typically comprising an interpreter used for initial execution of methods, and a JIT for native code generation. The availability of multiple processors on current architectures makes it attractive to perform dynamic compilation in parallel with application execution. The major issue is to decide at runtime which methods to compile ahead of execution, and how much time to invest in their optimization. This research introduces an abstract model, termed Dynamic Look Ahead (DLA) compilation, which represents the available information on method calls and computational weight as a weighted graph. The graph dynamically evolves as computation proceeds. The model is then instantiated by specifying criteria for adaptively choosing the method compilation order. The DLA approach has been applied within our dynamic compiler for .NET. Experimental results are reported and analyzed, for both synthetic programs and benchmarks. The main finding is that a careful choice of method-selection criteria, based on light-weight program analysis and execution tracing, is essential to mask compilation times and to achieve higher overall performances. On multi-processors, the DLA approach is expected to challenge the traditional virtualization environments based on bytecode interpretation and JITing, thus bridging the gap between ahead-of-time and just-in-time translation.


Virtual Machine Execution Trace Intermediate Representation Call Graph Branch Prediction 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Agosta, G., Crespi Reghizzi, S., Palumbo, P., Sykora, M.: Selective compilation via fast code analysis and bytecode tracing. In: SAC 2006, pp. 906–911. ACM, New York (2006)CrossRefGoogle Scholar
  2. 2.
    Arnold, M., Fink, S.J., Grove, D., Hind, M., Sweeney, P.F.: A Survey of Adaptive Optimization in Virtual Machines. Proceedings of the IEEE 93(2), 449–466 (2005)CrossRefGoogle Scholar
  3. 3.
    Aycock, J.: A Brief History of Just-In-Time. ACM Comp. Surveys 35(2), 97–113 (2003)CrossRefGoogle Scholar
  4. 4.
    Bacon, D.F., Graham, S.L., Sharp, O.J.: Compiler Transformations for High-Performance Computing. ACM Computing Surveys 26(4), 345–420 (1994)CrossRefGoogle Scholar
  5. 5.
    Ball, T., Larus, J.R.: Branch Prediction For Free. In: SIGPLAN Conference on Programming Language Design and Implementation, pp. 300–313 (1993)Google Scholar
  6. 6.
    BEA JRockit: Java for the enterprise technical white paper (2006)Google Scholar
  7. 7.
    Campanoni, S., Agosta, G., Crespi Reghizzi, S.: A parallel dynamic compiler for CIL bytecode. SIGPLAN Not. 43(4), 11–20 (2008)CrossRefGoogle Scholar
  8. 8.
    Dean, J., Grove, D., Chambers, C.: Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis. In: Olthoff, W. (ed.) ECOOP 1995. LNCS, vol. 952, pp. 77–101. Springer, Heidelberg (1995)Google Scholar
  9. 9.
    Deitrich, B.L., Cheng, B.-C., Hwu, W.-M.W.: Improving Static Branch Prediction in a Compiler. In: IEEE PACT, pp. 214–221 (1998)Google Scholar
  10. 10.
    Dunlavey, M.: Performance tuning with instruction-level cost derived from call-stack sampling. SIGPLAN Not. 42(8), 4–8 (2007)CrossRefGoogle Scholar
  11. 11.
    Blackburn, S.M., et al.: The DaCapo benchmarks: java benchmarking development and analysis. In: OOPSLA, pp. 169–190 (2006)Google Scholar
  12. 12.
    Harris, T.: Controlling run-time compilation. In: Procedings of the IEEE Workshop on Programming Languages for Real-Time Industrial Applications, pp. 75–84 (1998)Google Scholar
  13. 13.
    Kistler, T., Franz, M.: Continuous program optimization: A case study. ACM Trans. Program. Lang. Syst. 25(4), 500–548 (2003)CrossRefGoogle Scholar
  14. 14.
    Krintz, C.J., Grove, D., Sarkar, V., Calder, B.: Reducing the overhead of dynamic compilation. Software Practice and Experience 31(8), 717–738 (2001)CrossRefzbMATHGoogle Scholar
  15. 15.
    Kulkarni, P., Arnold, M., Hind, M.: Dynamic compilation: the benefits of early investing. In: VEE, pp. 94–104 (2007)Google Scholar
  16. 16.
    Mathew, J.A., Coddington, P.D., Hawick, K.A.: Analysis and development of Java Grande benchmarks. In: JAVA 1999: Proceedings of the ACM 1999 conference on Java Grande, pp. 72–80. ACM Press, New York (1999)CrossRefGoogle Scholar
  17. 17.
    Le Métayer, D.: ACE: an automatic complexity evaluator. ACM Trans. Program. Lang. Syst. 10(2), 248–266 (1988)CrossRefGoogle Scholar
  18. 18.
    Paleczny, M., Vick, C.A., Click, C.: The Java HotSpot Server Compiler. In: Java Virtual Machine Research and Technology Symposium (2001)Google Scholar
  19. 19.
    Patterson, J.R.C.: Accurate Static Branch Prediction by Value Range Propagation. In: SIGPLAN Conf. on Programming Language Design and Implementation, pp. 67–78 (1995)Google Scholar
  20. 20.
    Pozo, R., Miller, B.: SciMark benchmark,
  21. 21.
    Proebsting, T.A., Townsend, G., Bridges, P., Hartman, J.H., Newsham, T., Watterson, S.A.: Toba: Java For Applications, A Way Ahead of Time (WAT) Compiler. In: Proc. of the Third Conference on Object-Oriented Technologies and Systems (June 1997)Google Scholar
  22. 22.
    Rayside, D.: Polymorphism is a Problem. In: Panel on Reverse Engineering and Architecture (CSMR 2002) (March 2002)Google Scholar
  23. 23.
    Shudo, K.: Performance comparison of java/.net runtimes (2005),
  24. 24.
    Sun Microsystems Java team. The Java HotSpot Virtual Machine, v1.4.1Google Scholar
  25. 25.
    Unnikrishnan, P., Kandemir, M., Li, F.: Reducing dynamic compilation overhead by overlapping compilation and execution. In: ASP-DAC 2006: Proceedings of the 2006 conference on Asia South Pacific design automation, Piscataway, NJ, USA, pp. 929–934. IEEE, Los Alamitos (2006)Google Scholar
  26. 26.
    Zhao, M., Childers, B.R., Soffa, M.L.: An approach toward profit-driven optimization. ACM Trans. Archit. Code Optim. 3(3), 231–262 (2006)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  1. 1.Politecnico di MilanoMilanoItaly

Personalised recommendations