libgo patch committed: Disable memory profiling in GC test

Submitted by Ian Taylor on April 20, 2012, 6:40 p.m.

Details

Message ID mcrty0e8cww.fsf@dhcp-172-18-216-180.mtv.corp.google.com
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.

Ian

Patch hide | download patch | download mbox

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 @@ 
 	runtime.ReadMemStats(memstats)
 	sys := memstats.Sys
 
+	runtime.MemProfileRate = 0 // disable profiler
+
 	itercount := 1000000
 	if testing.Short() {
 		itercount = 100000