Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ctrl+break 和 java 程序进行的线程转储有什么区别? 我正在使用下面的代码片段来获取线程转储
映射 st = Thread.getAllStackTraces();
Thread.getAllStackTraces不包括有关线程状态或它们持有的锁或它们等待的锁的信息。您需要从其他地方获取此信息(有ThreadMXBean这个)。
Thread.getAllStackTraces
ThreadMXBean