On the Usefulness of Liveness for Garbage Collection and Leak Detection
The effectiveness of garbage collectors and leak detectors in identifying dead objects depends on the “accuracy” of their reachability traversal. Accuracy has two orthogonal dimensions: (i) whether the reachability traversal can distinguish between pointers and non-pointers (type accuracy), and (ii) whether the reachability traversal can identify memory locations that will be dereferenced in the future (liveness accuracy). While prior work has investigated the importance of type accuracy, there has been little work investigating the importance of liveness accuracy for garbage collection or leak detection. This paper presents an experimental study of the importance of liveness on the accuracy of the reachability traversal. We show that while liveness can significantly improve the effectiveness of a garbage collector or leak detector, the simpler liveness schemes are largely ineffective. One must analyze globals using an interprocedural analysis to get significant benefit.0
KeywordsLocation Descriptor Garbage Collection Liveness Scheme Leak Detection Global Location
Unable to display preview. Download preview PDF.
- Ole Agesen, David Detlefs, and J. Eliot B. Moss. Garbage collection and local variable type-precision and liveness in Java virtual machines. In ACM conference on programming language design and implementation, pages 269–279, Montreal, Canada, June 1998.Google Scholar
- Joel F. Bartlett. Compacting garbage collection with ambiguous roots. Technical Report 88/2, DEC Western Research Laboratory, Palo Alto, CA, February 1988. Also in Lisp Pointers 1(6):2–12, April-June 1988.Google Scholar
- Joel F. Bartlett. Mostly-copying garbage collection picks up generations and C++. Technical report, DEC Western Research Laboratory, Palo Alto, CA, October 1989.Google Scholar
- Hans Boehm, Alan Demers, and Scott Shenker. Mostly parallel garbage collection. In ACM conference on programming language design and implementation, pages 157–164, Minneapolis, MN, November 1991.Google Scholar
- Hans Boehm, Alan Demers, and Mark Weiser. A garbage collector for C and C++. http://www.hpl.hp.com/personal/Hans_Boehm/gc/.
- Hans Boehm and Zhong Shao. Inferring type maps during garbage collection. In OOPSLA’ 93 Workshop on Memory Management and Garbage Collection, September 1993.Google Scholar
- Hans Boehm and Mark Weiser. Garbage collection in an uncooperative environment. Software—Practice and experience, pages 807–820, September 1988.Google Scholar
- Dominique Colnet, Philippe Coucaud, and Olivier Zendra. Compiler support to customize the mark and sweep algorithm. In Proceedings of the International Symposium on Memory Management, pages 154–165, Vancouver, October 1998.Google Scholar
- Jeremy Dion and Louis Monier. Third degree. http://research.compaq.com/wrl/projects/om/third.html.
- Amer Diwan, J. Eliot B. Moss, and Richard L. Hudson. Compiler support for garbage collection in a statically typed language. In ACM conference on programming language design and implementation, pages 273–282, San Francisco, CA, July 1992.Google Scholar
- Great Circle-Real-time error detection and code diagnosis for developers. http://www.geodesic.com/products/greatcircle.html.
- James Gosling, Bill Joy, and Guy Steele. The Java language specification. Addison-Wesley, 1996.Google Scholar
- Reed Hastings and Bob Joyce. Fast detection of memory leaks and access errors. In Proceedings of the Winter’ 92 USENIX conference, pages 125–136, 1992.Google Scholar
- Michael Hicks, Jonathan Moore, and Scott Nettles. The measured cost of copying garbage collection mechanisms. In Functional Programming, pages 292–305, June 1997.Google Scholar
- Martin Hirzel and Amer Diwan. On the type accuracy of garbage collection. In Proceedings of the International Symposium on Memory Management, pages 1–12, Minneapolis, MN, October 2000.Google Scholar
- Richard L. Hudson, J. Eliot B. Moss, Amer Diwan, and Christopher F. Weight. A language-independent garbage collector toolkit. Technical Report 91-47, University of Massachusetts at Amherst, September 1991.Google Scholar
- Richard Jones and Rafael Lins. Garbage collection: algorithms for automatic dynamic memory management. John Wiley & Sons, 1st edition, 1997.Google Scholar
- Robin Milner, Mads Tofte, and Robert Harper. The Definition of Standard ML. MIT Press, Cambridge, Massachusetts, 1990.Google Scholar
- Greg Nelson, editor. Systems Programming with Modula-3. Prentice Hall, New Jersey, 1991.Google Scholar
- Todd Proebsting, Gregg Townsend, Patrick Bridges, John Hartman, Tim Newsham, and Scott Watterson. Toba: Java for applications-a way ahead of time (WAT) compiler. In USENIX COOTS, pages 41–53, June 1997.Google Scholar
- Ran Shaham, Elliot K. Kolodner, and Mooly Sagiv. On the effectiveness of GC in Java. In Proceedings of the International Symposium on Memory Management, pages 12–17, Minneapolis, MN, October 2000.Google Scholar
- Frederick Smith and Greg Morrisett. Comparing mostly-copying and mark-sweep conservative collection. In Proceedings of the International Symposium on Memory Management, pages 68–78, October 1998.Google Scholar
- James Stichnoth, Guei-Yuan Lueh, and Michaeł Cierniak. Support for garbage collection at every instruction in a Java compiler. In ACM conference on programming language design and implementation, pages 118–127, May 1999.Google Scholar
- Stanford University SUIF Research Group. Suif compiler system version 1.x. http://suif.stanford.edu/suif/suif1/index.html.
- David Tarditi, Greg Morrisett, P. Cheng, C. Stone, Robert Harper, and Peter Lee. TIL: A type-directed optimizing compiler for ML. In ACM conference on programming language design and implementation, pages 181–192, May 1996.Google Scholar
- David Ungar. Generation scavenging: A non-disruptive high performance storage reclamation algorithm. In Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, pages 157–167, 1984.Google Scholar
- Paul R. Wilson, Michael S. Lam, and Thomas G. Moher. Caching considerations for generational garbage collection. In 1992 ACMConference on Lisp and Functional Programming, pages 32–42, San Francisco, California, June 1992.Google Scholar
- Robert P. Wilson, Robert S. French, Christopher S. Wilson, Saman P. Amarasinghe, Jennifer-Ann M. Anderson, Steven W. K. Tjiang, Shih-Wei Liao, Chau-Wen Tseng, Mary W. Hall, Monica S. Lam, and John L. Hennessy. SUIF: An infrastructure for research on parallelizing and optimizing compilers. ACM SIGPLAN Notices, 29(12):31–37, December 1984.CrossRefGoogle Scholar
- Benjamin Zorn. The effect of garbage collection on cache performance. Technical Report CU-CS-528-91, University of Colorado at Boulder, May 1991.Google Scholar
- Benjamin Zorn. The measured cost of conservative garbage collection. In Software-Practice and Experience, pages 733–756, July 1993.Google Scholar