diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2018-10-08 00:04:40 -0400 |
---|---|---|
committer | Siyuan Zhou <visualzhou@gmail.com> | 2018-12-05 20:40:42 -0500 |
commit | daaf0aae8b713a3eafde8ebf20ae620f272e3388 (patch) | |
tree | 14abf090abcf1f6209a0f71a1b78e467e6daf93a | |
parent | f036c87b5f4c9d6a82338aa8680b5c6f2b541026 (diff) | |
download | mongo-daaf0aae8b713a3eafde8ebf20ae620f272e3388.tar.gz |
SERVER-36626 Draw wait-for graph from left to right
(cherry picked from commit 7a9b195b1665661e10c7e943ce9d5dc6f3226ffc)
-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 e886855b2eb..a7cef33a83e 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( |