• Shenghou Ma's avatar
    runtime/pprof: make TestBlockProfile more robust · f0bbb5c4
    Shenghou Ma authored
    It's using debug mode of pprof.writeBlock, so the output actually goes
    through text/tabwriter. It is possible that tabwriter expands each tab
    into multiple tabs in certain cases.
    
    For example, this output has been observed on the new arm64 port:
    10073805 1 @ 0x1088ec 0xd1b8c 0xd0628 0xb68c0 0x867f4
    #	0x1088ec	sync.(*Cond).Wait+0xfc				/home/minux/go.git/src/sync/cond.go:63
    #	0xd1b8c		runtime/pprof_test.blockCond+0x22c		/home/minux/go.git/src/runtime/pprof/pprof_test.go:454
    #	0xd0628		runtime/pprof_test.TestBlockProfile+0x1b8	/home/minux/go.git/src/runtime/pprof/pprof_test.go:359
    #	0xb68c0		testing.tRunner+0x140				/home/minux/go.git/src/testing/testing.go:447
    
    10069965 1 @ 0x14008 0xd1390 0xd0628 0xb68c0 0x867f4
    #	0x14008	runtime.chansend1+0x48				/home/minux/go.git/src/runtime/chan.go:76
    #	0xd1390	runtime/pprof_test.blockChanSend+0x100		/home/minux/go.git/src/runtime/pprof/pprof_test.go:396
    #	0xd0628	runtime/pprof_test.TestBlockProfile+0x1b8	/home/minux/go.git/src/runtime/pprof/pprof_test.go:359
    #	0xb68c0	testing.tRunner+0x140				/home/minux/go.git/src/testing/testing.go:447
    
    10069706 1 @ 0x108e0c 0xd193c 0xd0628 0xb68c0 0x867f4
    #	0x108e0c	sync.(*Mutex).Lock+0x19c			/home/minux/go.git/src/sync/mutex.go:67
    #	0xd193c		runtime/pprof_test.blockMutex+0xbc		/home/minux/go.git/src/runtime/pprof/pprof_test.go:441
    #	0xd0628		runtime/pprof_test.TestBlockProfile+0x1b8	/home/minux/go.git/src/runtime/pprof/pprof_test.go:359
    #	0xb68c0		testing.tRunner+0x140				/home/minux/go.git/src/testing/testing.go:447
    
    Change-Id: I3bef778c5fe01a894cfdc526fdc5fecb873b8ade
    Signed-off-by: 's avatarShenghou Ma <minux@golang.org>
    Reviewed-on: https://go-review.googlesource.com/5554Reviewed-by: 's avatarDmitry Vyukov <dvyukov@google.com>
    f0bbb5c4
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...