diff options
author | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-03-13 12:59:30 +0100 |
---|---|---|
committer | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-03-13 12:59:30 +0100 |
commit | ec6e273a30574e61f2b83cc351f7979229ff283b (patch) | |
tree | 44875658a1285c225ce01ab1ce0289e6fe16c48d | |
parent | 9a220b68787dd6af8d4709fbbbda94cd90f355fe (diff) | |
download | master-thesis-ec6e273a30574e61f2b83cc351f7979229ff283b.tar.gz master-thesis-ec6e273a30574e61f2b83cc351f7979229ff283b.tar.bz2 master-thesis-ec6e273a30574e61f2b83cc351f7979229ff283b.zip |
Prettify linkmap output
-rw-r--r-- | controller/fw/tools/linkmem.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/controller/fw/tools/linkmem.py b/controller/fw/tools/linkmem.py index 3d08d19..164c7cf 100644 --- a/controller/fw/tools/linkmem.py +++ b/controller/fw/tools/linkmem.py @@ -146,11 +146,12 @@ if __name__ == '__main__': clusters = defaultdict(lambda: []) for sym, (obj, size) in syms.items(): - clusters[obj].append((sym, size)) + if sym in syms_out: + clusters[obj].append((sym, size)) obj_size = defaultdict(lambda: 0) - for name, (obj, size) in syms.items(): - if size is not None: + for sym, (obj, size) in syms.items(): + if size is not None and sym in syms_out: obj_size[obj] += size max_size = max([ size for _obj, size in syms.values() if size is not None ]) @@ -159,7 +160,7 @@ if __name__ == '__main__': subdir_prefix = path.abspath(args.highlight_subdirs) + '/' if args.highlight_subdirs else '### NO HIGHLIGHT ###' first_comp = lambda le_path: path.dirname(le_path).partition(os.sep)[0] subdir_colors = sorted({ first_comp(obj[len(subdir_prefix):]) for obj in obj_size if obj.startswith(subdir_prefix) }) - subdir_colors = { path: hexcolor(*matplotlib.cm.Paired(i/len(subdir_colors))) for i, path in enumerate(subdir_colors) } + subdir_colors = { path: hexcolor(*matplotlib.cm.Pastel1(i/len(subdir_colors))) for i, path in enumerate(subdir_colors) } def lookup_highlight(path): if args.highlight_subdirs: |