Locking History Graph

     


  The locking history graph visualizes the recorded locking situations in the JVM. Only recorded monitor events are shown.

Please see the common properties of monitor views for an explanation of the locking graph.

  There are two sets of events that you step through with the navigation buttons at the top of the view:
  • All events
    All monitor events that have been recorded. Next to the navigation buttons you see the current position and the total event count as well as the time of the currently shown event. If a time spam has been cumulated (see below), that time span as well as the number of events before and after the currently selected time span are shown.
  • Events of interest
    Monitor events that involve a thread or monitor that you have marked as being of interest to you. You can mark nodes as being of interest by selecting them and choosing Mark Node Of Interest from the context menu. Multiple nodes can be selecting by holding down the Shift key. Marked nodes are painted in a different color.

    Next to the navigation buttons you see the current position and the total event count involving nodes of interest or the number of events if an event of interest is currently shown. If the current event is not an event of interest, you see the number of events of interest before and after the current event.

    Events of interest do not necessarily have to contain a node of interest. For example, if a thread that has been marked as a node of interest releases a lock, the associated event does not contain that thread node anymore, but the event is still an event of interest.

    To change your selection of nodes of interest, simply select new nodes of interest or choose Remove mark from the context menu.

  The tool tips that appear when you hover of the arrows in the graph contain several navigation options:
  • Origin time
    For blocking and waiting relationships, the tool tip contains a hyperlink to the event where the arrow first appeared.
  • Monitor history
    To analyze the duration of an event, it can be useful to show it in the monitor history view. At the bottom of the tool tip, a corresponding hyperlink is available.
  At the bottom of the view, you see a timeline, where all recorded events are shown as blue lines. The currently shown event is surrounded with a green marker while events of interest are shown in red.

When you hover with the mouse over event lines, you can see the number of associated events in the status bar. When you click on an event line, the first event associated with that event line is shown in the graph. When a new event is selected with the navigation buttons or a hyperlink in the tool tip window, the timeline is scrolled so that the selected event is visible.

You can cumulate multiple events by clicking an dragging the mouse in the time line. The selected area will be shown with a green background and all events in the selected time span will be shown together in the graph. If you have marked nodes of interest, only the events of interest in the selection will be cumulated.

In a cumulated graph, each arrow can contain multiple events of the same type. In that case, the tool tip window shows the number of events as well as the total time of all contained events. A drop-down list in the tool tip window lets you switch between the stack traces of the different events and the navigation hyperlinks in the tool tip window refer to the currently selected event.

  The locking history time line has two different display modes. The display mode is a persistent view setting and is thus also accessible through the view settings dialog.
  • fixed scale
    If you are currently in the "scale to fit window" mode, you can switch to this mode by
    • choosing the scale mode selector button at the top of the graph.
    • choosing Scale to fit window from the context menu.
    • checking Scale to fit window in the view settings dialog.

    In this mode, the time axis can be scrolled with the scrollbar on the bottom which appears if the total extent of the axis does not fit into the current view size.

    You can adjust the scale of the time axis byzooming in or out.  Zooming in increases the level of detail while  zooming out decreases it. You change the zoom level by

    • using the zoom controls at the top of the view.
    • choosing Zoom in and Zoom out from the context menu.

  • scale to fit window
    If you are currently in the "fixed scale" mode, you can switch to this mode by
    • choosing the scale mode selector button in the lower right corner of the view.
    • choosing Continue at fixed scale from the context menu.
    • unchecking Scale to fit window in the view settings dialog.

    The time scale on the time axis is adjusted in order to show the total extent of the axis in the current size of the view. Zooming is not possible in this mode.

  Grid lines and background of the locking history time line can be configured in the view settings dialog.