harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Volynets, Vera" <vera.volyn...@intel.com>
Subject [DRLVM] GC heap verification infrastructure
Date Fri, 14 Jul 2006 16:57:34 GMT
*************   GC heap verification infrastructure   *************** 
I have been working on implementing GC heap verification infrastructure
for Stop-The-World GC in DRLVM.
This infrastructure is intended be used with any stop-the-world GC
implementation, conforming to the GC-VM interface (described in gc.h and
vm_gc.h), with only a minor GC-VM interface change. 
It works on Windows and Linux ia32 platforms.
GC heap verification infrastructure is a small module which is hijacked
into GC-VM interface.
The main idea is to substitute GC interface function so that necessary
information can be easily collected.
Everybody who is interested in GC development and debugging is invited
to try it, modify files and add their own functionality.
At this moment GC heap verification infrastructure verifies that the
structure of object reference graph stays exactly the same during
collection. Therefore, the number of strongly reachable live objects and
live bytes before and after GC should stay unchanged.
The verification is performed in two phases:
1) On the start of Stop-The-World phase, all enumerated roots to GC by
VM are cached by GC heap verification infrastructure and heap is
traversed, constructing heap "fingerprint", recording the order of the
objects and counting their number and size.   
2) After actual garbage collection is complete, before resuming user
threads, the heap is traced once again and the heap structure is
*Patch contents*
This is an individual contribution, and it was prepared according to the
requirements of Apache cleanroom process; the size of two files all in
all is about 30kb (161 and 585 lines). 
-Patch Add-function-to-gc-interface.txt
It adds function gc_add_finalizable_root_set_entry() for separate
counting of finalizable objects because the GC may not preserve ordering
of finalizable objects, and thus the heap structure can be changed.
-Patch Checks-correctness-of-gc-work.txt
The heart of this patch is file gc_debug.cpp.
The tracing of heap starts with debug_gc_trace_heap() function.
*Users guide*
The debugging mode is off by default, and has no impact on the GC
- To turn on GC Debug infrastructure use VM with -Dvm.verify.gc=true
option in command line.
- To see debug information build VM in debug mode, BUILD_CFG=debug, and
use logger in usual way.
When enabled, the verification heap trace takes quite a bit of time (two
times for each collection: before and after actual collection), GC
pauses increase by 1.5-2 times (from 1406ms to 2515ms) when running
Eclipse on DRLVM built in debug configuration.   
Vera Volynets, Intel Middleware Products Division

Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org

View raw message