From: Michael Anthony Knyszek Date: Tue, 29 Nov 2022 21:23:40 +0000 (+0000) Subject: doc/go1.20: add runtime, runtime/trace, and runtime/pprof release notes X-Git-Tag: go1.20rc1~64 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=85ce1fd97f6d187e3e2af05440065b0561eff363;p=gostls13.git doc/go1.20: add runtime, runtime/trace, and runtime/pprof release notes This change adds release notes for the "Runtime" section and updated some of the release notes for runtime/trace and runtime/pprof after I looked at the full list of runtime-related changes. For #54202. Change-Id: Id1395f4e6e02d3fcc248855ca98ad0ee26cae574 Reviewed-on: https://go-review.googlesource.com/c/go/+/454075 TryBot-Result: Gopher Robot Reviewed-by: Cherry Mui Reviewed-by: Robert Griesemer Reviewed-by: Austin Clements Run-TryBot: Michael Knyszek Auto-Submit: Michael Knyszek --- diff --git a/doc/go1.20.html b/doc/go1.20.html index 710e4da025..571c466134 100644 --- a/doc/go1.20.html +++ b/doc/go1.20.html @@ -246,8 +246,27 @@ Do not send CLs removing the interior tags from such phrases.

Runtime

-

- TODO: complete this section, or delete if not needed +

+ The runtime now has experimental support for memory-safe arena allocation + that makes it possible to eagerly free memory in bulk. + When used appopriately, it has the potential to improve CPU performance by + up to 15% in memory-allocation-heavy applications. + To try it out, build your Go program with GOEXPERIMENT=arenas, + which will make the arena package visible to your program. + Source files that import the arena package must require the + goexperiment.arenas build tag. +

+ +

+ Some of the garbage collector's internal data structures were reorganized to + be both more space and CPU efficient. + This change reduces memory overheads and improves overall CPU performance by + up to 2%. +

+ +

+ The garbage collector behaves less erratically with respect to goroutine + assists in some circumstances.

Compiler

@@ -983,15 +1002,43 @@ proxyHandler := &httputil.ReverseProxy{
runtime/metrics
-

+

Go 1.20 adds new supported metrics, including the current GOMAXPROCS setting (/sched/gomaxprocs:threads), the number of cgo calls executed (/cgo/go-to-c-calls:calls), - and various measures of time spent in garbage collection. + total mutex block time (/sync/mutex/wait/total), and various measures of time + spent in garbage collection. +

+ +

+ Time-based histogram metrics are now less precise, but take up much less memory.

+
runtime/pprof
+
+

+ Mutex profile samples are now pre-scaled, fixing an issue where old mutex profile + samples would be scaled incorrectly if the sampling rate changed during execution. +

+ +

+ Profiles collected on Windows now include memory mapping information that fixes + symbolization issues for position-independent binaries. +

+
+
+ +
runtime/trace
+
+

+ The garbage collector's background sweeper now yields less frequently, + resulting in many fewer extraneous events in execution traces. +

+
+
+
strings