skip to main content
10.1145/3315573.3329981acmconferencesArticle/Chapter ViewAbstractPublication PagesismmConference Proceedingsconference-collections
research-article

Design and analysis of field-logging write barriers

Published: 23 June 2019 Publication History

Abstract

Write barriers are a fundamental mechanism that most production garbage collection algorithms depend on. They inform the collector of mutations to the object graph, enabling partial heap collections, concurrent collection, and reference counting. While in principle, write barriers remember only the pointers within the object graph that were changed and do so just once, widely-used write barriers are less precise, sacrificing temporal and/or spatial precision to performance. The idea of precisely remembering just the pointers that were changed is not new, however implementing performant field-precise barriers has proved elusive. We describe a technique for efficiently implementing field-logging barriers. We implement a number of barriers and evaluate them on a range of x86 hardware. A generational field-logging barrier performs with 0.1% to 1% mutator overhead compared to a highly tuned object-logging barrier, while a preliminary implementation of a reference counting field-logging barrier performs with around 1% to 2% overhead compared to a highly tuned object-logging reference counting barrier. These results suggest that garbage collection algorithms that require the precision of exactly remembering field mutations without sacrificing performance may now be possible, adding a new mechanism to the design toolkit available to garbage collection researchers.

References

[1]
B. Alpern, S. Augart, S. M. Blackburn, M. Butrico, A. Cocchi, P. Cheng, J. Dolby, S. J. Fink, D. Grove, M. Hind, K. S. McKinley, M Mergen, J. E. B. Moss, T. Ngo, V. Sarkar, and M. Trapp. 2005. The Jikes RVM Project: Building an Open Source Research Community. IBM System Journal 44, 2 (2005), 399–418.
[2]
B. Alpern, D. Attanasio, J. J. Barton, M. G. Burke, P.Cheng, J.-D. Choi, A. Cocchi, S. J. Fink, D. Grove, M. Hind, S. Flynn Hummel, D. Lieber, V. Litvinov, M. Mergen, T. Ngo, J. R. Russell, V. Sarkar, M. J. Serrano, J. Shepherd, S. Smith, V. C. Sreedhar, H. Srinivasan, and J. Whaley. 2000. The Jalapeño virtual machine. IBM System Journal 39, 1 (Feb. 2000).
[3]
A. Azagury, E. K. Kolodner, E. Petrank, and Z. Yehudai. 1998. Combining Card Marking with Remembered Sets: How to Save Scanning Time. In ACM International Symposium on Memory Management. Vancouver, Canada, 10–19.
[4]
S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. 2006. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In ACM SIGPLAN Conference on Object-Oriented Programing, Systems, Languages, and Applications. 169–190.
[5]
S. M. Blackburn, M. Hirzel, R. Garner, and D. Stefanović. 2007. pjbb2005: The pseudoJBB benchmark. http://users.cecs.anu.edu.au/~steveb/ research/research-infrastructure/pjbb2005
[6]
S. M. Blackburn and A. Hosking. 2004. Barriers: Friend or Foe?. In ACM International Symposium on Memory Management. Vancouver, Canada, 143–151.
[7]
S. M. Blackburn and K. S. McKinley. 2002. In or Out? Putting write barriers in their place. In The ACM International Symposium on Memory Management. 175–184.
[8]
S. M. Blackburn and K. S. McKinley. 2008. Immix: A Mark-Region Garbage Collector with Space Efficiency, Fast Collection, and Mutator Locality. In ACM Conference on Programming Language Design and Implementation. Tuscon, AZ, 22–32.
[9]
R. Bodík, R. Gupta, and V. Sarkar. 2000. ABCD: Eliminating Array Bounds Checks on Demand. In Proceedings of the ACM SIG-PLAN 2000 Conference on Programming Language Design and Implementation (PLDI ’00). ACM, New York, NY, USA, 321–333.
[10]
H-J. Boehm, A. Demers, M. Weiser, B. Hayes, D. Bobrow, and S. Shenker. 1990. Combining Generational and Conservative Garbage Collection: Framework and Implementations. In Proceedings of the Seventeenth Annual ACM Symposium on the Principles of Programming Languages. San Francisco, CA.
[11]
C. Chambers. 1992. Object-Oriented Multi-Methods in Cecil. In Proceedings of the 1992 European Conference on Object-Oriented Programming, Lecture Notes in Computer Science 615. Springer-Verlag, Utrecht, The Netherlands.
[12]
G. O. Collins. 1961. Experience in Automatic Storage Allocation. Commun. ACM 4, 10 (Oct. 1961), 436–440.
[13]
D. Detlefs and V. K. Nandivada. 2004. Compile-time Concurrent Marking Write Barrier Removal. Technical Report. Mountain View, CA, USA.
[14]
D. Dice. 2011. False sharing induced by card table marking. https: //blogs.oracle.com/dave/entry/false_sharing_induced_by_card
[15]
E. W. Dijkstra, L. Lamport, A. J. Martin, C. S. Scholten, and E. F. M. Steffens. 1978. On-The-Fly Garbage Collection: An exercise in Cooperation. Commun. ACM 21, 11 (Nov. 1978), 965–975.
[16]
R. R. Fenichel and J. C. Yochelson. 1969. A LISP Garbage-collector for Virtual-memory Computer Systems. Commun. ACM 12, 11 (Nov. 1969), 611–612.
[17]
U. Hölzle. 1993. A Fast Write Barrier for Generational Garbage Collectors. In OOPSLA, J. Eliot B. Moss, Paul R. Wilson, and Benjamin Zorn (Eds.). ftp://ftp.cs.utexas.edu/pub/garbage/GC93/hoelzle.ps
[18]
A. L. Hosking and R. L. Hudson. 1993. Remembered Sets Can Also Play Cards. Position paper for OOPSLA ’93 Workshop on Memory Management and Garbage Collection.
[19]
A. L. Hosking, J. E. B. Moss, and D. Stefanović. 1992. A Comparative Performance Evaluation of Write Barrier Implementations. In ACM Conference on Object–Oriented Programming, Systems, Languages, and Applications. Vancouver, BC, 92–109.
[20]
R. L. Hudson and J. E. B. Moss. 2001. Sapphire: Copying GC Without Stopping the World. In Proceedings of the 2001 Joint ACM-ISCOPE Conference on Java Grande (JGI ’01). 48–57.
[21]
Y. Levanoni and E. Petrank. 2001. An On-the-fly Reference Counting Garbage Collector for Java. In ACM Conference on Object–Oriented Programming Systems, Languages, and Applications. ACM, Tampa, FL, 367–380.
[22]
H. Lieberman and C. E. Hewitt. 1983. A Real TIme Garbage Collector Based on the Lifetimes of Objects. Commun. ACM 26, 6 (1983), 419– 429.
[23]
J. McCarthy. 1960. Recursive functions of symbolic expressions and their computation by machine, Part I. Commun. ACM 3, 4 (1960), 184–195.
[24]
R. Shahriyar, S. M. Blackburn, X. Yang, and K. S. McKinley. 2013. Taking off the Gloves with Reference Counting Immix. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages and Applications (OOPSLA ’13). ACM, New York, NY, USA, 93–110.
[25]
Standard Performance Evaluation Corporation 1999. SPECjvm98, Release 1.03. Standard Performance Evaluation Corporation. http: //www.spec.org/jvm98
[26]
G. L. Steele, Jr. 1975. Multiprocessing Compactifying Garbage Collection. Commun. ACM 18, 9 (Sept. 1975), 495–508.
[27]
G. Tene, B. Iyengar, and M. Wolf. 2011. C4: The Continuously Concurrent Compacting Collector. In Proceedings of the International Symposium on Memory Management (ISMM ’11). ACM, New York, NY, USA, 79–88.
[28]
D. M. Ungar. 1984. Generation Scavenging: A Non-Disruptive High Performance Storage Reclamation Algorithm. In ACM Software Engineering Symposium on Practical Software Development Environments. 157–167.
[29]
M. T. Vechev and D. F. Bacon. 2004. Write Barrier Elision for Concurrent Garbage Collectors. In Proceedings of the 4th International Symposium on Memory Management (ISMM ’04). ACM, New York, NY, USA, 13–24.
[30]
P. R. Wilson and T. G. Moher. 1989. A “Card-marking” Scheme for Controlling Intergenerational References in Generation-based Garbage Collection on Stock Hardware. In ACM Conference on Object–Oriented Programming Systems, Languages, and Applications. 87–92.
[31]
X. Yang, S. M. Blackburn, D. Frampton, and A. L. Hosking. 2012. Barriers Reconsidered, Friendlier Still!. In Proceedings of the Eleventh ACM SIGPLAN International Symposium on Memory Management, ISMM ’12, Beijing, China, June 15-16.
[32]
T. Yuasa. 1990. Real-time garbage collection on general-purpose machines. Journal of Systems and Software 11, 3 (1990), 181–198.
[33]
K. Zee and M. Rinard. 2002. Write Barrier Removal by Static Analysis. In Proceedings of the 17th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA ’02). ACM, New York, NY, USA, 191–210.
[34]
B. G. Zorn. 1993. The Measured Cost of Conservative Garbage Collection. Software Practice & Experience 23, 7 (1993), 733–756.

Cited By

View all
  • (2022)Low-latency, high-throughput garbage collectionProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523440(76-91)Online publication date: 9-Jun-2022

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ISMM 2019: Proceedings of the 2019 ACM SIGPLAN International Symposium on Memory Management
June 2019
135 pages
ISBN:9781450367226
DOI:10.1145/3315573
This work is licensed under a Creative Commons Attribution International 4.0 License.

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 23 June 2019

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. garbage collection
  2. generational garbage collection
  3. reference counting
  4. write barriers

Qualifiers

  • Research-article

Funding Sources

Conference

ISMM '19
Sponsor:

Acceptance Rates

Overall Acceptance Rate 72 of 156 submissions, 46%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)18
  • Downloads (Last 6 weeks)2
Reflects downloads up to 20 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2022)Low-latency, high-throughput garbage collectionProceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation10.1145/3519939.3523440(76-91)Online publication date: 9-Jun-2022

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media