diff options
| author | Felix Geisendörfer <felix.geisendoerfer@datadoghq.com> | 2024-03-29 19:59:47 +0100 |
|---|---|---|
| committer | Michael Pratt <mpratt@google.com> | 2024-05-08 17:48:38 +0000 |
| commit | 2141315251da47745c8f649c01e598a19bd68897 (patch) | |
| tree | b6e34cc8dff2cd039e2d6e2fb14f5275e88fce39 /src/runtime/malloc.go | |
| parent | c3bd543cc304b405b00263e2d4e683f9b65214ec (diff) | |
| download | go-2141315251da47745c8f649c01e598a19bd68897.tar.xz | |
runtime: move profiling pc buffers to m
Move profiling pc buffers from being stack allocated to an m field.
This is motivated by the next patch, which will increase the default
stack depth to 128, which might lead to undesirable stack growth for
goroutines that produce profiling events.
Additionally, this change paves the way to make the stack depth
configurable via GODEBUG.
Change-Id: Ifa407f899188e2c7c0a81de92194fdb627cb4b36
Reviewed-on: https://go-review.googlesource.com/c/go/+/574699
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/runtime/malloc.go')
| -rw-r--r-- | src/runtime/malloc.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index 96c4761bc8..1df9006011 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -1404,7 +1404,7 @@ func profilealloc(mp *m, x unsafe.Pointer, size uintptr) { throw("profilealloc called without a P or outside bootstrapping") } c.nextSample = nextSample() - mProf_Malloc(x, size) + mProf_Malloc(mp, x, size) } // nextSample returns the next sampling point for heap profiling. The goal is |
