diff options
author | Russ Cox <rsc@golang.org> | 2010-03-24 09:40:09 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-03-24 09:40:09 -0700 |
commit | 555f59fbaa0b3cb086c62be60f5f460205a63167 (patch) | |
tree | 881a840ee1f85e3047ae2629fbe9db5f448d3411 /test | |
parent | c4c6e15a37fb226ff214ad727b64097832a7d2c9 (diff) | |
download | go-555f59fbaa0b3cb086c62be60f5f460205a63167.tar.gz |
runtime: malloc sampling, pprof interface
R=r
CC=golang-dev
http://codereview.appspot.com/719041
Diffstat (limited to 'test')
-rw-r--r-- | test/mallocrep.go | 3 | ||||
-rw-r--r-- | test/mallocrep1.go | 1 |
2 files changed, 3 insertions, 1 deletions
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 { |