]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: eliminate rendundant loads gcPercent
authorMichael Anthony Knyszek <mknyszek@google.com>
Thu, 21 Oct 2021 21:26:50 +0000 (21:26 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 5 Nov 2021 22:57:08 +0000 (22:57 +0000)
commit09e8de70c2ee36d99ba02389da0fe2e203879022
treeefd5160f418f9ab44669556a7f85ecdf610ca2a8
parent2f71c86370a2c3bf2827e8d9f9080d9bf92a5317
runtime: eliminate rendundant loads gcPercent

The previous change was an automated change that made gcPercent a
type-safe atomic variable. However, that introduced a lot of redundant
formal atomic loads of the variable. Remove them by only loading once in
each case, and reusing the value.

Change-Id: I49647135f423574f94506d456d1cc390150fad02
Reviewed-on: https://go-review.googlesource.com/c/go/+/357795
Trust: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
src/runtime/mgcpacer.go