Skip to Content Java Solaris Communities Partners My Sun Sun Store United States Worldwide

»  1992
»  1993
»  1994
»  1995
»  1996
»  1997
»  1998
»  1999
»  2000
»  2001
»  2002
»  2003
»  2004
»  2005
»  2006

GC Points in a Threaded Environment

Author(s):
Ole Agesen
Report Number: Date Published: Available Formats:
TR-98-70 December 1998 Portable Document Format (PDF)
Postscript (PS)
Request Hard Copy
Abstract

Many garbage-collected systems, including most that involve a stop-the-world phase, restrict GC to so called GC points. In single-threaded environments, GC points carry no overhead: when a GC must be done, the single thread is already at a GC point. In multi-threaded environments, however, only the thread that triggers the GC by failing an allocation will be at a GC point. Other threads must be rolled forward to their next GC point before the GC can take place. We compare, in the context of a high-performance JavaTM virtual machine, two approaches to advancing threads to a GC point, polling and code patching, while keeping all other factors constant. Code patching outperforms polling by an average of 4.7% and sometimes by as much as 11.2%, while costing only slightly more compiled code space. Put differently, since most programs spend less than 1/5 of the time in GC, a 4.7% bottom-line speedup amounts to more than a 20% reduction in the GC-related costs. Patching is, however, more difficult to implement.

Would you recommend this Sun site to a friend or colleague?
Contact About Sun News Employment Privacy Terms of Use Trademarks Copyright 1994-2008 Sun Microsystems, Inc.