custom compacting GC implementation
Pressenna Sockalingasamy
psockali at gmail.com
Tue Sep 28 22:50:52 UTC 2010
Hi,
I'm trying to implement a (so far) simple heap, which stops the world and compacts spaces.
It is all working, but as soon as I compact spaces and get new oop addresses to be used, the JVM SIGSEGVs.
For some reasons, the backtrace (via DDD) shows me that the VM is executing code in the heap address space.
Is there something special I have to do / consider when adjusting pointers during a safepoint?
Currently I am just using the same approach as the SharedHeap::process_strong_roots(...).
My code base is the b20 source drop.
Current code is as follows:
rmsAdjustClosure rac(_adjustmentMap);
Universe::oops_do(&rac);
ReferenceProcessor::oops_do(&rac);
JNIHandles::oops_do(&rac);
Threads::oops_do(&rac, NULL);
ObjectSynchronizer::oops_do(&rac);
FlatProfiler::oops_do(&rac);
Management::oops_do(&rac);
JvmtiExport::oops_do(&rac);
SystemDictionary::oops_do(&rac);
vmSymbols::oops_do(&rac);
JNIHandles::oops_do(&rac);
CodeCache::oops_do(&rac);
SymbolTable::oops_do(&rac);
StringTable::oops_do(&rac);
// adjust pointers in the permanent space / generation
_heap->permanent_oop_iterate(&rac);
Regards,
Pressenna Sockalingasamy
PS: sorry for the double post... forgot the sample code
More information about the hotspot-gc-dev
mailing list