Advertisement

Towards Superinstructions for Java Interpreters

  • Kevin Casey
  • David Gregg
  • M. Anton Ertl
  • Andrew Nisbet
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2826)

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.

Keywords

Embed System Basic Block Interpreter Generator Java Virtual Machine Program Language Design 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Bell, J.R.: Threaded code. Commun. ACM 16(6), 370–372 (1973)CrossRefGoogle Scholar
  2. 2.
    Bell, T., Cleary, J., Witten, I.: Text Compression. Prentice-Hall, Englewood Cliffs (1990)Google Scholar
  3. 3.
    Eller, H.: Threaded code and quick instructions for kaffe, http://www.complang.tuwien.ac.at/java/kaffe-threaded/
  4. 4.
    Ertl, M.A.: Stack caching for interpreters. In: SIGPLAN 1995 Conference on Programming Language Design and Implementation, pp. 315–327 (1995)Google Scholar
  5. 5.
    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)CrossRefGoogle Scholar
  6. 6.
    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)Google Scholar
  7. 7.
    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)zbMATHCrossRefGoogle Scholar
  8. 8.
    Gagnon, E.: A Portable Research Framework for the Execution of Java Bytecode. PhD thesis, Mc Gill University (December 2002)Google Scholar
  9. 9.
    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)Google Scholar
  10. 10.
    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)CrossRefGoogle Scholar
  11. 11.
    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)CrossRefGoogle Scholar
  12. 12.
    Gregg, D., Waldron, J.: Primitive sequences in general purpose forth programs. In: 18th Euroforth Conference, Vienna, Austria, September 2002, pp. 24–32 (2002)Google Scholar
  13. 13.
    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)CrossRefGoogle Scholar
  14. 14.
    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)Google Scholar
  15. 15.
    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)Google Scholar
  16. 16.
    Proebsting, T.A.: Optimizing an ANSI C interpreter with superoperators. In: Principles of Programming Languages (POPL 1995), pp. 322–332 (1995)Google Scholar
  17. 17.
    Santos Costa, V.: Optimising bytecode emulation for Prolog. In: Nadathur, G. (ed.) PPDP 1999. LNCS, vol. 1702, pp. 261–267. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  18. 18.
    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
  19. 19.
    Sun Microsystems Inc. Java 2 Platform Micro Edition (J2ME) Technology for Creating Mobile Devices (May 2000)Google Scholar
  20. 20.
    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)Google Scholar
  21. 21.
    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)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Kevin Casey
    • 1
  • David Gregg
    • 1
  • M. Anton Ertl
    • 2
  • Andrew Nisbet
    • 1
  1. 1.Department of Computer ScienceTrinity CollegeDublin 2Ireland
  2. 2.Institut für ComputersprachenTU WienWienAustria

Personalised recommendations