tools/deadlock: support specifies maxnum of threads and edge cases (#3455)
authorzcy <zcy.chenyue.zhou@gmail.com>
Thu, 27 May 2021 16:50:23 +0000 (00:50 +0800)
committerGitHub <noreply@github.com>
Thu, 27 May 2021 16:50:23 +0000 (09:50 -0700)
commit77f5252d158de70d087817b96f865f851ffda259
tree7776ec70bd023f71eabeac4941123b8754304b4a
parente6aa65ec777764b7832821522479d9bcc12561b3
tools/deadlock: support specifies maxnum of threads and edge cases (#3455)

support to specify maxinum of threads and edge cases. The default values make map taking more than 0.5G memory which cause out-of-memory issue on some systems.
also fix an issue with python `open` so the open file is automatically closed upon file reading is done.
man/man8/deadlock.8
tools/deadlock.c
tools/deadlock.py
tools/deadlock_example.txt