skip to main content
10.1145/512429.512452acmconferencesArticle/Chapter ViewAbstractPublication PagesismmConference Proceedingsconference-collections
Article

In or out?: putting write barriers in their place

Published:20 June 2002Publication History

ABSTRACT

In many garbage collected systems, the mutator performs a write barrier for every pointer update. Using generational garbage collectors, we study in depth three code placement options for remembered-set write barriers: inlined, out-of-line, and partially inlined (fast path inlined, slow path out-of-line). The fast path determines if the collector needs to remember thepointer update. The slow path records the pointer in a list when necessary. Efficient implementations minimize the instructions on the fast path, and record few pointers (from 0.16 to 3% of pointer stores in our benchmarks). We find the mutator performs best with a partially inlined barrier, by a modest 1.5% on average over full inlining.We also study the compilation cost of write-barrier code placement. We find that partial inlining reduces the compilation cost by 20 to 25% compared to full inlining. In the context of just-in-time compilation, the application is exposed to compiler activity. Regardless of the level of compiler activity, partial inlining consistently gives a total running time performance advantage over full inlining on the benchmarks. When the compiler optimizes all application methods on demand and compiler load is highest, partial inlining improves total performance on average by 10.2%, and up to 18.5%.

References

  1. Bowen Alpern, Dick Attanasio, John J. Barton, M. G. Burke, P. Cheng, J.-D. Choi, Anthony Cocchi, Stephen J. Fink, David Grove, Michael Hind, Susan Flynn Hummel, D. Lieber, V. Litvinov, Mark Mergen, Ton Ngo, J. R. Russell, Vivek Sarkar, Manuel J. Serrano, Janice Shepherd, S. Smith, V. C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeño virtual machine. IBM System Journal, 39(1):211--238, February 2000 Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Bowen Alpern, C. R. Attanasio, Anthony Cocchi, Derek Lieber, Stephen Smith, Ton Ngo, John J. Barton, Susan~Flynn Hummel, Janice~C. Sheperd, and Mark Mergen. Implementing Jalapeño in Java. In OOPSLA'99 ACM Conference on Object-Oriented Systems, Languages and Applications, volume 34(10) of ACM SIGPLAN Notices, pages 314--324, Denver, CO, October 1999. ACM Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Matthew Arnold, Stephen~J. Fink, David Grove, Michael Hind, and Peter Sweeney. Adaptive optimization in the Jalapeño JVM. In OOPSLA'00 ACM Conference on Object-Oriented Systems, Languages and Applications, volume 35(10) of ACM SIGPLAN Notices, pages 47--65, Minneapolis, MN, October 2000. ACM Press Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Matthew Arnold, Stephen Fink, Vivek Sarkar, and Peter F. Sweeney. A comparative study of static and profile-based heuristics for inlining. In Proceedings of the ACM SIGPLAN Workshop on Dynamic and Adaptive Compilation and Optimization, Boston, MA, 2000 Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Alain Azagury, Elliot~K. Kolodner, Erez Petrank, and Zvi Yehudai. Combining card marking with remembered sets: How to save scanning time. In Richard Jones, editor, ISMM'98 Proceedings of the First International Symposium on Memory Management, volume 34(3) of ACM SIGPLAN Notices, pages 10--19, Vancouver, October 1998. ACM Press. ISMM is the successor to the IWMM series of workshops Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Andrew W. Appel. Simple generational garbage collection and fast allocation. Software Practice and Experience, 19(2):171--183, 1989 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Andrew Ayers, Richard Schooler, and Robert Gottlieb. Aggressive inlining. In Proceedings of the SIGPLAN '97 Conference on Programming Language Design and Implementation, pages 134--145, Las Vegas, NV, June 1997 Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Stephen M. Blackburn, Richard E. Jones, Kathryn S. McKinley, and J. Eliot B. Moss. Beltway: Getting around garbage collection gridlock. In Proceedings of SIGPLAN 2002 Conference on Programming Languages Design and Implementation, volume 37(5) of ACM SIGPLAN Notices, Berlin, Germany, June 2002. ACM Press Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A.M. Cheadle, A.J. Field, Marlow S., S. Peyton-Jones, and R.L While. Non-stop Haskell. In Proceedings of the ACM SIGPLAN International Conference on Functional Programming (ICFP'00), volume 35(9) of ACM SIGPLAN Notices, pages 257--267, Montreal, September 2000. ACM Press Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Craig Chambers. The Design and Implementation of the SELF Compiler, an Optimizing Compiler for an Objected-Oriented Programming Language. PhD thesis, Stanford University, March 1992 Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. K. Cooper, M. W. Hall, and K. Kennedy. Procedure cloning. In Proceedings of the 1992 IEEE International Conference on Computer Language, pages 96--105, Oakland, CA, April 1992Google ScholarGoogle ScholarCross RefCross Ref
  12. K. Cooper, M. W. Hall, K. Kennedy, and L. Torczon. An experiment with inline substitution. Software---Practice and Experience, 21(6):581--501, April 1993 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Perry Cheng, Robert Harper, and Peter Lee. Generational stack collection and profile-driven pretenuring. In Proceedings of SIGPLAN'98 Conference on Programming Languages Design and Implementation, volume 33(5) of ACM SIGPLAN Notices, pages 162--173, Montreal, June 1998. ACM Press Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Keith D. Cooper, Mary W. Hall, and Linda Torczon. Unexpected side effects of inline substitution. ACM Letters on Programming Languages and Systems, 1(1):22--32, March 1992 Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. George E. Collins. A method for overlapping and erasure of lists. Communications of the ACM, 3(12):655--657, December 1960 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Patrick J. Caudill and Allen Wirfs-Brock. A third-generation Smalltalk-80 implementation. In Norman Meyrowitz, editor, OOPSLA'86 ACM Conference on Object-Oriented Systems, Languages and Applications, volume 21(11) of ACM SIGPLAN Notices, pages 119--130. ACM Press, October 1986 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. L. Peter Deutsch and Daniel G. Bobrow. An efficient incremental automatic garbage collector. Communications of the ACM, 19(9):522--526, September 1976 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Jeffrey Dean and Craig Chambers. Towards better inlining decisions using inlining trials. In Proceedings of the ACM Conference on Lisp and Functional Programming, pages 273--282, Orlando, FL, June 1994 Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Stephen J. Fink and David Grove. Personal communication. January 2002Google ScholarGoogle Scholar
  20. Robert Fitzgerald and David Tarditi. The case for profile-directed selection of garbage collectors. In Tony Hosking, editor, ISMM 2000 Proceedings of the Second International Symposium on Memory Management, pages 50--58, Minneapolis, MN, October 2000 Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Urs Hölzle. A fast write barrier for generational garbage collectors. In Eliot Moss, Paul R. Wilson, and Benjamin Zorn, editors, OOPSLA/ECOOP '93 Workshop on Garbage Collection in Object-Oriented Systems, October 1993Google ScholarGoogle Scholar
  22. Richard L. Hudson and Amer Diwan. Adaptive garbage collection for Modula-3 and Smalltalk. In Eric Jul and Niels-Christian Juul, editors, OOPSLA/ECOOP '90 Workshop on Garbage Collection in Object-Oriented Systems, Ottawa, October 1990.Google ScholarGoogle Scholar
  23. Antony L. Hosking and Richard L. Hudson. Remembered sets can also play cards. In Eliot Moss, Paul R. Wilson, and Benjamin Zorn, editors, OOPSLA/ECOOP '93 Workshop on Garbage Collection in Object-Oriented Systems, October 1993Google ScholarGoogle Scholar
  24. Richard L. Hudson and J. Eliot B. Moss. Incremental garbage collection for mature objects. In Yves Bekkers and Jacques Cohen, editors, Proceedings of International Workshop on Memory Management, volume 637 of Lecture Notes in Computer Science, University of Massachusetts, USA, 16--18 September 1992. Springer-Verlag Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Antony L. Hosking, J. Eliot B. Moss, and Darko Stefanovic. A comparative performance evaluation of write barrier implementations. In Andreas Paepcke, editor, OOPSLA'92 ACM Conference on Object-Oriented Systems, Languages and Applications, volume 27(10) of ACM SIGPLAN Notices, pages 92--109, Vancouver, British Columbia, October 1992. ACM Press Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Richard E. Jones and Rafael D. Lins. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. Wiley, July 1996 Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Henry Lieberman and Carl E. Hewitt. A real-time garbage collector based on the lifetimes of objects. Communications of the ACM, 26(6):419--429, 1983. Also report TM--184, Laboratory for Computer Science, MIT, Cambridge, MA, July 1980 and AI Lab Memo 569, 1981 Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. R. Scheifler. An analysis of inline substitution for a structured programming language. Communications of the ACM, 20(9):647--654, September 1977 Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Darko Stefanovic, Kathryn S. McKinley, and J. Eliot B. Moss. Age-based garbage collection. In OOPSLA'99 ACM Conference on Object-Oriented Systems, Languages and Applications, volume 34(10) of ACM SIGPLAN Notices, pages 370--381, Denver, CO, October 1999. ACM Press Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Patrick Sobalvarro. A lifetime-based garbage collector for Lisp systems on general-purpose computers. Technical Report AITR-1417, MIT AI Lab, February 1988. Bachelor of Science thesis Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Darko Stefanovic. Properties of Age-Based Automatic Memory Reclamation Algorithms. PhD thesis, University of Massachusetts, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. David M. Ungar. Generation scavenging: A non-disruptive high performance storage reclamation algorithm. ACM SIGPLAN Notices, 19(5):157--167, April 1984 Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Paul R. Wilson and Thomas G. Moher. A card-marking scheme for controlling intergenerational references in generation-based garbage collection on stock hardware. ACM SIGPLAN Notices, 24(5):87--92, 1989 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. In or out?: putting write barriers in their place

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
    ISMM '02: Proceedings of the 3rd international symposium on Memory management
    June 2002
    192 pages
    ISBN:1581135394
    DOI:10.1145/512429
    • cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 38, Issue 2 supplement
      MSP 2002 and ISMM 2002
      February 2003
      291 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/773039
      Issue’s Table of Contents

    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: 20 June 2002

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • Article

    Acceptance Rates

    ISMM '02 Paper Acceptance Rate17of41submissions,41%Overall Acceptance Rate72of156submissions,46%

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader