From 4556a2c957e8057a2f9e2b4ba5d43bab28ca2cff Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 12 Jul 2008 14:30:11 -0400 Subject: [PATCH] Show percent space of C code used in checkrom.py. --- tools/checkrom.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/checkrom.py b/tools/checkrom.py index 139ba9d..7ba4d0d 100755 --- a/tools/checkrom.py +++ b/tools/checkrom.py @@ -29,12 +29,14 @@ def main(): size16 = syms['code16_end'] - syms['code16_start'] size32 = syms['code32_end'] - syms['code32_start'] + totalc = size16+size32 sizefree = syms['freespace1_end'] - syms['freespace1_start'] tablefree = syms['freespace2_end'] - syms['freespace2_start'] print "16bit C-code size: %d" % size16 print "32bit C-code size: %d" % size32 - print "Total C-code size: %d" % (size16+size32) - print "Free C-code space: %d" % sizefree + print "Total C-code size: %d Free space: %d Percent used: %.1f%%" % ( + totalc, sizefree + , (totalc / float(size16+size32+sizefree)) * 100.0) print "BIOS table space: %d" % tablefree if __name__ == '__main__': -- 2.39.5