Analyze Memory: Advanced Options

See Also

When profiling memory usage, you can create a custom configuration and set more advanced profiling options.

You set the advanced options by clicking Advanced Settings in the configuration pane for your custom configuration. Click Basic Settings to set the configuration options in the Basic Options pane.

The Advanced Settings pane enables you to set the following options:

Settings

Record Stack Trace for Allocations. This setting can be modified when you select Record Stack Traces for Allocation in the Basic Settings.

When recording object creation, the call stack at that moment is also recorded. By default, the full stack depth is recorded. You can limit the maximum depth of the recorded call stack by entering a positive integer (e.g. 3) to limit the number of frames from the top of the stack that are recorded. This can substantially reduce the profiling overhead.

For more about how the call stack is recorded, see the following NetBeans FAQ:

Run garbage collection when getting memory results. When selected, full garbage collection is invoked in the target JVM each time you choose Profile > Run GC from the main menu. This option may help you obtain a more realistic picture of object liveness, but it also increases overhead. Running GC may help you to obtain a more realistic picture of object liveness because dead objects will be garbage collected and thus not reported as live. Use caution when selecting this option because full GC may be expensive, especially for large applications (where it may take from several to several tens of seconds).

Threads

Enable Threads Monitoring. When selected, application threads are monitored from application startup. When deselected (default), thread monitoring does not begin until you click the Threads button in the Threads window.

Global Settings

Override Global Settings When selected, you can override the global settings and specify the following options when profiling the application:

See Also
Analyze Memory: Basic Options
Analyzing Application Memory Usage
Profiling a Project or Class
Setting Profiling Points

Legal Notices