skip to main content
10.1145/1288940.1288969acmconferencesArticle/Chapter ViewAbstractPublication PagesjtresConference Proceedingsconference-collections
Article

Enabling constant-time interface method dispatch in embedded Java processors

Published: 26 September 2007 Publication History

Abstract

This paper describes an approach that enables the fast constant-time and memory-efficient runtime handling of interface data types as found in several object-oriented programming languages like Java. It extends an idea presented by League et al. [22] to attach an itable to a class object to obtain an interface object. A practical implementation of this approach based on an automated rather than a manual type conversion is presented. Its practibility in the context of Java is evaluated by an adaptation in the SableVM [15]. Several measures for its improvement have been derived and implemented. The adoption of the resulting technique for the implementation of interface method dispatches within SHAP [26, 32], a small-footprint embedded implementation of a Java bytecode processor, is described. This realization currently also contains a tradeoff compromising some generality of the support for interface typecasts while it ensures both a small memory demand as well as a fast constant-time interface method dispatch. The loss of generality is shown to be a minimal practical impact under the measures taken before.

References

[1]
picoJava(tm)-II data sheet. SUN Microsystems, 1999. http://www.sun.com/.
[2]
B. Alpern, A. Cocchi, S. J. Fink, D. Grove, and D. Lieber. Efficient implementation of Java interfaces: Invokeinterface considered harmless. In Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 108--124, 2001.
[3]
M. A. Bender, M. Farach-Colton, G. Pemmasani, S. Skiena, and P. Sumazin. Lowest common ancestors in trees and directed acyclic graphs. J. Algorithms, 57(2):75--94, 2005.
[4]
M. Berekovic, H. Kloos, and P. Pirsch. Hardware realization of a Java virtual machine for high performance multimedia applications. J. VLSI Signal Process. Syst., 22(1):31--43, 1999.
[5]
G. Bracha and G. Hamilton. JSR 202: classfile specification update. http://jcp.org/en/jsr/detail?id=202.
[6]
E. Bruneton, R. Lenglet, and T. Coupaye. ASM: a code manipulation tool to implement adaptable systems. In Proceedings of the ASF (ACM SIGOPS France), Nov. 2002.
[7]
Caffeinemark 3.0. Pendracon Software Corporation.
[8]
A. Coglio. Improving the official specification of Java bytecode verification. Concurrency and Computation: Practice and Experience, 15(2):155--179, 2003.
[9]
D. Coward. JSR 14: add generic types to the Java(TM) programming language. http://jcp.org/en/jsr/detail?id=14.
[10]
O.-J. Dahl and B. Myrhaug. Simula implementation guide. Technical Report S 47, Norwegian Computing Center, 1973.
[11]
K. Driesen, U. Hölzle, and J. Vitek. Message dispatch on pipelined processors. In ECOOP'95: Proceedings of the 9th European Conference on Object-Oriented Programming, pages 253--282, London, UK, 1995. Springer-Verlag.
[12]
R. Fitzgerald, T. B. Knoblock, E. Ruf, B. Steensgaard, and D. Tarditi. Marmot: an optimizing compiler for Java. Software -- Practice and Experience, 30(3):199--232, 2000.
[13]
Gnu classpath. Free Software Foundation, Inc. http://www.gnu.org/software/classpath/.
[14]
E. Gagnon and L. Hendren. Intraprocedural inference of static types for Java bytecode. Technical report, McGill University, 1999.
[15]
E. M. Gagnon and L. J. Hendren. Sable VM: A research framework for the efficient execution of Java bytecode. In Java Virtual Machine Research and Technology Symposium, pages 27--40, Apr. 2001.
[16]
J. Y. Gil and Y. Zibin. Efficient subtyping tests with pq-encoding. ACM Trans. Program. Lang. Syst., 27(5):819--856, 2005.
[17]
A. Goldberg. A specification of Java loading and bytecode verification. In CCS '98: Proceedings of the 5th ACM conference on Computer and communications security, pages 49--58, New York, NY, USA, 1998. ACM Press.
[18]
U. Hölzle, C. Chambers, and D. Ungar. Optimizing dynamically-typed object-oriented languages with polymorphic inline caches. In Proceedings of the ECOOP'91 Conference (LNCS 512), Berlin, 1991. Springer Verlag.
[19]
S. A. Ito, L. Carro, and R. P. Jacobi. Making Java work for microcontroller applications. IEEE Des. Test, 18(5):100--110, 2001.
[20]
T. B. Knoblock and J. Rehof. Type elaboration and subtype completion for Java bytecode. ACM Trans. Program. Lang. Syst., 23(2):243--272, 2001.
[21]
A. Krall and R. Grafl. CACAO -- a 64-bit JavaVM just-in-time compiler. Concurrency -- Practice and Experience, 9(11):1017--1030, 1997.
[22]
C. League, Z. Shao, and V. Trifonov. Representing Java classes in a typed intermediate language. In ICFP '99: Proceedings of the 4th ACM SIGPLAN international conference on Functional programming, pages 183--196, New York, NY, USA, 1999. ACM Press.
[23]
T. Lindholm and F. Yellin. The Java(TM) Virtual Machine Specification. Addison-Wesley Professional, 2 edition, Apr. 1999.
[24]
S. B. Lippman. Inside the C++ object model. Addison Wesley Longman Publishing Co., Inc., Redwood City, CA, USA, 1996.
[25]
Welcome to phoneME. SUN Microsystems. https://phoneme.dev.java.net/.
[26]
T. B. Preußer, M. Zabel, and P. Reichel. The SHAP microarchitecture. Technical Report TUD-FI07-02, Fakultät Informatik, TU Dresden, Apr. 2007. ftp://ftp.inf.tu-dresden.de/pub/berichte/tud07-02.pdf.
[27]
Z. Qian. Standard fixpoint iteration for Java bytecode verification. ACM Transactions on Programming Languages and Systems, 22(4):638--672, 2000.
[28]
M. Schoeberl. JOP: A Java Optimized Processor for Embedded Real-Time Systems. PhD thesis, Vienna University of Technology, 2005.
[29]
Remote Method Invocation Home. Sun Microsystems. http://java.sun.com/javase/technologies/core/basic/rmi/index.jsp.
[30]
Sun Microsystems, Inc. Connected, Limited Device Configuration, Specification Version 1.0a, May 2000.
[31]
S. Uhrig. Der Komodo mikrocontroller. Technical Report 2003-03, Institute of Computer Science, University of Augsburg, July 2003.
[32]
M. Zabel, T. B. Preußer, P. Reichel, and R. G. Spallek. Secure, real-time and multi-threaded general-purpose embedded Java microarchitecture. In Proceedings of the 10th Euromicro Conference on Digital System Design. IEEE Press, 2007.

