Client ahead-of-time compiler for embedded Java platforms

  • Authors:
  • Sunghyun Hong;Jin-Chul Kim;Soo-Mook Moon;Jin Woo Shin;Jaemok Lee;Hyeong-Seok Oh;Hyung-Kyu Choi

  • Affiliations:
  • School of Electrical Engineering and Computer Science, Seoul National University, Seoul 151-742, Korea;School of Electrical Engineering and Computer Science, Seoul National University, Seoul 151-742, Korea;School of Electrical Engineering and Computer Science, Seoul National University, Seoul 151-742, Korea;School of Electrical Engineering and Computer Science, Seoul National University, Seoul 151-742, Korea;School of Electrical Engineering and Computer Science, Seoul National University, Seoul 151-742, Korea;School of Electrical Engineering and Computer Science, Seoul National University, Seoul 151-742, Korea;School of Electrical Engineering and Computer Science, Seoul National University, Seoul 151-742, Korea

  • Venue:
  • Software—Practice & Experience
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Many embedded Java platforms execute two types of Javaclasses: those installed statically on the client device and thosedownloaded dynamically from service providers at run time. Forachieving higher performance, the static Java classes can becompiled into machine code by ahead-of-time compiler (AOTC) in theserver, and the translated machine code can be installed on theclient device. Unfortunately, AOTC cannot be applicable to thedynamically downloaded classes. This paper proposesclient-AOTC (c-AOTC), which performs AOTC on the clientdevice using the just-in-time compiler (JITC) module installed onthe device, obviating the JITC overhead and complementing theserver-AOTC. The machine code of a method translated by JITC iscached on a persistent memory of the device, and when the method isinvoked again in a later run of the program, the machine code isloaded and executed directly without any translation overhead. Amajor issue in c-AOTC is relocation because some of theaddress constants embedded in the cached machine code are notcorrect when the machine code is loaded and used in a differentrun; those addresses should be corrected before they are used.Constant pool resolution and inlining complicate the relocationproblem, and we propose our solutions. The persistent memoryoverhead for saving the relocation information is also an issue,and we propose a technique to encode the relocation information andcompress the machine code efficiently. We developed a c-AOTC onSun's CDC VM reference implementation, and our evaluation resultsindicate that c-AOTC can improve the performance significantly, asmuch as an average of 12% for EEMBC and 4% for SpecJVM98, with apersistent memory overhead of 1% on average. Copyright © 2008John Wiley & Sons, Ltd.This is a revised and expanded version of a paper published inACM SIGPLAN-SIGBED 2007 Conference on Languages, Compilers, andTools for Embedded Systems (LCTES'07) [1].