From the course: Java Concurrency Troubleshooting: Latency and Throughput
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Collect thread dumps - Java Tutorial
From the course: Java Concurrency Troubleshooting: Latency and Throughput
Collect thread dumps
- [Narrator] Let's go over what a thread dump is first. A thread dump is a snapshot of all the threads that the Java process is running. It shows you the status of those threads and a handful of useful tidbits, about the state of things in running Java application. Now that sounds a little more complicated than it is, but I assure you, it's just debug level logging for the JVM. Why would you want a thread dump? Primarily, to see what individual threads inside your JVM are doing at a given moment. You get to see the methods that each running thread is executing and the status of a thread. You also get to see the locks that each thread is holding, very useful for detecting deadlocks between threads. Now, there are a couple of ways to collect thread dumps, so we can have the Java Mission Control or JMC do that for us. I can use the Java Flight Recorder or JFR, I can use the jcmd utility, I can use the jstack utility, I can use…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Find the source of a blockage4m 46s
-
(Locked)
Collect thread dumps5m 41s
-
(Locked)
Challenge: Find the sleeping method1m 4s
-
(Locked)
Solution: Find the sleeping method3m 27s
-
(Locked)
Identify blocked threads in thread dumps4m 46s
-
(Locked)
View blocked threads with Java Mission Control6m 20s
-
(Locked)
View blocked threads with Java Flight Recorder5m 43s
-
(Locked)
Microbenchmarks in Java with JMH7m 53s
-
(Locked)
Challenge: Run JMH benchmarks and compare28s
-
(Locked)
Solution: Run JMH benchmarks and compare2m 58s
-
(Locked)
-