Thread Dump与Analyzer
来源:互联网 发布:淘宝代金券怎么使用 编辑:程序博客网 时间:2024/06/05 04:35
线程转储文件中有什么呢?
包含每一个线程的状态及调用堆栈信息。
1.thread dump
jstack pid
可以输出堆栈信息到控制台,可用重定向命令写入到文件中。
2.分析
结果为普通文本,可以直接阅读。形如:
2016-11-04 23:53:16Full thread dump OpenJDK 64-Bit Server VM (24.95-b01 mixed mode):"JDWP Transport Listener: dt_socket" daemon prio=10 tid=0x00007f1b280af000 nid=0x10e4 runnable [0x0000000000000000] java.lang.Thread.State: RUNNABLE"Attach Listener" daemon prio=10 tid=0x00007f1b20e59800 nid=0x5c2 waiting on condition [0x0000000000000000] java.lang.Thread.State: RUNNABLE"ajp-nio-8009-exec-10" daemon prio=10 tid=0x00007f1b20e58000 nid=0x6fef waiting on condition [0x00007f1b0eae9000] java.lang.Thread.State: WAITING (parking)at sun.misc.Unsafe.park(Native Method)- parking to wait for <0x00000000df72b840> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:103)at org.apache.tomcat.util.threads.TaskQueue.take(TaskQueue.java:31)at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)at java.lang.Thread.run(Thread.java:745)
3.线程状态
大致有RUNNABLE,WAITING ,TIMED_WAITING,BLOCKED这四种状态。
看到很多TIMED_WAITING不要担心,我们若用了java.util.concurrent.ThreadPoolExecutor 这个线程池,那么空闲的线程显示的就是TIMED_WAITING状态。因为它内部是BlockingQueue来盛放任务,若为空,get()的时候自然会阻塞。
0 0
- Thread Dump与Analyzer
- Heap Dump与Analyzer
- thread dump
- thread dump
- Thread Dump分析
- Thread dump 性能调用
- Thread dump 性能调用
- thread dump分析
- java thread dump
- Thread dump 性能调用
- Thread Dump分析(转)
- Create java Thread dump
- 如何分析thread dump
- thread dump获取
- JDK-Thread Dump
- Java Thread Dump分析
- Capture the thread dump
- java Thread dump
- Android Studio实战 - 安装
- 1001. A+B Format
- HW2171是一款低成本高性能高集成度2.4GHz无线SOC芯片
- HDU 2243 考研路茫茫——单词情结 AC自动机+DP+快速幂
- 最长回文子串
- Thread Dump与Analyzer
- HDU-3172-Virtual Friends
- Chrome,FireFox开发者工具无法找到js?
- postman post/get 方法
- C#中datagridview使用tooltip控件显示单元格内容与datagridview自带的tooltip显示单元格内容的方法
- CodeForces 606B Testing Robots【读题题QAQ】
- 安卓低功耗蓝牙开发
- Easy 191题 Number of 1 Bits
- This app has been built with an incorrect configuration. Please configure your build for VectorDrawa