]> Cypherpunks repositories - gostls13.git/commit
runtime, cmd/link/internal/ld: disable memory profiling when data unreachable
authorBrad Fitzpatrick <bradfitz@golang.org>
Mon, 8 Mar 2021 04:52:48 +0000 (20:52 -0800)
committerBrad Fitzpatrick <bradfitz@golang.org>
Tue, 9 Mar 2021 20:09:52 +0000 (20:09 +0000)
commit18510ae88ffcb9c4a914805fde3e613539f9b6dc
treeee05082292ba5e9d9570725ad5aced88b4b8cc2e
parente4f3cfadf618df5135bf0952507ab491975cceb5
runtime, cmd/link/internal/ld: disable memory profiling when data unreachable

If runtime.MemProfile is unreachable, default to not collecting any
memory profiling samples, to save memory on the hash table.

Fixes #42347

Change-Id: I9a4894a5fc77035fe59b1842e1ec77a1182e70c1
Reviewed-on: https://go-review.googlesource.com/c/go/+/299671
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Trust: Keith Randall <khr@golang.org>
src/cmd/link/internal/ld/ld_test.go
src/cmd/link/internal/ld/lib.go
src/runtime/mprof.go