Support for garbage collection at every instruction in a Java compiler

  • Authors:
  • James M. Stichnoth;Guei-Yuan Lueh;Michał Cierniak

  • Affiliations:
  • Inktomi Corporation, 1900 S., Norfolk St., Suite 310, San Mateo, CA and Intel Corporation, 2200 Mission College Blvd, Santa Clara, CA;Intel Corporation, 2200 Mission College Blvd, Santa Clara, CA;Intel Corporation, 2200 Mission College Blvd, Santa Clara, CA

  • Venue:
  • Proceedings of the ACM SIGPLAN 1999 conference on Programming language design and implementation
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

A high-performance implementation of a Java Virtual Machine1 requires a compiler to translate Java bytecodes into native instructions, as well as an advanced garbage collector (e.g., copying or generational). When the Java heap is exhausted and the garbage collector executes, the compiler must report to the garbage collector all live object references contained in physical registers and stack locations. Typical compilers only allow certain instructions (e.g., call instructions and backward branches) to be GC-safe; if GC happens at some other instruction, the compiler may need to advance execution to the next GC-safe point. Until now, no one has ever attempted to make every compiler-generated instruction GC-safe, due to the perception that recording this information would require too much space. This kind of support could improve the GC performance in multithreaded applications. We show how to use simple compression techniques to reduce the size of the GC map to about 20% of the generated code size, a result that is competitive with the best previously published results. In addition, we extend the work of Agesen, Detlefs, and Moss, regarding the so-called "JSR Problem" (the single exception to Java's type safety property), in a way that eliminates the need for extra runtime overhead in the generated code.