Skip to content

Commit 67c3745

Browse files
committed
Improve Go profiler Heap Live Size documentation
1 parent 054eccf commit 67c3745

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CLAUDE.local.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- To format links, run: `./local/bin/py/build/actions/format_link.py`

content/en/profiler/profile_types.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ Allocated Memory
123123
: The amount of heap memory allocated by each function during the profiling period (default: 60s), including allocations which were subsequently freed. Go calls this `alloc_space`. Stack allocations are not tracked. This is useful for investigating garbage collection load. See also the note about how this measure changes in version `1.33.0` in [Delta profiles](#delta-profiles).
124124

125125
Heap Live Objects
126-
: The number of objects allocated by each function in heap memory that have not yet been garbage collected. Go calls this `inuse_objects`. This is useful for investigating the overall memory usage of your service and identifying potential memory leaks.
126+
: The number of objects allocated by each function in heap memory that remain in use after garbage collection. Go calls this `inuse_objects`. This is useful for investigating the overall memory usage of your service and identifying potential memory leaks.
127127

128128
Heap Live Size
129-
: The amount of heap memory allocated by each function that has not yet been garbage collected. Go calls this `inuse_space`. This is useful for investigating the overall memory usage of your service and [identifying potential memory leaks][4].
129+
: The amount of heap memory allocated by each function that remains in use after garbage collection. Under default settings (GOGC=100), this will be ~50% of the RSS usage of the process. Go calls this `inuse_space`. This is useful for investigating the overall memory usage of your service and [identifying potential memory leaks][4]. See [Go memory metrics demystified][5] and [A Guide to the Go Garbage Collector][6] for more information.
130130

131131
Mutex
132132
: The time functions have been waiting on mutexes during the profiling period (default: 60s). The stack traces in this profile point the `Unlock()` operation that allowed another goroutine blocked on the mutex to proceed. Short mutex contentions using spinlocks are not captured by this profile, but can be seen in the CPU profile. See also the note about how this measure changes in version `1.33.0` in [Delta profiles](#delta-profiles).
@@ -145,6 +145,8 @@ Goroutines
145145
[2]: https://github.com/DataDog/go-profiler-notes/blob/main/goroutine.md
146146
[3]: /profiler/enabling/go#requirements
147147
[4]: /profiler/guide/solve-memory-leaks
148+
[5]: https://www.datadoghq.com/blog/go-memory-metrics/
149+
[6]: https://go.dev/doc/gc-guide
148150
{{< /programming-lang >}}
149151
{{< programming-lang lang="ruby" >}}
150152

@@ -230,7 +232,7 @@ Garbage Collector CPU consumption (v3.19+)
230232
: The time garbage collector's threads spent running on the CPU.<br />
231233
_Requires: .NET Framework (with Datadog Agent 7.51+ and v3.2+) / .NET 5+_
232234

233-
**Note**: Before .NET 10, **Allocations** and **Live Heap** profiling might show bigger objects more than smaller ones due to the sampling algorithm used by the .NET runtime. Datadog recommends using .NET 10+ for more statistically correct results.
235+
**Note**: Before .NET 10, **Allocations** and **Live Heap** profiling might show bigger objects more than smaller ones due to the sampling algorithm used by the .NET runtime. Datadog recommends using .NET 10+ for more statistically correct results.
234236

235237

236238
[1]: /profiler/enabling/dotnet/#requirements

0 commit comments

Comments
 (0)