aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/debug
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/debug')
-rw-r--r--src/runtime/debug/garbage.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/runtime/debug/garbage.go b/src/runtime/debug/garbage.go
index cb3248d64d..4f11c58733 100644
--- a/src/runtime/debug/garbage.go
+++ b/src/runtime/debug/garbage.go
@@ -63,9 +63,7 @@ func ReadGCStats(stats *GCStats) {
if len(stats.PauseQuantiles) > 0 {
if n == 0 {
- for i := range stats.PauseQuantiles {
- stats.PauseQuantiles[i] = 0
- }
+ clear(stats.PauseQuantiles)
} else {
// There's room for a second copy of the data in stats.Pause.
// See the allocation at the top of the function.