if (!debug) { return; }
    protected final void printLabels(NativeStream os, VmType[] bootClasses,            VmStatics statics) throws BuildException,            UnresolvedObjectRefException {        try {            int unresolvedCount = 0;            final PrintWriter w = new PrintWriter(new FileWriter(listFile));            // Print a list of boot classes.            for (int i = 0; i < bootClasses.length; i++) {                final VmType vmClass = bootClasses[i];                w.print("bootclass ");                w.print(i);                w.print(": ");                w.print(vmClass.getName());                if (vmClass instanceof VmClassType) {                    final int cnt = ((VmClassType) vmClass).getInstanceCount();                    if (cnt > 0) {                        w.print(", ");                        w.print(cnt);                        w.print(" instances");                        if (vmClass instanceof VmNormalClass) {                        	long objSize = ((VmNormalClass)vmClass).getObjectSize();                        	long totalSize = objSize * cnt;                            w.print(", ");                        	w.print(objSize);                            w.print(" objsize ");                        	w.print(totalSize);                            w.print(" totsize");                            if (totalSize > 200000) {                            	log(vmClass.getName() + " is large (" + totalSize + " , #" + cnt + ")", Project.MSG_WARN);                            }                        }                    }                }                if (vmClass.isArray()) {                    final long len = ((VmArrayClass) vmClass).getTotalLength();                    if (len > 0) {                        w.print(", ");                        w.print(len);                        w.print(" total length ");                        w.print(len                                / ((VmArrayClass) vmClass).getInstanceCount());                        w.print(" avg length ");                        w.print(((VmArrayClass)vmClass).getMaximumLength());                        w.print(" max length ");                    }                }                int cnt = vmClass.getNoInterfaces();                if (cnt > 0) {                    w.print(", ");                    w.print(cnt);                    w.print(" interfaces");                }                w.print(vmClass.isInitialized() ? "" : ", not initialized");                w.println();            }            w.println();            // Print the statics table            final int[] table = (int[]) statics.getTable();            for (int i = 0; i < table.length; i++) {                w.print(NumberUtils.hex((VmArray.DATA_OFFSET + i) << 2));                w.print(":");                w.print(NumberUtils.hex(statics.getType(i), 2));                w.print("\t");                w.print(NumberUtils.hex(table[i]));                w.println();            }            // Look for unresolved labels and put all resolved            // label into the sorted map. This will be used later            // to print to the listing file.            final Collection<? extends ObjectRef> xrefs = os.getObjectRefs();            final SortedMap<Integer, ObjectRef> map = new TreeMap<Integer, ObjectRef>();            for (ObjectRef ref : xrefs) {                if (!ref.isResolved()) {                    StringBuffer buf = new StringBuffer();                    buf.append("  $" + Integer.toHexString(ref.getOffset()));                    buf.append("\t" + ref.getObject());                    System.err.println("Unresolved label " + buf.toString());                    unresolvedCount++;                } else {                    map.put(new Integer(ref.getOffset()), ref);                }            }            if (unresolvedCount > 0) {                throw new BuildException("There are " + unresolvedCount                        + " unresolved labels");            } // Print the            // listing            // file.            for (ObjectRef ref : map.values()) {                final Object object = ref.getObject();                w.print('$');                w.print(hex(ref.getOffset() + os.getBaseAddr()));                w.print('\t');                w.print(object);                w.print(" (");                if (object instanceof VmSystemObject) {                    final String info = ((VmSystemObject) object)                            .getExtraInfo();                    if (info != null) {                        w.print(info);                        w.print(", ");                    }                }                w.print(object.getClass().getName());                w.println(')');            }            w.close();        } catch (IOException ex) {            throw new BuildException("Writing list", ex);        }    }