aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-03-30 19:50:39 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-03-30 19:50:39 +0200
commit25dbb0743e58fc91ecb7ff5c793c5519eec45494 (patch)
tree908d5e3dedd8ccbc759f82e5b12c1e291a2e8a7c
parentb1b70969e06658555d07d5cab40fb8a70c251e1b (diff)
downloadbusybox-w32-25dbb0743e58fc91ecb7ff5c793c5519eec45494.tar.gz
busybox-w32-25dbb0743e58fc91ecb7ff5c793c5519eec45494.tar.bz2
busybox-w32-25dbb0743e58fc91ecb7ff5c793c5519eec45494.zip
bloat-o-meter: Remove unused code
The regex matching is way slower, so remove it since it was disabled anyway. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
-rwxr-xr-xscripts/bloat-o-meter21
1 files changed, 6 insertions, 15 deletions
diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter
index d095b27b5..6db2a5e58 100755
--- a/scripts/bloat-o-meter
+++ b/scripts/bloat-o-meter
@@ -39,22 +39,13 @@ if f1 is None or f2 is None:
39sym_args = " ".join(sys.argv[3 + flag_timing + dashes:]) 39sym_args = " ".join(sys.argv[3 + flag_timing + dashes:])
40def getsizes(file): 40def getsizes(file):
41 sym, alias, lut = {}, {}, {} 41 sym, alias, lut = {}, {}, {}
42 #dynsym_filter = re.compile("^\d+:\s+[\dA-Fa-f]+\s+\d+\s+\w+\s+\w+\s+\w+\s+\w+\s+\w+$")
43 for l in os.popen("readelf -W -s %s %s" % (sym_args, file)).readlines(): 42 for l in os.popen("readelf -W -s %s %s" % (sym_args, file)).readlines():
44 if True: 43 l = l.strip()
45 l = l.strip() 44 if not (len(l) and l[0].isdigit() and len(l.split()) == 8):
46 if not (len(l) and l[0].isdigit() and len(l.split()) == 8): 45 continue
47 continue 46 num, value, size, typ, bind, vis, ndx, name = l.split()
48 num, value, size, typ, bind, vis, ndx, name = l.split() 47 if ndx == "UND": continue # skip undefined
49 if ndx == "UND": continue # skip undefined 48 if typ in ["SECTION", "FILES"]: continue # skip sections and files
50 if typ in ["SECTION", "FILES"]: continue # skip sections and files
51 #else:
52 # l = l.strip()
53 # match = dynsym_filter.match(l)
54 # if not match: continue
55 # x, value, size, typ, bind, x, ndx, name = l.split()
56 # if ndx == "UND": continue # skip undefined
57 # if typ in ["SECTION", "FILES"]: continue # skip sections and files
58 if "." in name: name = "static." + name.split(".")[0] 49 if "." in name: name = "static." + name.split(".")[0]
59 value = int(value, 16) 50 value = int(value, 16)
60 size = int(size, 16) if size.startswith('0x') else int(size) 51 size = int(size, 16) if size.startswith('0x') else int(size)