skip to main content
10.1145/583810.583821acmconferencesArticle/Chapter ViewAbstractPublication PagesjgiConference Proceedingsconference-collections
Article

Fast subtype checking in the HotSpot JVM

Published:03 November 2002Publication History

ABSTRACT

We present the fast subtype checking implemented in Sun's HotSpot JVM. Subtype checks occur when a program wishes to know if class S implements class T, where S and T are not both known at compile-time. Large Java programs will make millions or even billions of such checks, hence a fast check is essential. In actual benchmark runs our technique performs complete subtype checks in 3 instructions (and only 1 memory reference) essentially all the time. In rare instances it reverts to a slower array scan. Memory usage is moderate (11 words per class) and can be traded off for time. Class loading does not require recomputing any data structures associated with subtype checking.

References

  1. B. Alpern, A. Cocchi, and D. Grove. Dynamic Type Checking in Jalapeño. In the 2001 USENIX Java™ Virtual Machine Symposium. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. D. F. Bacon and P. F. Sweeney. Fast static analysis of C++ virtual function calls. In Conference on Object Oriented Programming Systems, Languages & Applications (OOPSLA'96). Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. N.H. Cohen. Type-extension tests can be performed in constant time. ACM Transactions on Programming Languages and Systems, 13(4):626--629, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. E.W. Dijkstra. Recursive Programming. Numer. Programming, (2):312--318, 1960.Google ScholarGoogle Scholar
  5. James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Addison Wesley, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Tim Lindholm and Frank Yellin. The Java Virtual Machine Specification, Second Edition. Addison Wesley, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. M. Paleczny, C. Click, C. Vick, The Java HotSpot™ Server Compiler. In the 2001 USENIX Java™ Virtual Machine Symposium. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. B.H.C. Pfister and J. Templ. Oberon technical notes. Research Report 156, Eidgenossische Techniscle Hochschule Zurich- Departement Informatik, March 1991.Google ScholarGoogle Scholar
  9. The Standard Performance Evaluation Corporation. SPEC JVM98 Benchmarks. http://www.spec.org/osg/jvm98, 1998.Google ScholarGoogle Scholar
  10. The Standard Performance Evaluation Corporation. SPEC JBB2000 Benchmarks. http://www.spec.org/osg/jbb2000, 2000.Google ScholarGoogle Scholar
  11. V. Sundaresan, L. Hendren, C. Razafimahefa, R. Vallée-Rai, and P. Lam, E. Gagnon, and C. Godin. Practical virtual method call resolution for Java. In Conference on Object Oriented Programming, Systems, Languages & Applications (OOPSLA'2000). Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J. Vitek, A. Krall, and R. N. Horspool. Efficient Type Inclusion Tests. In Conference on Object Oriented Programming Systems, Languages & Applications (OOPSLA'97). Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Fast subtype checking in the HotSpot JVM

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      JGI '02: Proceedings of the 2002 joint ACM-ISCOPE conference on Java Grande
      November 2002
      252 pages
      ISBN:1581135998
      DOI:10.1145/583810

      Copyright © 2002 ACM

      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]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 3 November 2002

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate18of60submissions,30%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader