From 0b6984f741e9ddb628b5ad718682e58da48c707d Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 24 Mar 2010 09:40:09 -0700 Subject: runtime: malloc sampling, pprof interface R=r CC=golang-dev http://codereview.appspot.com/719041 --- test/mallocrep.go | 3 ++- test/mallocrep1.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/mallocrep.go b/test/mallocrep.go index 5e1314ef5..ab49aae88 100644 --- a/test/mallocrep.go +++ b/test/mallocrep.go @@ -30,8 +30,9 @@ func bigger() { } func main() { - flag.Parse() + runtime.MemProfileRate = 0 // disable profiler runtime.MemStats.Alloc = 0 // ignore stacks + flag.Parse() for i := 0; i < 1<<7; i++ { for j := 1; j <= 1<<22; j <<= 1 { if i == 0 && *chatty { diff --git a/test/mallocrep1.go b/test/mallocrep1.go index d7c937f11..99cdcfb85 100644 --- a/test/mallocrep1.go +++ b/test/mallocrep1.go @@ -92,6 +92,7 @@ func atoi(s string) int { } func main() { + runtime.MemProfileRate = 0 // disable profiler flag.Parse() b = make([]*byte, 10000) if flag.NArg() > 0 { -- cgit v1.2.3