我们可以在堆转储文件中找到哪个线程持有锁吗

问题描述

像 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 内存分析器 但不知道怎么做。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)