try {  helper.getVmClass(object); } catch (NullPointerException ex) { Unsafe.debug("\nObject address "); Unsafe.debug(helper.addressOf32(object)); Unsafe.debug("\nObject TIB "); Unsafe.debug(helper.addressOf32(helper.getTib(object))); helper.die("NPE in processChild; probably corrupted heap"); }
    public boolean visit(Object object) {        // Be very paranoia for now        /*         * if (!heapManager.isObject(helper.addressOf(object))) {         * Unsafe.debug("visit got non-object");         * Unsafe.debug(helper.addressToLong(helper.addressOf(object)));         * Unsafe.getCurrentProcessor().getArchitecture().getStackReader()         * .debugStackTrace(); helper.die("Internal error"); return false;         */        //testObject(object, Unsafe.getVmClass(object));        // Check the current color first, since a stackoverflow of        // the mark stack results in another iteration of visits.        final int gcColor = helper.getObjectColor(object);        if (gcColor == GC_BLACK) {            return true;        } else if (rootSet || (gcColor == GC_GREY)) {            switch (gcColor) {            case GC_WHITE:            case GC_YELLOW:                {                    final boolean ok;                    ok = helper.atomicChangeObjectColor(object, gcColor,                            GC_GREY);                    if (!ok) {                        Unsafe.debug("Could not change object color. ");                    }                }                break;            case GC_GREY:                break;            default:                {                    Unsafe.debug("color");                    Unsafe.debug(gcColor);                    helper.die("Unknown GC color on object");                }            }            stack.push(object);            mark();        }        final boolean rc = (!stack.isOverflow());        return rc;    }