# Options Window: Java: Profiler

Use to configure settings that effect the behavior of the IDE when profiling applications. Choose Tools > Options from the main menu, click the Java category and then click the Profiler tab to access this panel.

Element | Description
--- | ---
General | General profiling options.
Profiler Window | Profiler window specific options.
Show "No data collected yet" hint before first profiling session | Select to show the hint before the first profiling session in the profiling window.
Profiling | Profiling session specific options.
Profiling port | Changes the communication port that the profiler listens to. The default port is 5140.
Manage calibration data | Click to display a dialog to calibrate the IDE with a specific Java platform.
Miscellaneous | Other profiling options.
Reset all "Do not show again" confirmations | Click to reset all remembered not to show decisions.
Filters | Filters profiling options.
Filters | Filters specific options.
Use defined filters for coloring results | Select to enable coloring profiling results based on user-defined filters.
Defined Filters | Defined filters specific options.
Add new filter | Click to add a filter.
Edit selected filter | Click to edit the name and value of the selected filter.
Delete selected filter | Click to remove the selected filter.
Move selected filter up | Click to place the selected filter in the desired order.
Move selected filter down | Click to place the selected filter in the desired order.
Snapshots | Snapshots profiling options.
Snapshots | Options available when a snapshot is taken during the profiling session.
When taking snapshot | Specifies the way a snapshot is viewed and/or saved after it is taken.
When taking heap dump | Specifies the way a snapshot is saved and eventually displayed in heap viewer.
On OOME heap dump | Specifies the way a snapshot is saved and eventually displayed in heap viewer when an OutOfMemoryError occurs.
Snapshots Window | Snapshot window specific options. Choose the option from the drop down list.
Open automatically | Choose when to display the snapshots window by selecting one of the following options: Never, On new profiling session, On show profiler window, On first saved snapshot, On each saved snapshot.
Close automatically | Choose when to close the snapshots window by selecting one of the following options: Never, On close profiling session, On hide profiler window.
Engine | Engine profiling options.
Methods Profiling | Methods specific profiling options.
General (Sampled) | Use to query stacks of running threads to estimate the slowest parts of the code.
Sampling frequency | Specify how often the application is sampled. The default value is 10 milliseconds.
Focused (Instrumented) | Use to instrument and profile a limited subset of an application code.
Methods tracking | Injects a "method entry" call at the beginning of each profiled method and a "method exit" call before each return when tracking methods.
Exact call tree and timing | Select to calculate the time spent in the method as the difference between the timestamp that is generated for each "method entry" and corresponding "method exit".
Exact call tree, sampled timing | Select to calculate the time spent in the method as the difference between the timestamp that is generated for the "method entry" and corresponding "method exit" that fall approximately at the end of each sampling interval. You must specify a sampling interval. For more about which option to choose, see the following NetBeans FAQ: `Which method of tracking methods should I use, exact or sampled?`
Exclude time spent in Thread.sleep() and Object.wait() | Select to omit profiling the Thread.sleep() and Object.wait() methods.
Profile new Threads/Runnables | Select to instrument the code for any thread or runnable started after the application enters the root instrumentation method.
Limit number of profiled threads | When selected, every time a thread that has not been previously registered enters the instrumented code, this counter is decremented. When it reaches zero, registration of new threads is stopped. Profiling data is collected only for the registered threads. For more about when to use these option, see the following NetBeans FAQ: `How can I profile all threads in a multi-threaded application?`
Instrumentation Scheme | Use to select an instrumentation scheme to limit the number of instrumented methods. (Usually, it is best if the number of instrumented methods and the number of methods actually called by the application when it is profiled are the same or very close.) For more about instrumentation schemes, see the following NetBeans FAQ: `How do I select an instrumentation scheme?`
Instrument | Instruments `Method.invoke()`, `Getter/setter` methods, and empty methods. By default, these types of methods are not instrumented. For more about instrumenting these methods, see the following NetBeans FAQ: `How do I instrument/not instrument special Java methods?`
Method.invoke() | Select to follow and instrument all calls done using Java Reflection (i.e. the java.lang.reflect.Method.invoke() call).
Getter/setter methods | Select to instrument getter/setter methods.
Empty methods | Select to instrument methods which do not contain any executable code.
Objects Profiling | Objects specific profiling options.
Run garbage collection when getting memory results | Use to enable running garbage collection after collecting profiling data.
Threads Profiling | Threads specific profiling options.
Sample threads states | When selected, thread states are updated periodically.

Related Topics

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Copyright © 2016, Oracle and/or its affiliates. All rights reserved.