1
0
mirror of https://github.com/golang/go synced 2024-11-15 02:20:32 -07:00
go/doc/next
Felix Geisendörfer 1b9dc3e178 runtime: increase profiling stack depth to 128
The current stack depth limit for alloc, mutex, block, threadcreate and
goroutine profiles of 32 frequently leads to truncated stack traces in
production applications. Increase the limit to 128 which is the same
size used by the execution tracer.

Create internal/profilerecord to define variants of the runtime's
StackRecord, MemProfileRecord and BlockProfileRecord types that can hold
arbitrarily big stack traces. Implement internal profiling APIs based on
these new types and use them for creating protobuf profiles and to act
as shims for the public profiling APIs using the old types.

This will lead to an increase in memory usage for applications that
use the impacted profile types and have stack traces exceeding the
current limit of 32. Those applications will also experience a slight
increase in CPU usage, but this will hopefully soon be mitigated via CL
540476 and 533258 which introduce frame pointer unwinding for the
relevant profile types.

For #43669.

Change-Id: Ie53762e65d0f6295f5d4c7d3c87172d5a052164e
Reviewed-on: https://go-review.googlesource.com/c/go/+/572396
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
2024-05-21 14:38:45 +00:00
..
6-stdlib runtime: increase profiling stack depth to 128 2024-05-21 14:38:45 +00:00
1-intro.md
2-language.md
3-tools.md cmd/go: add -changed to query for non-defaults in the env 2024-05-16 14:34:32 +00:00
4-runtime.md runtime: properly frame panic values in tracebacks 2024-05-08 19:10:41 +00:00
5-toolchain.md doc: add release notes for hot block alignment 2024-05-20 20:23:04 +00:00
7-ports.md misc/wasm: drop wasmtime < 14 support 2024-04-11 17:09:10 +00:00