Abstract
The Java Virtual Machine (JVM) is usually implemented by an interpreter or just-in-time (JIT) compiler. JITs provide the best performance, but interpreters have a number of advantages that make them attractive, especially for embedded systems. These advantages include simplicity, portability and lower memory requirements. Instruction dispatch is responsible for most of the running time of efficient interpreters, especially on pipelined processors. Superinstructions are an important optimisation to reduce the number of instruction dispatches. A superinstruction is a new Java instruction which performs the work of a common sequence of instructions. In this paper we describe work in progress on the design and implementation of a system of superinstructions for an efficient Java interpreter for connected devices and embedded systems. We describe our basic interpreter, the interpreter generator we use to automatically create optimised source code for superinstructions, and discuss Java specific issues relating to superinstructions. Our initial experimental results show that superinstructions can give large speedups on the SPECjvm98 benchmark suite.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Bell, J.R.: Threaded code. Commun. ACM 16(6), 370–372 (1973)
Bell, T., Cleary, J., Witten, I.: Text Compression. Prentice-Hall, Englewood Cliffs (1990)
Eller, H.: Threaded code and quick instructions for kaffe, http://www.complang.tuwien.ac.at/java/kaffe-threaded/
Ertl, M.A.: Stack caching for interpreters. In: SIGPLAN 1995 Conference on Programming Language Design and Implementation, pp. 315–327 (1995)
Ertl, M.A., Gregg, D.: The behaviour of efficient virtual machine interpreters on modern architectures. In: Sakellariou, R., Keane, J.A., Gurd, J.R., Freeman, L. (eds.) Euro-Par 2001. LNCS, vol. 2150, pp. 403–412. Springer, Heidelberg (2001)
Ertl, M.A., Gregg, D.: Optimizing indirect branch prediction accuracy in virtual machine interpreters. In: Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation (PLDI 2003), San Diego, California. ACM, New York (2003) (to appear)
Ertl, M.A., Gregg, D., Krall, A., Paysan, B.: vmgen — A generator of efficient virtual machine interpreters. Software—Practice and Experience 32(3), 265–294 (2002)
Gagnon, E.: A Portable Research Framework for the Execution of Java Bytecode. PhD thesis, Mc Gill University (December 2002)
Gagnon, E., Hendren, L.: SableVM: A research framework for the efficient execution of Java bytecode. In: 1st USENIX Java Virtual Machine Research and Technology Symposium, Monterey, California (April 2001)
Gagnon, E., Hendren, L.: Effective inline-threaded interpretation of java bytecode using preparation sequences. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 170–184. Springer, Heidelberg (2003)
Gregg, D., Ertl, A., Krall, A.: Implementation of an efficient Java interpreter. In: Hertzberger, B., Hoekstra, A.G., Williams, R. (eds.) HPCN-Europe 2001. LNCS, vol. 2110, pp. 613–620. Springer, Heidelberg (2001)
Gregg, D., Waldron, J.: Primitive sequences in general purpose forth programs. In: 18th Euroforth Conference, Vienna, Austria, September 2002, pp. 24–32 (2002)
Hoogerbrugge, J., Augusteijn, L., Trum, J., van de Wiel, R.: A code compression system based on pipelined interpreters. Software—Practice and Experience 29(11), 1005–1023 (1999)
Krall, A., Grafl, R.: CACAO – a 64 bit JavaVM just-in-time compiler. In: Fox, G.C., Li, W. (eds.) PPoPP’97 Workshop on Java for Science and Engineering Computation, Las Vegas, June 1997. ACM, New York (1997)
Piumarta, I., Riccardi, F.: Optimizing direct threaded code by selective inlining. In: SIGPLAN 1998 Conference on Programming Language Design and Implementation, pp. 291–300 (1998)
Proebsting, T.A.: Optimizing an ANSI C interpreter with superoperators. In: Principles of Programming Languages (POPL 1995), pp. 322–332 (1995)
Santos Costa, V.: Optimising bytecode emulation for Prolog. In: Nadathur, G. (ed.) PPDP 1999. LNCS, vol. 1702, pp. 261–267. Springer, Heidelberg (1999)
SPEC. SPEC releases SPEC JVM98, first industry-standard benchmark for measuring Java virtual machine performance. Press Release, August 19 (1998), http://www.specbench.org/osg/jvm98/press.html
Sun Microsystems Inc. Java 2 Platform Micro Edition (J2ME) Technology for Creating Mobile Devices (May 2000)
Venugopal, K.S., Manjunath, G., Krishnan, V.: sEc: A portable interpreter optimizing technique for embedded java virtual machine. In: 2nd USENIX Java Virtual Machine Research and Technology Symposium, San Francsico, California (August 2002)
Waldron, J.: Dynamic bytecode usage by object oriented java programs. In: Proceedings of the Technology of Object-Oriented Languages and Systems 29th International Conference and Exhibition, Nancy, France, June 7-10 (1999)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Casey, K., Gregg, D., Ertl, M.A., Nisbet, A. (2003). Towards Superinstructions for Java Interpreters. In: Krall, A. (eds) Software and Compilers for Embedded Systems. SCOPES 2003. Lecture Notes in Computer Science, vol 2826. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-39920-9_23
Download citation
DOI: https://doi.org/10.1007/978-3-540-39920-9_23
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-20145-8
Online ISBN: 978-3-540-39920-9
eBook Packages: Springer Book Archive