ABSTRACT
We present a just-in-time compiler for a Java VM that is small enough to fit on resource-constrained devices, yet is surprisingly effective. Our system dynamically identifies traces of frequently executed bytecode instructions (which may span several basic blocks across several methods) and compiles them via Static Single Assignment (SSA) construction. Our novel use of SSA form in this context allows to hoist instructions across trace side-exits without necessitating expensive compensation code in off-trace paths. The overall memory consumption (code and data) of our system is only 150 kBytes, yet benchmarks show a speedup that in some cases rivals heavy-weight just-in-time compilers.
References
- A. V. Aho, M. Ganapathi, and S. W. K. Tjiang. Code Generation Using Tree Matching and Dynamic Programming. ACM Transactions on Programming Languages and Systems, 11(4):491--516, Oct. 1989.]] Google Scholar
Digital Library
- A. Appel. Concise Specification of Locally Optimal Code Generators. Technical Report CS-TR-080-87, Princeton University, 1987.]]Google Scholar
- V. Bala, E. Duesterwald, and S. Banerjia. Transparent Dynamic Optimization: The Design and Implementation of Dynamo. Technical Report HPL-1999-78, Hewlett Packard Laboratories, June 1999.]]Google Scholar
- J. R. Bell. Threaded code. Communications of the ACM, 16(6):370--372, 1973.]] Google Scholar
Digital Library
- P. P. Chang, S. A. Mahlke, and W.-M. W. Hwu. Using Profile Information to Assist Classic Code Optimizations. Software---Practice and Experience, 21(12):1301--1321, December 1991.]] Google Scholar
Digital Library
- R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman, and F. K. Zadeck. Efficiently Computing Static Single Assignment Form and the Control Dependence Graph. ACM Transactions on Programming Languages and Systems, 13(4):451--490, October 1991.]] Google Scholar
Digital Library
- M. Debbabi, A. Mourad, and N. Tawbi. Armed E-Bunny: a selective dynamic compiler for embedded java virtual machine targeting ARM processors. In SAC '05: Proceedings of the 2005 ACM symposium on Applied computing, pages 874--878, New York, NY, USA, 2005. ACM Press.]] Google Scholar
Digital Library
- H. Emmelmann, F.-W. Schröer, and L. Landwehr. BEG: A Generator for Efficient Back Ends. In Proceedings of the SIGPLAN '89 Conference on Programming Language Design and Implementation, pages 227--237, 1989.]] Google Scholar
Digital Library
- J. A. Fisher. Trace Scheduling: A Technique for Global Microcode Compaction. IEEE Transactions on Computers, C-30(7):478--490, 1981.]]Google Scholar
Digital Library
- C. W. Fraser, D. R. Hanson, and T. A. Proebsting. Engineering a Simple, Efficient Code-Generator Generator. ACM Letters on Programming Languages and Systems, 1(3):213--226, September 1992.]] Google Scholar
Digital Library
- C. W. Fraser, R. R. Henry, and T. A. Proebsting. BURG: Fast Optimal Instruction Selection And Tree Parsing. ACM SIGPLAN Notices, 27(4):68--76, Apr. 1992.]] Google Scholar
Digital Library
- Free Software Foundation. GNU c compiler, Dec. 2005. http://gcc.gnu.org.]]Google Scholar
- A. Gal. KVM {24} compiled for PowerPC/Linux with GNU C Compiler 3.2, April 2005.]]Google Scholar
- A. Gal. Measured on a Sharp Zaurus PDA, 206 MHz SA-1110, 64MB RAM, using a modified subset of SpecJVM98, July 2005.]]Google Scholar
- CLDC HotSpot Implementation Virtual Machine, available at http://java.sun.com/j2me/docs/pdf/CLDC-HI_whitepaper-February_2005.pdf, Feb. 2005.]]Google Scholar
- Insignia Solutions. Jeode Platform: Java for Resource-constrained Devices, White Paper, 2002.]]Google Scholar
- R. Lougher. JamVM Virtual Machine. http://jamvm.sf.net/, Nov. 2005.]]Google Scholar
- J. A. Mathew, P. D. Coddington, and K. A. Hawick. Analysis and Development of Java Grande Benchmarks. In Proceedings of the ACM 1999 Java Grande Conference, San Francisco, 1999.]] Google Scholar
Digital Library
- R. Pozo and B. Miller. SciMark2 http://math.nist.gov/scimark2, Mar. 2004.]]Google Scholar
- K. Schmid. Jbed Micro Edition CLDC and Jbed Profile for MID. Technical report, Esmertec AG, Dubendorf, Switzerland, 2002.]]Google Scholar
- N. Shaylor. A Just-in-Time Compiler for Memory-Constrained Low-Power Devices. In Proceedings of the 2nd Java and Virtual Machine Research and Technology Symposium, pages 119--126, Berkeley, CA, USA, 2002. USENIX Association.]] Google Scholar
Digital Library
- L. Stepanian, A. D. Brown, A. Kielstra, G. Koblents, and K. Stoodley. Inlining java native calls at runtime. In VEE '05: Proceedings of the 1st ACM/USENIX international conference on Virtual execution environments, pages 121--131, New York, NY, USA, 2005. ACM Press.]] Google Scholar
Digital Library
- SUN J2ME's Homepage. http://java.sun.com/j2me.]]Google Scholar
- Sun Microsystems. J2ME Building Blocks for Mobile Devices, White Paper on KVM and the Connected, Limited Device Configuration http://java.sun.com/products/cldc/wp/KVMwp.pdf, May 2000.]]Google Scholar
Index Terms
HotpathVM: an effective JIT compiler for resource-constrained devices


Michael Franz




Comments