【发布时间】:2022-01-07 00:47:34
【问题描述】:
像 jstack 命令一样有 -l 选项,其中包含锁定信息。
Usage:
jstack [-l] <pid>
(to connect to running process)
jstack -F [-m] [-l] <pid>
(to connect to a hung process)
jstack [-m] [-l] <executable> <core>
(to connect to a core file)
jstack [-m] [-l] [server_id@]<remote server IP or hostname>
(to connect to a remote debug server)
Options:
-F to force a thread dump. Use when jstack <pid> does not respond (process is hung)
-m to print both java and native frames (mixed mode)
-l long listing. Prints additional information about locks
-h or -help to print this help message
我想知道java是否在堆中存储锁信息?如果答案是肯定的,我们可以通过查看堆转储文件来检查线程锁吗?我正在使用 eclipse 内存 anlyazier 但不知道怎么做。
【问题讨论】:
-
我想,这个数据没有存储在堆中,但是你可以在线程转储中找到它