size check
authorbrian <brian@brianweb.net>
Thu, 27 May 2004 14:25:32 +0000 (07:25 -0700)
committerbrian <brian@brianweb.net>
Thu, 27 May 2004 14:25:32 +0000 (07:25 -0700)
darcs-hash:20040527142532-24bed-988ed85763e9eecdabfcb5c98f6e0bb3591028bd.gz

Makefile
src/org/ibex/nestedvm/util/ELF.java

index 3b64f3b..a26319b 100644 (file)
--- 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 $@`
index e33275e..36fc4eb 100644 (file)
@@ -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");
         }
-    }
+    }*/
 }