skip to main content
research-article
Free Access

Maxine: An approachable virtual machine for, and in, java

Published:20 January 2013Publication History
Skip Abstract Section

Abstract

A highly productive platform accelerates the production of research results. The design of a Virtual Machine (VM) written in the Java™ programming language can be simplified through exploitation of interfaces, type and memory safety, automated memory management (garbage collection), exception handling, and reflection. Moreover, modern Java IDEs offer time-saving features such as refactoring, auto-completion, and code navigation. Finally, Java annotations enable compiler extensions for low-level “systems programming” while retaining IDE compatibility. These techniques collectively make complex system software more “approachable” than has been typical in the past.

The Maxine VM, a metacircular Java VM implementation, has aggressively used these features since its inception. A co-designed companion tool, the Maxine Inspector, offers integrated debugging and visualization of all aspects of the VM's runtime state. The Inspector's implementation exploits advanced Java language features, embodies intimate knowledge of the VM's design, and even reuses a significant amount of VM code directly. These characteristics make Maxine a highly approachable VM research platform and a productive basis for research and teaching.

References

  1. Alpern, B., Attanasio, C. R., Barton, J. J., Burke, M. G., Cheng, P., Choi, J.-D., Cocchi, A., Fink, S. J., Grove, D., Hind, M., Hummel, S. F., Lieber, D., Litvinov, V., Mergen, M. F., Ngo, T., Russell, J. R., Sarkar, V., Serrano, M. J., Shepherd, J. C., Smith, S. E., Sreedhar, V. C., Srinivasan, H., and Whaley, J. 2000. The Jalapeño virtual machine. IBM Syst. J. 39, 1, 211--238. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Alpern, B., Attanasio, C. R., Cocchi, A., Hummel, S. F., Lieber, D., Mergen, M., Shepherd, J. C., and Smith, S. 1999. Implementing Jalapeño in Java. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications. ACM Press, 314--324. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Ancona, D., Ancona, M., Cuni, A., and Matsakis, N. D. 2007. RPython: A step towards reconciling dynamically and statically typed OO languages. In Proceedings of the Dynamic Languages Symposium. ACM Press, 53--64. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Arnold, M., Fink, S., Grove, D., Hind, M., and Sweeney, P. F. 2000. Adaptive optimization in the Jalapeño JVM. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications. ACM Press, 47--65. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Bacon, D. F., Konuru, R., Murthy, C., and Serrano, M. 1998. Thin locks: Featherweight synchronization for Java. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, 258--268. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Barham, P., Dragovic, B., Fraser, K., Hand, S., Harris, T., Ho, A., Neugebauer, R., Pratt, I., and Warfield, A. 2003. Xen and the art of virtualization. In Proceedings of the ACM Symposium on Operating Systems Principles. ACM Press, 164--177. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Blackburn, S. M., Cheng, P., and McKinley, K. S. 2004. Oil and water? High performance garbage collection in Java with MMTk. In Proceedings of the International Conference on Software Engineering. IEEE. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Blackburn, S. M., Garner, R., Hoffman, C., Khan, A. M., McKinley, K. S., Bentzur, R., Diwan, A., Feinberg, D., Frampton, D., Guyer, S. Z., Hirzel, M., Hosking, A., Jump, M., Lee, H., Moss, J. E. B., Phansalkar, A., Stefanović, D., VanDrunen, T., von Dincklage, D., and Wiedermann, B. 2006. The DaCapo benchmarks: Java benchmarking development and analysis. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications. ACM Press, 169--190. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Blackburn, S. M., Salishev, S. I., Danilov, M., Mokhovikov, O. A., Nashatyrev, A. A., Novodvorsky, P. A., Bogdanov, V. I., Li, X. F., and Ushakov, D. 2008. The Moxie JVM experience. Tech. rep. TR-CS-08-01, Department of Computer Science, The Australian National University.Google ScholarGoogle Scholar
  10. Burke, M. G., Choi, J.-D., Fink, S., Grove, D., Hind, M., Sarkar, V., Serrano, M. J., Sreedhar, V. C., Srinivasan, H., and Whaley, J. 1999. The Jalapeño dynamic optimizing compiler for Java. In Proceedings of the ACM Conference on Java Grande. ACM Press, 129--141. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Chambers, C. 1998. The Cecil language specification and rationale, version 3.0. Tech. rep., Department of Computer Science and Engineering, University of Washington.Google ScholarGoogle Scholar
  12. Chambers, C., Ungar, D., and Lee, E. 1989. An efficient implementation of SELF, a dynamically-typed object-oriented language based on prototypes. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications. ACM Press, 49--70. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Dean, J., Grove, D., and Chambers, C. 1995. Optimization of object-oriented programs using static class hierarchy analysis. In Proceedings of the European Conference on Object-Oriented Programming. Lecture Notes in Computer Science, Vol. 952, Springer, 77--101. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Deutsch, L. P. and Schiffman, A. M. 1984. Efficient implementation of the Smalltalk-80 system. In Proceedings of the ACM SIGPLAN Symposium on Principles of Programming Languages. ACM Press, 297--302. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Frampton, D., Blackburn, S. M., Cheng, P., Garner, R. J., Grove, D., Moss, J. E. B., and Salishev, S. I. 2009. Demystifying magic: High-Level low-level programming. In Proceedings of the ACM/USENIX International Conference on Virtual Execution Environments. ACM Press, 81--90. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Goldberg, A. and Robson, D. 1983. Smalltalk-80: The Language and Its Implementation. Addison-Wesley. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Hölzle, U., Chambers, C., and Ungar, D. 1992. Debugging optimized code with dynamic deoptimization. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, 32--43. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Ingalls, D., Kaehler, T., Maloney, J., Wallace, S., and Kay, A. 1997. Back to the future: The story of Squeak, a practical Smalltalk written in itself. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications. ACM Press, 318--326. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Java.net. 2012. Java HotSpot client compiler visualizer. http://java.net/projects/c1visualizer/Google ScholarGoogle Scholar
  20. Jikes RVM. 2002. The Jikes#8482; research virtual machine user's guide v2.1.1. http://sourceforge.net/projects/jikesrvm/files/jikesrvm/2.1.1/jikesrvm-2.1.1.tar.gz, file: userguide.psGoogle ScholarGoogle Scholar
  21. Kotzmann, T., Wimmer, C., Mössenböck, H., Rodriguez, T., Russell, K., and Cox, D. 2008. Design of the Java HotSpot#8482; client compiler for Java 6. ACM Trans. Archit. Code Optim. 5, 1, Article 7. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Lindholm, T., Yellin, F., Bracha, G., and Buckley, A. 2012. The Java virtual machine specification, Java SE 7 edition. http://docs.oracle.com/javase/specs/jvms/se7/jvms7.pdf Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. McCarthy, J. 1978. History of LISP. In Proceedings of History of Programming Languages. ACM Press, 173--185. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Ngo, T. and Barton, J. 2000. Debugging by remote reflection. In Proceedings of Euro-Par 2000 - Parallel Processing. Lecture Notes in Computer Science. Springer, 1031--1038. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Ogata, K., Mikurube, D., Kawachiya, K., Trent, S., and Onodera, T. 2010. A study of Java's non-Java memory. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications. ACM Press, 191--204. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Oracle. 2012a. The Java HotSpot performance engine architecture. http://www.oracle.com/technetwork/java/whitepaper-135217.htmlGoogle ScholarGoogle Scholar
  27. Oracle. 2012b. Maxine virtual edition. http://labs.oracle.com/projects/guestvm/Google ScholarGoogle Scholar
  28. Oracle. 2012c. Maxine VM source code. http://kenai.com/projects/maxine/Google ScholarGoogle Scholar
  29. Oracle. 2012d. Maxine VM wiki. https://wikis.oracle.com/display/MaxineVM/Google ScholarGoogle Scholar
  30. Oracle. 2012e. OpenJDK. http://openjdk.java.net/Google ScholarGoogle Scholar
  31. Oracle. 2012f. OpenJDK: Common VM interface. http://openjdk.java.net/projects/cvmi/Google ScholarGoogle Scholar
  32. Oracle. 2012g. OpenJDK: Graal project. http://openjdk.java.net/projects/graal/Google ScholarGoogle Scholar
  33. Palacz, K., Baker, J., Flack, C., Grothoff, C., Yamauchi, H., and Vitek, J. 2005. Engineering a common intermediate representation for the OVM framework. Sci. Comput. Program. 57, 3, 357--378. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Rigo, A. and Pedroni, S. 2006. PyPy's approach to virtual machine construction. In Companion to the ACM SIGPLAN Conference on Object Oriented Programming Systems, Languages, and Applications. ACM Press, 944--953. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Rogers, I. and Grove, D. 2009. The strength of metacircular virtual machines: Jikes RVM. In Beautiful Architecture, D. Spinellis and G. Gousios, Eds. O'Reilly, Chapter 10.Google ScholarGoogle Scholar
  36. Russell, K. and Bak, L. 2001. The HotSpot serviceability agent: An out-of-process high level debugger for a Java virtual machine. In Proceedings of the Symposium on Java Virtual Machine Research and Technology. USENIX Association, 16--16. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Russell, K. and Detlefs, D. 2006. Eliminating synchronization-related atomic operations with biased locking and bulk rebiasing. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages, and Applications. ACM Press, 263--272. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. SPEC 2008. SPECjvm2008. http://www.spec.org/jvm2008/Google ScholarGoogle Scholar
  39. Titzer, B. L., Würthinger, T., Simon, D., and Cintra, M. 2010. Improving compiler-runtime separation with XIR. In Proceedings of the ACM/USENIX International Conference on Virtual Execution Environments. ACM Press, 39--50. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Ungar, D., Spitz, A., and Ausch, A. 2005. Constructing a metacircular virtual machine in an exploratory programming environment. In Companion to the ACM SIGPLAN Conference on Object Oriented Programming Systems, Languages, and Applications. ACM Press, 11--20. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Wimmer, C., Brunthaler, S., Larsen, P., and Franz, M. 2012. Fine-Grained modularity and reuse of virtual machine components. In Proceedings of the International Conference on Aspect-Oriented Software Development. ACM Press, 203--214. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Wirth, N. and Gutknecht, J. 1992. Project Oberon. Addison-Wesley.Google ScholarGoogle Scholar
  43. Wright, G., McGachey, P., Gunadi, E., and Wolczko, M. 2006. Introspection of a Java#8482; virtual machine under simulation. Tech. rep. SMLI TR-2006-159, Sun Microsystems Labs. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Maxine: An approachable virtual machine for, and in, java

      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

      Full Access

      • Published in

        cover image ACM Transactions on Architecture and Code Optimization
        ACM Transactions on Architecture and Code Optimization  Volume 9, Issue 4
        Special Issue on High-Performance Embedded Architectures and Compilers
        January 2013
        876 pages
        ISSN:1544-3566
        EISSN:1544-3973
        DOI:10.1145/2400682
        Issue’s Table of Contents

        Copyright © 2013 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 20 January 2013
        • Revised: 1 September 2012
        • Accepted: 1 September 2012
        • Received: 1 May 2012
        Published in taco Volume 9, Issue 4

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article
        • Research
        • Refereed

      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!