One of the harder GC debugging problems is verifying that all live references are indeed reported to the GC. In other words, verify the stuff that happens outside the GC that impacts the GC. This actually complements verifying that GC internals are functioning correctly. Both are important for building a product quality JVM. Perhaps it makes sense to build the following tool for Harmony:
Build a stack scanner that scans a given Java thread and compares each 4-byte slot to see if it can be interpreted as a ref ptr into the java heap. Put the scan results in a list. The locations that match what the JIT reports are removed from this list. The assumption is that two independent approaches to identifying live references is most likely correct. The remaining (hopefully few) items on the list can be manually inspected by JIT and VM developers to determine if somehow a live reference was actually overlooked. The above approach can be refined. More powerful filters can be constructed to reduce the clutter of false positives. It may even be possible to run the JVM in "debug" mode that will do an assert(0); if it sees suspicious bit patterns in the stack. Thoughts? -- Weldon Washburn Intel Middleware Products Division --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]