You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(profiler): mark Java live heap profiling as GA (#35802)
* docs(profiler): mark Java live heap profiling as GA
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs(profiler): fix live heap profiling config key docs
- DD_PROFILING_HEAP_ENABLED is the master toggle (gates both ddprof and JFR fallback), not a legacy key
- DD_PROFILING_DDPROF_LIVEHEAP_ENABLED is ddprof-specific override only
- Split disable instructions into two cases: all vs ddprof-only
- Add DD_PROFILING_HEAP_ENABLED to config reference table
Rationale: source code in dd-trace-java confirms DD_PROFILING_HEAP_ENABLED gates both engines; previous docs had the relationship backwards
* Update content/en/profiler/profiler_troubleshooting/java.md
Co-authored-by: Bryce Eadie <bryce.eadie@datadoghq.com>
* Update content/en/profiler/profiler_troubleshooting/java.md
Co-authored-by: Bryce Eadie <bryce.eadie@datadoghq.com>
* Update content/en/profiler/profiler_troubleshooting/java.md
Co-authored-by: Bryce Eadie <bryce.eadie@datadoghq.com>
* Update content/en/profiler/profile_types.md
Co-authored-by: Bryce Eadie <bryce.eadie@datadoghq.com>
* Fix formatting
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Bryce Eadie <bryce.eadie@datadoghq.com>
Copy file name to clipboardExpand all lines: content/en/profiler/profile_types.md
+3-7Lines changed: 3 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,13 +32,9 @@ Allocated Memory
32
32
: The amount of heap memory allocated by each method, including allocations which were subsequently freed.<br />
33
33
_Requires: Java 11_
34
34
35
-
Heap Live Objects (in Preview, 1.17.0+)
36
-
: The number of objects allocated by each method in heap memory that have not yet been garbage collected. This is useful for investigating the overall memory usage of your service and identifying potential memory leaks.<br />
37
-
_Requires: Java 11_ <br />
38
-
39
-
Heap Live Size (in Preview, 1.39.0+)
40
-
: The amount of heap memory allocated by each method that has not yet been garbage collected. This is useful for investigating the overall memory usage of your service and identifying potential memory leaks.<br />
41
-
_Requires: Java 11.0.23+, 17.0.11+, 21.0.3+ or 22+_ <br />
35
+
Live Heap (v1.61.0+)
36
+
: The objects and memory allocated by each method that have not yet been garbage collected. This is useful for investigating the overall memory usage of your service and identifying potential memory leaks. The profiler automatically uses the most accurate engine available for your JVM version.<br />
37
+
_Requires: Java 11+_
42
38
43
39
Wall Time in Native Code
44
40
: The elapsed time spent by each method. Elapsed time includes time when code is running on CPU, waiting for I/O, and anything else that happens while the method is running.
Live Heap Profiling is a Datadog profiler feature that helps identify memory leaks and understand heap usage by tracking which allocated objects survive garbage collection. Unlike standard allocation profiling (which shows what was allocated), live heap profiling shows what is still alive on the heap — making it more useful for diagnosing memory leaks.
83
+
Live heap profiling tracks which allocated objects survive garbage collection, making it useful for diagnosing memory leaks and understanding overall heap usage. Starting with dd-trace-java **v1.61.0**, it is **enabled by default**on Linux. The profiler automatically selects the most accurate engine available for your JVM version.
84
84
85
-
The live-heap profiler engine:
85
+
The live-heap profiler:
86
86
- Useful for investigating the overall memory usage of your service and identifying potential memory leaks
87
-
- Samples allocations and keeps track of whether those samples survived the most recent garbage collection cycle
88
-
- Uses the number of surviving samples to estimate the number of live objects in the heap
89
-
- Limits the number of tracked samples to avoid unbounded growth of the profiler's memory usage
90
-
- Disabled by default
87
+
- Samples allocations and tracks whether those samples survived the most recent garbage collection cycle
88
+
- Automatically uses the Datadog profiler engine on JDK 11.0.23+, 17.0.11+, 21.0.3+, or 22+, and falls back to the JFR engine (`jdk.OldObjectSample`) on older supported JDK versions
91
89
- Not available on Windows
92
-
- For JMC users, the Datadog live-heap event is `datadog.HeapLiveObject`
90
+
- For JMC users, the Datadog live-heap event is `datadog.HeapLiveObject`; the JFR fallback emits `jdk.OldObjectSample`
93
91
94
-
| Configuration | Environment Variable | System Property |
|**Enable** (Requires JDK 11.0.23+, 17.0.11+, 21.0.3+, or 22+) |`DD_PROFILING_DDPROF_LIVEHEAP_ENABLED=true`|`-Ddd.profiling.ddprof.liveheap.enabled=true`|
97
-
98
-
**Note**: The live-heap engine does not depend on the `/proc/sys/kernel/perf_event_paranoid` setting.
99
-
100
-
101
-
### Heap profiling
102
-
103
-
Heap profiling uses the JVM's built-in `jdk.OldObjectSample` JFR event to track objects that have been live in the heap for a sustained period of time. This helps identify potential memory leaks by showing which objects are accumulating over time. Unlike live heap profiling (which uses the Datadog profiler engine), heap profiling relies on JFR and is available on all platforms where JFR is supported.
104
-
105
-
<divclass="alert alert-info">This feature requires at least Java 11.0.12, 15.0.4, 16.0.2, 17.0.3 or 18 and newer</div>
106
-
107
-
To enable the heap profiler, start your application with one of the following:
92
+
To disable live heap profiling entirely (both Datadog engine and JFR fallback):
@@ -142,13 +127,18 @@ The [Trace to Profiling integration][3] identifies code hotspots in slow traces.
142
127
143
128
The following settings allow fine-grained control over the profiler engines. These are typically not needed for standard use cases. For detailed information about each profiler type, see the corresponding sections above: [CPU profiling](#cpu-profiling), [Wallclock](#wallclock), [Allocation profiling](#allocation-profiling), and [Live heap profiling](#live-heap-profiling).
144
129
130
+
**Note**:
131
+
-`DD_PROFILING_HEAP_ENABLED` controls all live heap profiling. Setting it to `false` disables both the Datadog native engine and the JFR `jdk.OldObjectSample` fallback.
132
+
-`DD_PROFILING_DDPROF_LIVEHEAP_ENABLED` only controls the Datadog native engine. The JFR fallback is unaffected by this setting.
133
+
145
134
| Environment variable | System property | Description |
|`DD_PROFILING_HEAP_ENABLED`|`-Ddd.profiling.heap.enabled`| Main toggle for all live heap profiling, including both the Datadog native engine and the JFR `jdk.OldObjectSample` fallback (default: true on supported platforms since v1.61.0) |
147
137
|`DD_PROFILING_DDPROF_ENABLED`|`-Ddd.profiling.ddprof.enabled`| Enable the Datadog profiler engine (Linux only, default: true since v1.7.0) |
148
138
|`DD_PROFILING_DDPROF_CPU_ENABLED`|`-Ddd.profiling.ddprof.cpu.enabled`| Enable CPU profiling with the Datadog engine |
149
139
|`DD_PROFILING_DDPROF_WALL_ENABLED`|`-Ddd.profiling.ddprof.wall.enabled`| Enable wallclock profiling (default: true since v1.7.0) |
150
140
|`DD_PROFILING_DDPROF_ALLOC_ENABLED`|`-Ddd.profiling.ddprof.alloc.enabled`| Enable allocation profiling with the Datadog engine |
151
-
|`DD_PROFILING_DDPROF_LIVEHEAP_ENABLED`|`-Ddd.profiling.ddprof.liveheap.enabled`|Enable live heap profiling (requires JDK 11.0.23+, 17.0.11+, 21.0.3+, or 22+) |
141
+
|`DD_PROFILING_DDPROF_LIVEHEAP_ENABLED`|`-Ddd.profiling.ddprof.liveheap.enabled`|Override for the Datadog native engine live heap implementation only; does not affect the JFR fallback (default: enabled on supported JDK versions (11.0.23+, 17.0.11+, 21.0.3+, or 22+), requires `DD_PROFILING_HEAP_ENABLED=true`) |
152
142
|`DD_PROFILING_ENABLED_EVENTS`|`-Ddd.profiling.enabled.events`| Enable specific JFR events (for example: `jdk.ObjectAllocationInNewTLAB,jdk.ObjectAllocationOutsideTLAB`) |
153
143
154
144
### JDK Mission Control (JMC) event reference
@@ -160,7 +150,7 @@ If you are analyzing profiles with JDK Mission Control, the following table prov
160
150
| CPU |`jdk.ExecutionSample`|`datadog.ExecutionSample`|
0 commit comments