문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
|
java:performance:threaddump [2015/09/23 14:12] kwon37xi |
java:performance:threaddump [2023/02/14 13:54] (현재) kwon37xi [dump 뜨기] |
||
|---|---|---|---|
| 줄 1: | 줄 1: | ||
| ====== Java ThreadDump ====== | ====== Java ThreadDump ====== | ||
| - | * [[https://java.net/projects/threadlogic|ThreadLogic]] : 아직까지 보기엔 제일 나은 듯. 다중 쓰레드 덤프 못 읽는 문제 생긴 듯. | + | |
| - | * [[http://java.net/projects/tda|Thread Dump Analyzer]] | + | |
| + | * [[http:// | ||
| + | * [[http://fasterj.com/ | ||
| + | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| + | * [[https:// | ||
| * [[https:// | * [[https:// | ||
| * [[http:// | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| + | * [[https:// | ||
| + | |||
| + | ===== dump 뜨기 ===== | ||
| + | <code sh> | ||
| + | # java process 확인 | ||
| + | jps | ||
| + | |||
| + | # jstack | ||
| + | jstack <PID> | ||
| + | |||
| + | # jcmd | ||
| + | jcmd <PID> Thread.print | ||
| + | |||
| + | # kill -3 : process system.out 으로 출력된다. | ||
| + | kill -3 <PID> | ||
| + | </ | ||
| + | * '' | ||
| + | < | ||
| + | -XX: | ||
| + | </ | ||
| + | ===== waiting 하고 있는 monitor가 있는데 어느 쓰레드가 해당 monitor를 locking 하고 있는지 정보가 없는 상황 | ||
| + | * Thread Dump를 떴을 때 분명 '' | ||
| + | * TDA 가 출력한 내용에 따르면, | ||
| + | * a VM Thread is holding it. | ||
| + | * This lock is a java.util.concurrent lock and the thread holding it is not reported in the stack tracebecause the JVM option -XX: | ||
| + | * This lock is a custom java.util.concurrent lock either not based off of AbstractOwnableSynchronizer or not setting the exclusive owner when a lock is granted. | ||
| + | * 일반적으로는 '' | ||
| ===== nid/tid ===== | ===== nid/tid ===== | ||
| * tid : java가 스스로 붙이는 쓰레드 단위 ID | * tid : java가 스스로 붙이는 쓰레드 단위 ID | ||
| * nid : Native ID. OS 차원의 쓰레드 ID, linux에서는 '' | * nid : Native ID. OS 차원의 쓰레드 ID, linux에서는 '' | ||
| + | * '' | ||
| ===== 참조 ===== | ===== 참조 ===== | ||
| 줄 17: | 줄 48: | ||
| * [[http:// | * [[http:// | ||
| * [[http:// | * [[http:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||