diff options
author | Bernhard Reutner-Fischer | 2012-03-30 19:50:39 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2012-03-30 19:50:39 +0200 |
commit | 25dbb0743e58fc91ecb7ff5c793c5519eec45494 (patch) | |
tree | 908d5e3dedd8ccbc759f82e5b12c1e291a2e8a7c | |
parent | b1b70969e06658555d07d5cab40fb8a70c251e1b (diff) | |
download | busybox-25dbb0743e58fc91ecb7ff5c793c5519eec45494.zip busybox-25dbb0743e58fc91ecb7ff5c793c5519eec45494.tar.gz |
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-x | scripts/bloat-o-meter | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter index d095b27..6db2a5e 100755 --- a/scripts/bloat-o-meter +++ b/scripts/bloat-o-meter @@ -39,22 +39,13 @@ if f1 is None or f2 is None: sym_args = " ".join(sys.argv[3 + flag_timing + dashes:]) def getsizes(file): sym, alias, lut = {}, {}, {} - #dynsym_filter = re.compile("^\d+:\s+[\dA-Fa-f]+\s+\d+\s+\w+\s+\w+\s+\w+\s+\w+\s+\w+$") for l in os.popen("readelf -W -s %s %s" % (sym_args, file)).readlines(): - if True: - l = l.strip() - if not (len(l) and l[0].isdigit() and len(l.split()) == 8): - continue - num, value, size, typ, bind, vis, ndx, name = l.split() - if ndx == "UND": continue # skip undefined - if typ in ["SECTION", "FILES"]: continue # skip sections and files - #else: - # l = l.strip() - # match = dynsym_filter.match(l) - # if not match: continue - # x, value, size, typ, bind, x, ndx, name = l.split() - # if ndx == "UND": continue # skip undefined - # if typ in ["SECTION", "FILES"]: continue # skip sections and files + l = l.strip() + if not (len(l) and l[0].isdigit() and len(l.split()) == 8): + continue + num, value, size, typ, bind, vis, ndx, name = l.split() + if ndx == "UND": continue # skip undefined + if typ in ["SECTION", "FILES"]: continue # skip sections and files if "." in name: name = "static." + name.split(".")[0] value = int(value, 16) size = int(size, 16) if size.startswith('0x') else int(size) |