Viewing Thread Information
Prerequisites
A real-time profiling task has been created and is in progress.
Procedure
- In the Task/Report List area of the Java Profiler page, click the name of the analysis task under Real-Time Profiling.
The Overview tab page is displayed.
- Click the CPU tab.The Thread List tab page is displayed. See Figure 1.
- The Thread List tab page lists the names and status of the threads started by the Java process. A thread can be in the Runnable, Waiting, or Blocked state.
- You can use the thread search box and Display Mode drop-down list box to quickly filter data.
- You can click the Dump button to dump the current thread status for subsequent tab page analysis and display.
- Click the Thread Dump tab.
The Thread Overview page is displayed by default. Click a thread dump record to view the thread overview information. See Figure 2.
- A Java thread dump is a snapshot of the state of all threads in the JVM at a particular point in time.
- You can click
on the left to delete thread dump event information of different time points. - You can click
on the left to save the current thread dump information. The thread dump event information of the same time point can be saved only once. You can view or download the information in Data List on the main page. - In the table header of the data display area, you can click
to search for a thread name or thread ID, click
to filter the status, type, and priority, and click
to sort the CPU (ms) and Elapsed (s) parameters. You can also click
to set the parameters displayed in the table header or click View to view the monitor details of a thread.
- Click the Stack Distribution tab on the Thread Dump tab page.
You can click a thread dump record on the left to view the thread stack distribution details. See Figure 3.
- Click Show or Hide to display all or part of the stack information.
- In the table header, you can click
to search for stack information, click
to filter stack information by status, and click
to sort stack information.
- Click the Monitor Status Distribution tab on the Thread Dump tab page.
You can click a thread dump record on the left to view the corresponding monitor status analysis details. See Figure 4.
You can select All, WAITING, or LOCKED from the Group drop-down box. You can also select Monitor ID, Monitor Class Name, Thread, or Monitor ID/Monitor Class Name from the Search drop-down box and enter monitor class names or monitor IDs in the text box. Use commas (,) to separate multiple monitor class names or monitor IDs.
- Click the Lock Analysis tab on the Thread Dump tab page.Click a thread dump record on the left to view the lock analysis diagram. See Figure 5.
- In the lock analysis diagram, threads are displayed on the left marked in various colors, each color indicating a state (green as RUNNABLE, red as BLOCKED, yellow as WAITING, and orange as TIMED_WAITING). Lock instances are displayed on the right.
- The lock analysis diagram uses lines to show the lock occupation by threads. A solid line indicates that the lock is used by the thread, and a dashed line indicates that the thread is blocked on the lock instance and waits for other threads to release the lock.
- Observation: After enabling this mode, you can select required locks to highlight the locks and corresponding threads. You can also switch to the Thread dimension using the filter box and select required threads to highlight the threads and their locks.
- Comparison: After enabling this mode, you can select the thread dumps to be compared. By default, the comparison results of the two threads and their locks are displayed from the Lock dimension. By using the comparison mode and the observation mode together, you can better observe the status change of threads and locks at two time points. You can also switch to the Thread dimension using the filter box to observe the status change of a lock and its requesting threads at two time points. The comparison mode can be enabled only after two or more thread dumps are performed.
- Deadlocks can be detected in the target Java application. You can locate the cause of a deadlock based on the thread dump.
- In the lower right corner, you can zoom in or zoom out the lock analysis diagram and view it in full screen.
- Click the Lock Analysis tab on the Raw Data tab page.You can click a thread name to view the event information about the thread. See Figure 6.





