From: brian Date: Thu, 27 May 2004 14:25:32 +0000 (-0700) Subject: size check X-Git-Url: http://git.megacz.com/?p=nestedvm.git;a=commitdiff_plain;h=b4cee44bea4853f5c0f7cb3b331aecb84ef3aa3e;hp=ab9be117467f7459965c61e49749b333678b6e4c;ds=sidebyside size check darcs-hash:20040527142532-24bed-988ed85763e9eecdabfcb5c98f6e0bb3591028bd.gz --- diff --git a/Makefile b/Makefile index 3b64f3b..a26319b 100644 --- a/Makefile +++ b/Makefile @@ -227,6 +227,13 @@ compact_runtime_compiler.jar: $(java_classes) .manifest $(tasks)/build_darcs_gcc 'org.ibex.nestedvm.Runtime$$CPUState.dup' cd tmp/pruned && jar cfm ../../$@ ../../.manifest . +sizecheck: compact_runtime_compiler.jar + @for c in `find tmp/pruned -name '*.class'|fgrep -v '$$'`; do \ + for f in `echo $$c|sed 's,\.class$$,,;'`*.class; do gzip -c $$f; done | wc -c | tr -d '\n'; \ + echo -e "\t`echo $$c | sed 's,tmp/pruned/org/ibex,,;s,\.class$$,,;s,/,.,g;'`"; \ + done | sort -rn | awk '{ sum += $$1; print } END { print sum,"Total"; }' + + # This is only for Brian to use... don't mess with it rebuild-constants: $(tasks)/build_libc @mkdir -p `dirname $@` diff --git a/src/org/ibex/nestedvm/util/ELF.java b/src/org/ibex/nestedvm/util/ELF.java index e33275e..36fc4eb 100644 --- a/src/org/ibex/nestedvm/util/ELF.java +++ b/src/org/ibex/nestedvm/util/ELF.java @@ -346,7 +346,7 @@ public class ELF { private static String toHex(int n) { return "0x" + Long.toString(n & 0xffffffffL, 16); } - public static void main(String[] args) throws IOException { + /*public static void main(String[] args) throws IOException { ELF elf = new ELF(new Seekable.InputStream(new FileInputStream(args[0]))); System.out.println("Type: " + toHex(elf.header.type)); System.out.println("Machine: " + toHex(elf.header.machine)); @@ -376,5 +376,5 @@ public class ELF { } else { System.out.println("Symbol table: None"); } - } + }*/ }