ProfilerThreads

Profiling Threads

This page describes the Threads profiling mode.

File:threads.png

When running in Threads mode (see First Profiling Session for details on starting a profiling session) the profiler tracks all threads of the profiled process and their states. The profiling session is started by simply clicking the Profile or Attach button in toolbar. The other toolbar buttons are described in the Toolbar Buttons section.

Toolbar Buttons

  • Show threads filter controls which threads will be displayed in the results table: All threads, Live threads, Finished threads and Selected threads. Threads to be displayed in the Selected threads mode can be selected either by the Select thread action in context menu or by selecting a checkbox in the Selected column (hidden by default).
  • Timeline actions Zoom in and Zoom out enable manual control of the actual scale of the threads timeline, Scale to fit switch automatically scales the timeline to display all data.
  • Take thread dump action takes snapshot of all threads in the profiled JVM including their call stacks and displays it in a separate view. See the Thread Dump chapter for details.
  • Take heap dump action saves a snapshot of all objects currently stored in the heap memory in a .hprof format and optionally opens it in a heap viewer. See the Heap Dump chapter for details.
  • Request garbage collection action requests garbage collection in the profiled JVM. There's no guarantee when or if at all the garbage collection will be performed. To make sure GC will be run, the action should be invoked several times.

Threads View

The results view displays threads of the profiled process and their states in a graphical timeline and a summary information of time spent in each state. The view provides the following data columns:

  • Name column shows name of the thread.
  • Timeline column shows a graphical timeline of threads states.
  • Running column shows a cumulative time of how long the thread has been in Running state.
  • Sleeping column shows a cumulative time of how long the thread has been in Sleeping state.
  • Wait column shows a cumulative time of how long the thread has been in Wait state.
  • Park column shows a cumulative time of how long the thread has been in Park state.
  • Monitor column shows a cumulative time of how long the thread has been in Monitor state.
  • Total column shows the total time of how long the thread has been alive.

Tip: The columns can be displayed or hidden using the right corner button in the view header by clicking the dropdown arrow (or right clicking the header on Mac OS X). The relative value bar can be displayed or hidden for every column which displays a relative value by resizing the column.

Searching And Filtering Results

A thread can be found in results using the Find stripe which opens by invoking the Find action in results context menu or IDE Edit menu or using the Ctrl+F keyboard shortcut. Values of the Name column are searched for the entered substring, optionally matching case if selected. Once a search has been performed, it can be repeated using the F3 or Shift+F3 shortcuts.

Displayed threads can be filtered using the Filter stripe which opens by invoking the Filter action in results context menu or using the Ctrl+G keyboard shortcut. Values of the Name column are filtered by the entered substring depending on the selected filter mode (Contains, Does Not Contain, Regular Expression), optionally matching case if selected.


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo