From 25f79b9dbeb13d5a6a66290848999de2425ad691 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Thu, 16 Oct 2014 14:58:11 -0400 Subject: [PATCH] runtime/pprof: disable new memory test It cannot run 'go tool pprof'. There is no guarantee that's installed. It needs to build a temporary pprof binary and run that. It also needs to skip the test on systems that can't build and run binaries, namely android and nacl. See src/cmd/nm/nm_test.go's TestNM for a template. Update #8867 Status: Accepted TBR=dvyukov CC=golang-codereviews https://golang.org/cl/153710043 --- src/runtime/malloc.go | 2 ++ src/runtime/pprof/mprof_test.go | 1 + 2 files changed, 3 insertions(+) diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go index 9b4264f2b3..876a2ddaa7 100644 --- a/src/runtime/malloc.go +++ b/src/runtime/malloc.go @@ -40,6 +40,8 @@ type pageID uintptr // base address for all 0-byte allocations var zerobase uintptr +//go:nowritebarrier + // Allocate an object of size bytes. // Small objects are allocated from the per-P cache's free lists. // Large objects (> 32 kB) are allocated straight from the heap. diff --git a/src/runtime/pprof/mprof_test.go b/src/runtime/pprof/mprof_test.go index 1880b9a707..76ac02f2b7 100644 --- a/src/runtime/pprof/mprof_test.go +++ b/src/runtime/pprof/mprof_test.go @@ -52,6 +52,7 @@ func allocatePersistent1K() { var memoryProfilerRun = 0 func TestMemoryProfiler(t *testing.T) { + t.Skip("broken test - see issue 8867") // Create temp file for the profile. f, err := ioutil.TempFile("", "memprof") if err != nil { -- 2.50.0