![]() Previous |
![]() Next |
The Event Graph is a linear chart that depicts all of the running threads used during the period specified on the Range Navigator. In addition, you can show thread transitions on this graph. You can also add individual threads to the operative set and show events that occur during garbage collection. This topic includes the following sections:
When you create a thread, it can be associated with a thread group; for example, the Main thread group, the Pooled Threads group, and the Thread group for the Queue. Usually, when you open the Graph tab, the Event Graph shows only the thread groups but not the individual threads, as shown here:
To see the individual threads, click the plus sign (+) next to the thread group name:
To hide the individual threads, click the minus sign (-) next to the thread group name.
The Event Graph uses color-coding to show the events that occur on the threads; for example, on the chart, each thread is depicted as a wide horizontal line, often multi-colored with a label on its far right side, as shown here:
Each colored section of the line represents a different event, the type of which based on the color chip associated with the event in the Event Type Browser. For example, in this thread:
The green segments represent the Java application.
The yellow segments identify a Java Wait event.
The blue segments identify a Socket Read event.
Thus, during the period of run time depicted by this example, on this single thread, a Java Wait event occurred five times and a single socket read event occurred.
To see more details about a specific event, place your pointer over that event (indicated by a colored segment on the line depicting the thread) to display a Tooltip describing it. Although the event information shown depends on the specific event, the Tooltip generally shows such information as the event's start and end time, its duration, the ID of the thread on which it occurred, the memory address where the event occurred, and a stacktrace of method calls leading up to the event, along with attributes specific to that event (for example, the Tooltip for a Thread Parked event might also identify the class on which the thread is parked and the thread that unparked the thread).
The label on the right of each thread identifies and describes the thread. Some labels are too long to fit easily on the graph and are truncated. To see the entire label, position your pointer over the label to display a tooltip. In addition to the thread name, the Tooltip also shows the following information:
Thread's Start and end time and date
How long the thread ran (Duration)
Thread ID
You can change the truncated label format by using this procedure:
To select a label format:
Position your pointer anywhere over the graph and right-click.
A two-command context menu appears.
Highlight Label Format.
A context sub-menu appears, showing the available formats.
Select the label format you want to use.
Note: You can also display the full text of the label by zooming-in to the graph, as explained in Zooming into Threads on the Event Graph. |
You can customize the Event Graph by using the context menu to do the following:
Change the sort order of each column. See Changing the Sort Order of a Table Column.
Select which data to show by selecting from a list of available columns. See Selecting Columns to Show on a Table.
Copy selected threads for pasting elsewhere, for example in a text editor, and configure how that data is to be stored on your clipboard. See Copying Data to the Clipboard.
Add and remove threads to and from the operative set. See Using the Event Graph with the Operative Set.
On the Event Graph, you can add or remove specific threads from the operative set to compare just the events that occur on those threads. This functionality, accessible from the Operative Set context sub-menu is similar to that available on other Flight Recorder tabs.
To show just threads in the operative set on the Event Graph:
You can display on the Event Graph just those threads in the operative set by selecting Show Only Operative Set, at the top right of the graph. When you select this checkbox, only those threads you have added to the operative set will appear on the Event Graph.
While the Event Graph does not show specific threads associated with garbage collection, you can see events that occur during garbage collection. By default, when you open the Graph tab, only the thread groups appear on the Events Graph. To see events that occurred during garbage collection, select Show GC. A new line appears at the top of the graph, labeled Garbage Collection:
If you application has a large number of threads or events occurring, the Event Graph might get very complex and hard to read. You can zoom-in to the graph by using the slider in the bottom right corner of the Event Graph:
To zoom in or out of to the Event Graph, use your pointer over to move the slider handle up (zoom in) or down (zoom out). The lines representing the threads will either widen, when you zoom in, or shrink, when you zoom out. You will also see that the thread labels will no longer be truncated.
You can copy threads to the clipboard for pasting into other applications. You can also configure the copy to make it easier to read or to limit the amount of information copied.
To configure and copy threads to the clipboard, use this procedure:
Select the thread you want to copy. If you want to select a group of threads, do one of the following:
To select a group of contiguous threads, right click the first thread you want to select, hold down the Shift key, and click the last threads you want to select.
To select non-contiguous threads, hold down the Ctrl key and right-click each thread you want to include.
Right-click anywhere on a table to open the context menu. and select Clipboard Settings. This opens a subsequent sub-menu that lists the configuration options.
Select the options you want to use, as described in Table 6–33.
Clipboard Settings Menu Selections
To... | Select... |
---|---|
Copy data without formatting |
Copy Raw |
Copy just the data visible on the tab |
Copy Visible |
Copy selected data and ensure structural integrity |
Indent for Structure |
To ensure that the column headers are copied without the need to select them |
Copy Column Headers |
Repeat steps 2 and 3 for each configuration option you want to use.
Right-click anywhere on a table to open the context menu. and select Copy.