diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2018-10-08 00:04:40 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2018-10-08 19:48:51 -0400 |
commit | 7a9b195b1665661e10c7e943ce9d5dc6f3226ffc (patch) | |
tree | 941fb2000cd70386c458481416f82dd99a20a853 /buildscripts/gdb | |
parent | 22f97156ab99272bb144fdbd43b9c33a4387451a (diff) | |
download | mongo-7a9b195b1665661e10c7e943ce9d5dc6f3226ffc.tar.gz |
SERVER-36626 Draw wait-for graph from left to right
Diffstat (limited to 'buildscripts/gdb')
-rw-r--r-- | buildscripts/gdb/mongo_lock.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/buildscripts/gdb/mongo_lock.py b/buildscripts/gdb/mongo_lock.py index 7ac4e2981ba..b1a7e4c6ba3 100644 --- a/buildscripts/gdb/mongo_lock.py +++ b/buildscripts/gdb/mongo_lock.py @@ -185,6 +185,10 @@ class Graph(object): if message is not None: sb.append(message) sb.append('digraph "mongod+lock-status" {') + # Draw the graph from left to right. There can be hundreds of threads blocked by the same + # resource, but only a few resources involved in a deadlock, so we prefer a long graph + # than a super wide one. Long resource / thread names would make a wide graph even wider. + sb.append(' rankdir=LR;') for node_key in self.nodes: for next_node_key in self.nodes[node_key]['next_nodes']: sb.append(' "{}" -> "{}";'.format( |