- System requirements
- Profiler architecture
- Running the profiler
- Profiler activation
- Start profiling
- Solving performance problems
- CPU profiling
- Threads
- Deadlock detector
- Memory profiling
- Garbage collection
- Monitor profiling
- Exception profiling
- Probes: monitor events of various kinds
- Events in user interface
- Event inspections
- Built-in probes
- com.yourkit.probes.builtin.Threads
- Class loading probe
- com.yourkit.probes.builtin.AwtEvents
- Probe classes
- Monitoring method invocation events
- Data storage
- Performance Charts
- Inspections: automatic recognition of typical problems
- Automatically trigger actions on event
- Summary, snapshot annotation, automatic deobfuscation
- Time measurement (CPU time, wall time)
- Filters
- Snapshot directory customization
- Export of profiling results to HTML, CSV, XML, plain text
- Profiler Java API
- Profiler HTTP API
- Command line tool to control profiling
- Settings
- FAQ: How to profile in my scenario?
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