Barriers
- 24 October 2004
- conference paper
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 143-151
- https://doi.org/10.1145/1029873.1029891
Abstract
Modern garbage collectors rely on read and write barriers imposed on heap accesses by the mutator, to keep track of references between different regions of the garbage collected heap, and to synchronize actions of the mutator with those of the collector. It has been a long-standing untested assumption that barriers impose significant overhead to garbage-collected applications. As a result, researchers have devoted effort to development of optimization approaches for elimination of unnecessary barriers, or proposed new algorithms for garbage collection that avoid the need for barriers while retaining the capability for independent collection of heap partitions. On the basis of the results presented here, we dispel the assumption that barrier overhead should be a primary motivator for such efforts. We present a methodology for precise measurement of mutator overheads for barriers associated with mutator heap accesses. We provide a taxonomy of different styles of barrier and measure the cost of a range of popular barriers used for different garbage collectors within Jikes RVM. Our results demonstrate that barriers impose surprisingly low cost on the mutator, though results vary by architecture. We found that the average overhead for a reasonable generational write barrier was less than 2% on average, and less than 6% in the worst case. Furthermore, we found that the average overhead of a read barrier consisting of just an unconditional mask of the low order bits read on the PowerPC was only 0.85%, while on the AMD it was 8.05%. With both read and write barriers, we found that second order locality effects were sometimes more important than the overhead of the barriers themselves, leading to counter-intuitive speedups in a number of situations.Keywords
This publication has 22 references indexed in Scilit:
- Incremental collection of mature objectsPublished by Springer Science and Business Media LLC ,2005
- Programming lessons from days gone byACM SIGPLAN Notices, 2003
- A real-time garbage collector with low overhead and consistent utilizationACM SIGPLAN Notices, 2003
- Write barrier removal by static analysisACM SIGPLAN Notices, 2002
- In or out?ACM SIGPLAN Notices, 2002
- BeltwayACM SIGPLAN Notices, 2002
- Adaptive optimization in the Jalapeño JVMACM SIGPLAN Notices, 2000
- Design of the opportunistic garbage collectorACM SIGPLAN Notices, 1989
- A “card-marking” scheme for controlling intergenerational references in generation-based garbage collection on stock hardwareACM SIGPLAN Notices, 1989
- A third generation Smalltalk-80 implementationACM SIGPLAN Notices, 1986