# advanced-settings

Content of the MCP resource `jprofiler://config/session` of the JProfiler MCP server, see the [tool and resource reference](../tools.md) for the full list of tools and resources.

# Advanced profiling settings

Reference for the `advanced` key of `recordingConfig` in the `prepare_profiling` and
`attach` tools.

These keys map to attributes of the session configuration and are applied as given. The
applied settings are reported as `sessionSettings` in `check_status`. Settings whose values are
equal to the default do not show up there.

- `samplingNoFilters` (boolean, default `false`): When true and `methodCallRecordingType=sampling`, samples ignore call-tree filters and record all classes.
- `lineNumbers` (boolean, default `false`): Record line numbers in the call tree. Increases instrumentation overhead.
- `samplingFrequency` (int, default `5`): Sampling interval in milliseconds for `methodCallRecordingType=sampling`/`async`.
- `recordArrayAlloc` (boolean, default `true`): Record array allocations. Default true.
- `instrumentNativeMethods` (boolean, default `true`): Instrument native methods so they appear in the call tree.
- `allocationSamplingInterval` (int, default `1024`): Sample allocations roughly every N bytes. Larger intervals reduce overhead but lose accuracy. 0 requests the maximum sampling rate without guaranteeing that every allocation is captured.
- `allocTreeRecordingType` (enum, default `live`): Allocation tree recording mode. Controls whether garbage-collected objects and per-class detail are retained.
  - `live`: Live objects only; the liveness selector is restricted in allocation views.
  - `liveAndGcNoClassResolution`: Live and GCed objects, cumulative across classes/array types. Lower memory overhead than full mode.
  - `liveAndGc`: Live and GCed objects with full class resolution. Highest performance and memory cost.
- `payloadCap` (int, default `50`): Maximum number of distinct payloads annotated per call stack in the call tree. Excess payloads are merged into an [earlier calls] node.
- `descriptorCap` (int, default `8192`): Maximum length of a recorded payload string in characters, longer payloads are truncated.
- `hotspotPayloadCap` (int, default `16384`): Maximum number of distinct payloads in the probe hot spots views. When the cap is exceeded, the oldest payloads are merged into an [earlier calls] node.
- `probeFileMBCap` (int, default `1024`): Maximum size in MB of the temporary file to which probe events are streamed. When the cap is exceeded, older events are discarded.
- `retainStackForHotspotConsolidation` (boolean, default `false`): When true, payloads beyond `hotspotPayloadCap` are consolidated per call stack and keep their back traces, at considerable memory cost. When false, consolidated payloads are merged into a single [earlier calls] node without call stacks.
- `utilConcurrentHandling` (boolean, default `true`): When true, monitor recording also covers locks from the java.util.concurrent.locks package.
- `libraryDebugParameters` (string, default ``): Extra debug flags appended to the agent's library parameters. Diagnostic use only; leave empty unless instructed by support.
- `splittingCap` (int, default `128`): Maximum number of distinct splits per split method.
- `exceptionalCap` (int, default `5`): Maximum number of exceptional method invocations recorded per method.
- `exceptionalTimeType` (enum, default `all`): Thread state whose time is used to measure exceptional invocations and outlier coefficients.
  - `all`: All thread states (wall clock time).
  - `running`: Running state only (CPU time).
  - `waiting`: Waiting state only.
  - `blocking`: Blocking on a monitor only.
  - `netio`: Network I/O only.
- `samplingPayloadCallStacks` (boolean, default `true`): When true, exact call stacks of payload-producing calls are recorded even when `methodCallRecordingType` is `sampling`, providing back traces in the probe hot spots views. Disable to reduce overhead.
- `exactSamplingMonitorCallStacks` (boolean, default `false`): When true, exact call stacks of blocking and waiting threads are recorded when `methodCallRecordingType` is `sampling`. Adds substantial overhead.
- `annotateCustomPayloads` (boolean, default `false`): When true, payloads of custom probes are annotated into the call tree.
- `internalExcludes` (boolean, default `true`): When true, JProfiler's internal classes are added to the default exclude filters automatically.
- `sampleUnmountedVirtualThreads` (boolean, default `false`): When true, sampling also captures unmounted virtual threads, making blocking states of virtual threads visible in CPU data. Adds substantial overhead and can attribute blocking time to the Runnable state.
- `asyncThreadResolution` (boolean, default `true`): When true, async sampling resolves samples to individual threads. Disable to reduce the memory overhead of the per-thread sampling buffers when profiling applications with many threads.
- `asyncNativeSampling` (boolean, default `false`): When true and `methodCallRecordingType=async`, native libraries are sampled as well and native nodes appear below the Java nodes in the call tree.
- `asyncBufferPercentage` (int, default `100`): Relative size in percent of the per-thread async sampling buffers, 100 uses the heuristic default based on physical memory. Increase when samples are discarded because the buffers are too small.
