Supporting precise garbage collection in Java Bytecode-to-C ahead-of-time compiler for embedded systems

  • Authors:
  • Dong-Heon Jung;Sung-Hwan Bae;Jaemok Lee;Soo-Mook Moon;JongKuk Park

  • Affiliations:
  • Seoul National University, Seoul, Korea;Seoul National University, Seoul, Korea;Seoul National University, Seoul, Korea;Seoul National University, Seoul, Korea;Seoul National University, Seoul, Korea

  • Venue:
  • CASES '06 Proceedings of the 2006 international conference on Compilers, architecture and synthesis for embedded systems
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

A Java bytecode-to-C ahead-of-time compiler (AOTC) can improve the performance of a Java virtual machine (JVM) by translating bytecode into C code, which is then compiled into machine code via an existing C compiler. Although AOTC is effective in embedded Java systems, a bytecode-to-C AOTC could not easily employ precise garbage collection (GC) due to a difficulty in making a GC map, which keeps information on where each root live object is located when GC occurs. This is one of the reasons why all previous JVMs using a bytecode-to-C AOTC employed conservative GC, which can lead to poorer GC performance with more frequent memory shortage, especially in embedded systems where memory is tight.In this paper, we propose a way of allowing precise GC in a bytecode-to-C AOTC by generating additional C code which collects GC map-equivalent information at runtime. In order to reduce this runtime overhead, we also propose two optimization techniques which remove unnecessary C code. Our experimental results on Sun's CVM indicate that we can support precise GC for bytecode-to-C AOTC with a relatively low overhead.