skip to main content
10.1145/1167473.1167493acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

Replay compilation: improving debuggability of a just-in-time compiler

Published:16 October 2006Publication History

ABSTRACT

The performance of Java has been tremendously improved by the advance of Just-in-Time (JIT) compilation technologies. However, debugging such a dynamic compiler is much harder than a static compiler. Recompiling the problematic method to produce a diagnostic output does not necessarily work as expected, because the compilation of a method depends on runtime information at the time of compilation.In this paper, we propose a new approach, called replay JIT compilation, which can reproduce the same compilation remotely by using two compilers, the state-saving compiler and the replaying compiler. The state-saving compiler is used in a normal run, and, while compiling a method, records into a log all of the input for the compiler. The replaying compiler is then used in a debugging run with the system dump, to recompile a method with the options for diagnostic output. We reduced the overhead to save the input by using the system dump and by categorizing the input based on how its value changes. In our experiment, the increase of the compilation time for saving the input was only 1%, and the size of the additional memory needed for saving the input was only 10% of the compiler-generated code.

References

  1. M. Arnold and B. G. Ryder. A Framework for Reducing the Cost of Instrumented Code. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI '01), pp. 168-179. June, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. D. F. Bacon. Hardware-Assisted Replay of Multiprocessor Programs. In Proceedings of 1991 ACM/ONR Workshop on Parallel and Distributed Debugging (PADD '91), pp. 194--205. May, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. M. D. Bond and K. S. McKinley. Continuous Path and Edge Profiling. In Proceedings of the 38th Annual IEEE/ACM International Symposium on Microarchitecture (MICRO '05), pp. 130--140. November, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. J. D. Choi and H. Srinivasan. Deterministic Replay of Java Multithreaded Applications. In Proceedings of the SIGMETRICS Symposium on Parallel and Distributed Tools (SPDT '98), pp. 48--59. August, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Dynamic Proxy Classes, available at http://java.sun.com/j2se/1.4.2/docs/guide/reflection/proxy.html]]Google ScholarGoogle Scholar
  6. J. Gosling, B. Joy, and G. Steele. Java Language Specification, available at http://java.sun.com/docs/books/jls/index.html]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. N. Grcevski, A. Kielstra, K. Stoodley, M. Stoodley, and V. Sundaresan. Java Just-in-Time Compiler and Virtual Machine Improvements for Server and Middleware Applications. In Proceedings of the Third Virtual Machine Research and Technology Symposium (VM '04), pp. 151--162. May, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. X. Huang, S. M. Blackburn, K. S. McKinley, J. E. B. Moss, Z. Wang, and P. Cheng. The Garbage Collection Advantage: Improving Program Locality. In Proceedings of ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA '04), pp. 69--80. October, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. K. Ishizaki, M. Kawahito, T. Yasue, H. Komatsu, and T. Nakatani. A Study of Devirtualization Techniques for a Java Just-In-Time Compiler. In Proceedings of ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2000), pp. 294--310. October, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Jigsaw - W3C's Server, available at http://www.w3.org/Jigsaw/]]Google ScholarGoogle Scholar
  11. S. Koerner, R. Bawidamann, W. Fischer, U. Helmich, D. Koldt, B. K. Tolan, and P. Wojciak. The z990 first error data capture concept. IBM Journal of Research and Development, Vol. 48(3/4), pp. 557--568. May, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. T. J. LeBlanc, J. M. Mellor-Crummey. Debugging parallel programs with Instant Replay. IEEE Transactions on Computers, Vol. C-36(4), pp. 471--482. April, 1987.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. T. Lindholm and F. Yellin. The Java Virtual Machine Specification, available at http://java.sun.com/docs/books/vmspec/index.html]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. B. P. Miller and J. D. Choi. A Mechanism for Efficient Debugging of Parallel Programs. In Proceedings of the ACM SIGPLAN 1988 Conference on Programming Language Design and Implementation (PLDI '88), pp. 135--144. June, 1988.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Paleczny, C. Vick, and C. Click. The Java HotSpot Server Compiler. In Proceedings of the Java Virtual Machine Research and Technology Symposium (JVM '01), pp. 1--12. April, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. D. Z. Pan and M. A. Linton. Supporting Reverse Execution of Parallel Programs. In Proceedings of the 1988 ACM SIGPLAN and SIGOPS Workshop on Parallel and Distributed Debugging (PADD '88), pp. 124--129. May, 1988.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Ronsse, K. D. Bosschere, and J. C. Kergommeaux. Execution replay and debugging. In Proceedings of the Fourth International Workshop on Automated and Algorithmic Debugging (AADEBUG 2000). August, 2000.]]Google ScholarGoogle Scholar
  18. Standard Performance Evaluation Corporation. SPEC JBB2000, available at http://www.spec.org/osg/jbb2000/]]Google ScholarGoogle Scholar
  19. Standard Performance Evaluation Corporation. SPEC JVM98, available at http://www.spec.org/osg/jvm98/]]Google ScholarGoogle Scholar
  20. T. Suganuma, T. Ogasawara, M. Takeuchi, T. Yasue, M. Kawahito, K. Ishizaki, H. Komatsu, and T. Nakatani. Overview of the IBM Java Just-In-Time Compiler. IBM Systems Journal, Java Performance Issue, Vol. 39(1), pp. 175--193. February, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. L. Stepanian, A. D. Brown, A, Kielstra, G. Koblents, and K. Stoodly. Inlining Java Native Calls At Runtime. In Proceedings of ACM/Usenix International Conference On Virtual Execution Environments (VEE '05), pp. 121--131. June, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. J. Steven, P. Chandra, B. Fleck, and A. Podgurski. jRapture: A Capture/Replay Tool for Observation-Based Testing. In Proceedings of International Symposium on Software Testing and Analysis (ISSTA 2000), pp. 158--167. August, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. V. Sundaresan, D. Maier, P. Ramarao, and M. Stoodley. Experiences with Multi-threading and Dynamic Class Loading in a Java Just-In-Time Compiler. In Proceedings of the International Symposium on Code Generation and Optimization (CGO '06), pp. 87--97. March, 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. UNIX System Certification, available at http://www.opengroup.org/certification/unix-home.html]]Google ScholarGoogle Scholar
  25. J. Whaley. A Portable Sampling-Based Profiler for Java Virtual Machines. In Proceedings of ACM 2000 Java Grande Conference, pp. 78--87. June 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. XML Parser for Java, available at http://www.alphaworks.ibm.com/tech/xml4j]]Google ScholarGoogle Scholar
  27. T. Yasue, T. Suganuma, H. Komatsu, and T. Nakatani. An Efficient Online Path Profiling Framework for Java Just-In-Time Compilers. In Proceedings of the Twelfth International Conference on Parallel Architectures and Compilation Techniques (PACT-2003), pp. 148--158. September, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. zlib, available at http://www.gzip.org/zlib/]]Google ScholarGoogle Scholar

Index Terms

  1. Replay compilation: improving debuggability of a just-in-time compiler

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!