Fully featured low overhead profiler for Java EE and Java SE platforms.
Easy to use performance and memory .NET profiler for Windows and Linux.
Performance monitoring and profiling of Jenkins, Bamboo, TeamCity, Gradle, Maven, Ant and JUnit.

com.yourkit.probes.builtin.Threads

Description

Probes to monitor some aspects of thread life cycle:

  • where (frame/thread) and when thread objects (instances of java.lang.Thread or its subclass) are created
  • where (frame/thread) and when threads are started (Thread.start() invoked)
  • where (frame/thread) and when thread name is changed (Thread.setName() invoked)

Problem detection: threads created but not started

The table rows represent lasting events. The event starts when thread object is created, and ends when thread is started.

Thus, non-closed events in the table correspond to threads which has not started. Such threads indicate potential design flaw. However, note that threads actually started in native code can be shown as not started, because their start() method is not called.

Problem detection: anonymous threads

Thread constructor allows not to specify thread name explicitly. Such threads get automatically generated name in form Thread-<number>.

To improve maintainability and clearness of your application, avoid creating anonymous threads, specifying thread name explicitly.

To check if there are anonymous threads in the profiled application, sort the table by name column and look for threads named Thread-<number>.

Problem detection: several threads with same name

Group by name column and sort by row count to check if there are threads with same name.

To improve maintainability and clearness of your application, ensure thread names are unique.

Source code location

<Profiler Installation Directory>/probes/src

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, 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.