Profiler - CPU Snapshot

Home > Profiling Results

CPU Snapshot

The CPU Snapshot captures data on method call chains, times and invocations when profiling CPU performance, either from the Analyze Performance Predefined task or when running a custom CPU profile. The CPU Snapshot is displayed in the Source Editor when you click Take Snapshot in the Profiler window or when you click Take Snapshot of Profiling Results in the toolbar of the Profiling Results tab.

The CPU snapshot contains the following tabs:

  • Call Tree

    The Call Tree tab displays the Calling Context Tree (CCT) showing the method call chain and the time/number of invocations for executing threads and methods in each context. (A context is a unique chain of method calls leading to the method's invocation.)

  • Hot Spots

    The Hot Spots tab shows the total execution time and number of invocations for each method, irrespective of the context.

  • Combined

    The Combined tab displays the CCT information appears in the upper half of the window and the Hot Spot data in the lower half.

  • Info

    The Info tab displays data on when the snapshot was taken, where it is saved, and the profile settings used.

Reverse Call Graph

Snapshot toolbar

The controls in the snapshot toolbar enable you to control the coarseness of the view of the results and to save and export the snapshot files.

  • Save Snapshot to Project

    Click this button to save the snapshot to your project. The snapshot is saved to the profiler directory in nbproject > private directory in your project. Once saved, the snapshot files are visible in the Snapshots section of the Profiler window.

  • Save Snapshot to Custom File

    Click this button to open a save dialog box to save the snapshot file in a location other than to your project.

  • Method/Class/Package combo box.

    This combo box changes the coarseness of the presentation of the results. In the class level view, results for all methods of the same class are aggregated in a single entry. In the package level view, all methods of classes that belong to the same package are aggregated. This view may be especially useful if the number of profiled methods very is high and you need to get a rough idea of which piece of code contributes most to your application's execution time.

Working inside the results

You can right-click any profiling result to access the following commands:

  • Go To Source.

    For the current method, Profiler loads the source .java file and scrolls to this method's location in the code.

  • Show Back Traces.

    For the current method and thread, Profiler identifies all the call paths that contain this method and presents them all in the form of a reverse CCT. This is useful if you want to find all the callers for a given method. The reverse call tree appears in a new tab in the Profiling Results tab.

  • Add to Instrumentation Roots.

    Adds the current method to the list of roots for partial application profiling. This command is only available when the method view is selected in the combo box.

See also


Project Features

About this Project

Profiler was started in November 2009, is owned by Tomas Hurka, and has 62 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20160708.bf2ac18). © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
Please Confirm