X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/3903760236c30e3b5ace7a4eefac3a269d68957c..4ba76501152d51ccb5647018f3192c6096367d48:/tools/trace/parse_ipc_trace.py diff --git a/tools/trace/parse_ipc_trace.py b/tools/trace/parse_ipc_trace.py old mode 100644 new mode 100755 index 19d9a1401..0ffa386c5 --- a/tools/trace/parse_ipc_trace.py +++ b/tools/trace/parse_ipc_trace.py @@ -441,7 +441,7 @@ class IPCGraph: def print_dot_edge(self, nm, edge, ofile): #weight = 100 * edge.dweight / self.maxdweight - #if weight < 1: + ##if weight < 1: # weight = 1 weight = edge.dweight penwidth = edge.weight / 512 @@ -464,18 +464,20 @@ class IPCGraph: if edge.data('vcpy') > (edge.data('ool') + edge.data('std')): attrs += ',style="dotted"' - #ltype = [] - #if edge.flags & (edge.F_DST_NDFLTQ | edge.F_SRC_NDFLTQ): - # ltype.append('dotted') - #if edge.flags & edge.F_APP_SRC: - # ltype.append('bold') - #if len(ltype) > 0: - # attrs += ',style="' + reduce(lambda a, v: a + ',' + v, ltype) + '"' - # - #if edge.data('ool') > (edge.data('std') + edge.data('vcpy')): - # attrs += ",color=blue" - #if edge.data('vcpy') > (edge.data('ool') + edge.data('std')): - # attrs += ",color=green" + """ # block comment + ltype = [] + if edge.flags & (edge.F_DST_NDFLTQ | edge.F_SRC_NDFLTQ): + ltype.append('dotted') + if edge.flags & edge.F_APP_SRC: + ltype.append('bold') + if len(ltype) > 0: + attrs += ',style="' + reduce(lambda a, v: a + ',' + v, ltype) + '"' + + if edge.data('ool') > (edge.data('std') + edge.data('vcpy')): + attrs += ",color=blue" + if edge.data('vcpy') > (edge.data('ool') + edge.data('std')): + attrs += ",color=green" + """ ofile.write("\t{:s} [{:s}];\n".format(nm, attrs))