diff options
author | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-20 16:11:36 +0000 |
---|---|---|
committer | ian <ian@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-01-20 16:11:36 +0000 |
commit | 3e4e446a1d28027a21bd37a2194f097efe661ab8 (patch) | |
tree | 825e4e089cc744fa47a383aaa458b35b3c2d7ff0 /libgo/go/runtime | |
parent | c46389f0ac560e67a438f70620a9340456778eb9 (diff) | |
download | gcc-3e4e446a1d28027a21bd37a2194f097efe661ab8.tar.gz |
PR go/64683
runtime/pprof: Let memory profiler test pass if value not collected.
Since gccgo's GC is not precise, the transient value may not
be collected. Let the regexp match that case as well.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219900 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgo/go/runtime')
-rw-r--r-- | libgo/go/runtime/pprof/mprof_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libgo/go/runtime/pprof/mprof_test.go b/libgo/go/runtime/pprof/mprof_test.go index d4a948563c6..44a38508826 100644 --- a/libgo/go/runtime/pprof/mprof_test.go +++ b/libgo/go/runtime/pprof/mprof_test.go @@ -85,10 +85,12 @@ func TestMemoryProfiler(t *testing.T) { # 0x[0-9,a-f]+ runtime_pprof_test\.TestMemoryProfiler\+0x[0-9,a-f]+ .*/mprof_test.go:64 `, (1<<10)*memoryProfilerRun, (1<<20)*memoryProfilerRun), - fmt.Sprintf(`0: 0 \[%v: %v\] @ 0x[0-9,a-f x]+ + // This should start with "0: 0" but gccgo's imprecise + // GC means that sometimes the value is not collected. + fmt.Sprintf(`(0|%v): (0|%v) \[%v: %v\] @ 0x[0-9,a-f x]+ # 0x[0-9,a-f]+ pprof_test\.allocateTransient2M\+0x[0-9,a-f]+ .*/mprof_test.go:30 # 0x[0-9,a-f]+ runtime_pprof_test\.TestMemoryProfiler\+0x[0-9,a-f]+ .*/mprof_test.go:65 -`, memoryProfilerRun, (2<<20)*memoryProfilerRun), +`, memoryProfilerRun, (2<<20)*memoryProfilerRun, memoryProfilerRun, (2<<20)*memoryProfilerRun), } for _, test := range tests { |