aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql/sql_test.go
diff options
context:
space:
mode:
authorNick Ripley <nick.ripley@datadoghq.com>2025-11-21 16:01:29 +0000
committerNick Ripley <nick.ripley@datadoghq.com>2025-11-21 13:25:29 -0800
commit121bc3e464b901327a5c138d8a992bb85c440862 (patch)
treee3fd8bb4869b0033cae4c8be8beef7188d85eddd /src/database/sql/sql_test.go
parentb604148c4e8ad61640d12cde40379bc3c137d8a6 (diff)
downloadgo-121bc3e464b901327a5c138d8a992bb85c440862.tar.xz
runtime/pprof: remove hard-coded sleep in CPU profile reader
The CPU profiler reader goroutine has a hard-coded 100ms sleep between reads of the CPU profile sample buffer. This is done because waking up the CPU profile reader is not signal-safe on some platforms. As a consequence, stopping the profiler takes 200ms (one iteration to read the last samples and one to see the "eof"), and on many-core systems the reader does not wake up frequently enought to keep up with incoming data. This CL removes the sleep where it is safe to do so, following a suggestion by Austin Clements in the comments on CL 445375. We let the reader fully block, and wake up the reader when the buffer is over half-full. Fixes #63043 Updates #56029 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-linux-arm64-longtest,gotip-linux-386-longtest Change-Id: I9f7e7e9918a4a6f16e80f6aaf33103126568a81f Reviewed-on: https://go-review.googlesource.com/c/go/+/610815 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Mark Freeman <markfreeman@google.com>
Diffstat (limited to 'src/database/sql/sql_test.go')
0 files changed, 0 insertions, 0 deletions