Analyze Memory: Advanced Options

Use to create a custom configuration and set more advanced profiling options.

Element Description

Settings

Settings options.

Track every X allocations

Sets the interval /proportion for stack sampling. For example, if set to 10, this means that for each class only every 10th object allocation is recorded completely. (This only applies to stack sampling and tracking the object. The total number of object allocations is recorded separately, and includes all allocations.)

To record all information for each object, set this number to 1. However, doing this could substantially affect the profiling overhead when profiling allocation-intensive applications.

For server-side applications under real-life workload conditions, setting this number to 20 or more should be sufficient to minimize the overhead, and still obtain sufficient information for practical purposes

Record Stack Trace for Allocations

Records the call stack at the moment object creation is recorded. By default, the full stack depth is recorded.

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

You can limit the maximum depth of the recorded call stack by entering a positive integer (for example, 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

Invokes full garbage collection in the target JVM each time you choose Profile > Run GC from the main menu.

This option might help you obtain a more realistic picture of object liveness, but it also increases overhead. Running garbage collection might help you to obtain a more realistic picture of object liveness because dead objects are garbage collected and thus not reported as live.

Use caution when selecting this option because full GC can be expensive, especially for large applications (where it might take several seconds).

Threads

Thread options.

Enable Threads Monitoring

Monitors application threads from application startup.

When deselected (default), thread monitoring does not begin until you click Threads in the Threads window.

Sample Threads States

When selected, thread states are updated periodically.

This option is selected by default.

Enable Lock Contention Monitoring

When selected, application threads are monitored for lock contentions.


The Overhead bar graph provides you with a rough indication of the overhead that is incurred when you profile the application with the current settings.


Related Topics

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

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