libgo patch committed: Disable memory profiling in GC test

Message ID
State New
Headers show

Commit Message

Ian Taylor April 20, 2012, 6:40 p.m.
This libgo patch disables memory profiling in one of the tests of the
garbage collector.  This test measures the amount of memory allocated
after a loop that allocates and then forgets about a large number of
large slices.  The test was failing on PPC64 GNU/Linux because that
system uses a much larger page size, causing the blocks allocated by the
memory profiler to push up system memory usage.  This change disables
the memory profiler, since it is irrelevant to the test.  Ran Go
testsuite on x86_64-unknown-linux-gnu and powerpc64-unknown-linux-gnu.
Committed to mainline and 4.7 branch.



diff -r f50948ccba19 libgo/go/runtime/gc_test.go
--- a/libgo/go/runtime/gc_test.go	Thu Apr 19 21:54:17 2012 -0700
+++ b/libgo/go/runtime/gc_test.go	Fri Apr 20 11:37:32 2012 -0700
@@ -15,6 +15,8 @@ 
 	sys := memstats.Sys
+	runtime.MemProfileRate = 0 // disable profiler
 	itercount := 1000000
 	if testing.Short() {
 		itercount = 100000