From 378b753c89773f276771d5b3690d58d0ca08d521 Mon Sep 17 00:00:00 2001 From: Costa Shulyupin Date: Sun, 29 Jul 2018 09:22:36 +0300 Subject: [PATCH] +default_root --- srcxray.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/srcxray.py b/srcxray.py index 86f4423..022a210 100755 --- a/srcxray.py +++ b/srcxray.py @@ -25,6 +25,7 @@ import difflib import glob from pathlib import * +default_root = 'starts' black_list = ('aligned __attribute__ unlikely typeof u32' 'PVOP_CALLEE0 PVOP_VCALLEE0 PVOP_VCALLEE1 if trace_hardirqs_off' 'i NULL likely unlikely true false test_bit NAPI_GRO_CB clear_bit ' @@ -436,7 +437,7 @@ def digraph_tree(dg, starts=None): for o in starts: if o in black_list: continue - tree.add_edge('start',o) + tree.add_edge(default_root,o) sub(o) return tree @@ -469,7 +470,7 @@ def digraph_print(dg, starts=None, sort=False): starts[i] = dg.out_degree(i) starts = [a[0] for a in sorted(starts.items(), key=lambda k: k[1], reverse=True)] if len(starts) > 1: - print_limited('starts') + print_limited(default_root) for s in starts: print_limited('\t' + s + ' ->') passed = set()