Fully featured low overhead profiler for Java EE and Java SE platforms.
Easy-to-use performance and memory .NET profiler for Windows, Linux and macOS.
Secure and easy profiling in cloud, containers and clustered environments.
Performance monitoring and profiling of Jenkins, Bamboo, TeamCity, Gradle, Maven, Ant and JUnit.

Thread states

Thread state timeline

Timeline view of thread states shows a list of threads on the left with corresponding bars indicating their state over time on the right. Each bar is color-coded: runnable states are in green, blocked states are in red, packed are in purple. Superimposed on these bars are flame Hot spot icons representing the samples with high CPU usage. The rightmost CPU time column lists the cumulative CPU time for each thread, giving you a clear indication of which threads are consuming the most resources.

Thread state timeline

A tooltip appears upon mouse hover over individual thread activity bars, providing detailed information including 1) the thread's state at the moment of sample, 2) the name of the top method on the thread's stack. This is exemplified in the image where the tooltip displays runnable state, the CPU time of 656ms, and the method StringLatin1.java:769(). 3) There is also a timestamp indicating the point in time when CPU usage was sampled.

At the bottom of the States column, there is a time range selector. This interactive feature allows you to adjust the scale of the timeline for a more granular or broader view and to select a specific time region to display. This can help to focus on time intervals of interest, to examine thread behavior and system performance within that period more closely.

Toolbar

  • Hot spot : Highlight the hot spot samples with high CPU usage using the flame icon.
  • Show last 15 minutes, Show last 30 minutes, Show all : Quickly change the range of visible data.
  • Autoscroll : Control auto-scrolling behavior. When toggled, the timeline will be automatically scrolled to the right when new data arrives.

Thread filtering

YourKit Java Profiler provides a comprehensive set of tools for filtering profiling results. With these advanced filtering options, you can isolate and examine specific threads, methods, and states for a more targeted and efficient debugging process.

Thread filtering options

Live threads: These are the threads that are currently active and running in your Java application.

Finished threads: These threads have completed their execution. They are no longer active in the Java Virtual Machine. Tracking finished threads can be useful to understand past activity and to ensure that threads are completing as expected.

Internal threads: These refer to the threads that are used by the JVM internally and are not directly related to the application's logic. They usually handle tasks like garbage collection, JIT compilation, and other housekeeping duties. You can exclude these from profiling results unless they are specifically looking into JVM performance issues.

Idle states: This shows the thread states where the CPU is not being consumed. Threads in wait, sleep, or other non-active states will be shown when this option is enabled. This can be particularly useful when you want to focus on threads that are not using CPU resources and might be waiting on I/O operations, locks, or other conditions.

Filter by thread: This allows you to narrow down the thread view to only those that match a certain name or naming pattern. It's helpful when you are interested in specific threads, such as those associated with a particular part of your application.

Filter by method: This filter will show you the states where a particular method is in the stack trace. If a thread's execution has passed through the specified method, it will be displayed. This is useful for drilling down into how specific methods affect thread states and performance.

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.