article

Profile-guided receiver class prediction

Abstract

The use of dynamically-dispatched procedure calls is a key mechanism for writing extensible and flexible code in object-oriented languages. Unfortunately, dynamic dispatching imposes a runtime performance penalty. Some recent implementations of pure object-oriented languages have utilized profile-guided receiver class prediction to reduce this performance penalty, and some researchers have argued for applying receiver class prediction in hybrid languages like C++. We performed a detailed examination of the dynamic profiles of eight large object-oriented applications written in C++ and Cecil, determining that the receiver class distributions are strongly peaked and stable across both inputs and program versions through time. We describe techniques for gathering and manipulating profile information at varying degrees of precision, particularly in the presence of optimizations such as inlining. Our implementation of profile-guided receiver class prediction improves the performance of large Cecil applications by more than a factor of two over solely static optimizations.

References

  1. Agesen & Hölzle 95 Ole Agesen and Urs H61zle. Type Feedback vs. Concrete Type Analysis: A Comparison of OptimizationTechniques for Object-Oriented Languages. In Proceedings OOPSLA '95, Austin, Tx, October ! 995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Calder & Grunwald 94 Brad Calder and Dirk Grunwald. Reducing Indirect Function Call Overhead in C++ Programs. In Conference Record of POPL '94: 21st A CM SIGPLAN-SIGA CT Symposium on Principles of Programming Languages, pages 397-408, Portland, Oregon, January I994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Chambers & Ungar 89 Craig Chambers and David Ungar. Customization: Optimizing Compiler Technology for Self, A Dynamically-Typed Object-Oriented Programming Language. SIGPLAN Notices, 24(7): 146-I 60, July 1989. In Proceedings ofthe A CM SIGPLAN '89 Conference on Programming Language Design and hnpIementation. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Chambers & Ungar 90 Craig Chambers and David Ungar. Iterative Type Analysis and Extended Message Splitting: Optimizing Dynamically-Typed Object-Oriented Programs. SIGPLAN Notices, 25(6):150-164, June 1990. In Proceedings of the A CM SIGPLAN '90 Conference on Programming Language Design and Implementation. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Chambers 92 Craig Chambers. The Design and Implementation of the SELF Compiler, an Optimizing Compiler for Object-Oriented Programming Languages. PhD thesis, Stanford University, March 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Chambers93 Craig Chambers. The Cecil Language: Specification and Rationale. Technical Report TR-93-03-05, Department of Computer Science and Engineering. University of Washington, March 1993.Google ScholarGoogle Scholar
  7. Chang et al. 92 Pohua P. Chang, Scott A. Mahlke,, and Willam Y. Chen Wen-Mei W. Hwu. Profile-guided Automatic Inline Expansion for C Programs. Software Practice and Experience, 22(5):349-369, May 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Dean et al. 95 Jeffrey Dean, David Grove, and Craig Chambers. Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis. In Proceedings ECOOP '95, Aarhus, Denmark, August 1995. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Deutsch & Schiffman 84 L. Peter Deutsch and Allan M. Schiffman. Efficient implementation of the Smalltalk-.80 System. In Conference Record of the Eleventh Annual A CM Symposium on Principles of Programruing Languages, pages 297-302, Salt Lake City, Utah, January I984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Fernandez 95 Mary Fernandez. Simple and Effective Link-time Optimization of Modula-3 Programs. SIG- PLAN Notices, June 1995. In Proceedings of the A CM SIGPLAN '95 Conference on Programming Language Design and hnplementation. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Hölzle & Ungar 94 Urs H61zle and David Ungar. Optimizing Dynamically-Dispatched Calls with Run-Time Type Feedback. SIGPLAN Notices, 29(6):326-336, June 1994. In Proceedings of the A CM SIGPLAN '94 Conference on Programming Language Design and hnplementation. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Nelson 91 Greg Nelson. Systems Programming with Modula-3. Prentice Hall, Englewood Cliffs, NJ, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Palsberg & Schwartzbach 91 Jens Palsberg and Michael 1. Schwartzbach. Object-Oriented Type Inference. In Proceedings OOPSLA '91, A CM SIGPLAN Notices, pages 146-161, November 1991. Published as Proceedings OOPSLA '9}, ACM SIGPLAN Notices, volume 26, number 11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Plevyak & Chien 94 John Plevyak and Andrew A. Chien. Precise Concrete Type Inference for Object-Oriented Languages. In Proceedings OOPSLA '94, pages 324-340, Portland, OR, October 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Shivers 88 Olin Shivers. Control-Flow Analysis in Scheme. SIGPLAN Notices, 23(7):164-174, July 1988. In Proceedings of the A CM SIGPLAN '88 Conference on Programming Language Design and hnplementation. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Shivers 91 Olin Shivers. Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie Mellon University, May 1991. CMU-CS-91-145. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Stroustrup 91 Bjarne Stroustrup. The C++ Programming Language (second edition). Addision-Wesley, Reading, MA, 199 l. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Tichy 85 Wall~er F. Tichy. RCS-A System for Version Control. Software Practice and Experience, 15(7):637-654, July 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Wall 91 David W. Wall. Predicting Program Behavior Using Real or Estimated Profiles. SIGPLAN Notices, 26(6):59-70, June 1991. In Proceedings of the ACM SIGPLAN '91 Conference on Programming Language Design and Implementation. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Profile-guided receiver class prediction

      Comments

      Login options

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

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!