Cited By

View all
  • (2015)A Java Processor IP Design for Embedded SoCACM Transactions on Embedded Computing Systems10.1145/262964914:2(1-25)Online publication date: 17-Feb-2015
  • (2012)Increasing the efficiency of an embedded multi-core bytecode processor using an object cacheProceedings of the 10th International Workshop on Java Technologies for Real-time and Embedded Systems10.1145/2388936.2388952(88-97)Online publication date: 24-Oct-2012

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
JTRES '07: Proceedings of the 5th international workshop on Java technologies for real-time and embedded systems
September 2007
237 pages
ISBN:9781595938138
DOI:10.1145/1288940
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 26 September 2007

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Java
  2. interfaces
  3. method dispatch

Qualifiers

  • Article

Acceptance Rates

Overall Acceptance Rate 50 of 70 submissions, 71%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 05 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2015)A Java Processor IP Design for Embedded SoCACM Transactions on Embedded Computing Systems10.1145/262964914:2(1-25)Online publication date: 17-Feb-2015
  • (2012)Increasing the efficiency of an embedded multi-core bytecode processor using an object cacheProceedings of the 10th International Workshop on Java Technologies for Real-time and Embedded Systems10.1145/2388936.2388952(88-97)Online publication date: 24-Oct-2012

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media