mirror of
https://github.com/DataDog/go-profiler-notes.git
synced 2026-06-20 16:45:26 +08:00
Fix language around memory profile rate (#10)
This commit is contained in:
parent
f2682bee0d
commit
9d285548b7
1 changed files with 1 additions and 1 deletions
|
|
@ -339,7 +339,7 @@ The `free_*` counters themselves are not included in the final memory profile. I
|
|||
|
||||
There are a few known issues and limitations of the memory profiler that you might want to be aware of:
|
||||
|
||||
- ⚠️ [`runtime.MemProfileRate`](https://pkg.go.dev/runtime#MemProfileRate) must be should only be modified once as early as possible in the startup of the program, for example at the beginning of `main()`. Writing this value is inherently a small data race, and changing it multiple times during program execution will produce incorrect profiles.
|
||||
- ⚠️ [`runtime.MemProfileRate`](https://pkg.go.dev/runtime#MemProfileRate) must only be modified once, as early as possible in the startup of the program; for example, at the beginning of `main()`. Writing this value is inherently a small data race, and changing it multiple times during program execution will produce incorrect profiles.
|
||||
- ⚠ When debugging potential memory leaks, the memory profiler can show you where those allocations were created, but it can't show you which references are keeping them alive. A few attempts to solve this problem were made over the years, but none of them work with recent versions of Go. If you know about a working tool, please [let me know](https://github.com/DataDog/go-profiler-notes/issues).
|
||||
- ⚠ [CPU Profiler Labels](#cpu-profiler-labels) or similar are not supported by the memory profiler. It's difficult to add this feature to the current implementation as it could create a memory leak in the internal hash map that holds the memory profiling data.
|
||||
- ⚠ Allocations made by cgo C code don't show up in the memory profile.
|
||||
|
|
|
|||
Loading…
Reference in a new issue