diff --git a/src/runtime/testdata/testprog/memprof.go b/src/runtime/testdata/testprog/memprof.go index a22fee61d7..7c700af852 100644 --- a/src/runtime/testdata/testprog/memprof.go +++ b/src/runtime/testdata/testprog/memprof.go @@ -14,6 +14,8 @@ import ( ) func init() { + // Force heap sampling for determinism. + runtime.MemProfileRate = 1 register("MemProf", MemProf) }