开发四年只会写业务代码,分布式高并发都不会还做程序员?->>>    go 语言小白请教一个问题,我想profile 一下程序,按照网上的贴子操作出错,在google 上也收不到有用信息。 go version go1.5.2 linux/amd64 ----------------------代码--------------------------------------         flag.Parse()         var err error         fmt.Printf("file name is %v\n",*cpuprofile)         cpuFile,err = os.Create(*cpuprofile)         if err != nil{             fmt.Println("pprof err",err)         }else{             pprof.StartCPUProfile(cpuFile)             defer pprof.StopCPUProfile()             //defer cpuFile.Close()         } ----------------------代码结束-------------------------------------- 用go tool 来加载prof 文件出现如下错误。 root# go tool pprof 123.prof parsing profile: malformed profile format -------------123.prof 文件前50行------------------- goroutine profile: total 146 1 @ 0x4674e8 0x4672c3 0x462c04 0x403967 0x460e61 1 @ 0x431ee3 0x431fa4 0x441687 0x4412d6 0x4716c4 0x401837 0x431b00 0x460e61 1 @ 0x460e61 1 @ 0x431ee3 0x431fa4 0x431ce8 0x460e61 1 @ 0x431ee3 0x431fa4 0x421bc1 0x460e61 1 @ 0x431ee3 0x431fa4 0x41990a 0x460e61 1 @ 0x412bce 0x40af4d 0x40b1b4 0x46782c 0x460e61 1 @ 0x431ee3 0x42c00e 0x42b4d0 0x4c93ba 0x4c9426 0x4ccfac 0x4ea69d 0x4ea8dd 0x404a6b 0x460e61 1 @ 0x431ee3 0x42c00e 0x42b4d0 0x4c93ba 0x4c9426 0x4ccfac 0x4ea69d 0x4ea8dd 0x404e3b 0x460e61 136 @ 0x431ee3 0x42c00e 0x42b4d0 0x4c93ba 0x4c9426 0x4cb16a 0x4ded04 0x402413 0x460e61 1 @ 0x412bce 0x44c6ee 0x460e61 goroutine profile: total 146 1 @ 0x4674e8 0x4672c3 0x462c04 0x403967 0x460e61 1 @ 0x431ee3 0x431fa4 0x441687 0x4412d6 0x4716c4 0x401837 0x431b00 0x460e61 1 @ 0x460e61 1 @ 0x431ee3 0x431fa4 0x431ce8 0x460e61 1 @ 0x431ee3 0x431fa4 0x421bc1 0x460e61 1 @ 0x431ee3 0x431fa4 0x41990a 0x460e61 1 @ 0x412bce 0x40af4d 0x40b1b4 0x46782c 0x460e61 1 @ 0x431ee3 0x42c00e 0x42b4d0 0x4c93ba 0x4c9426 0x4ccfac 0x4ea69d 0x4ea8dd 0x404a6b 0x460e61 1 @ 0x431ee3 0x42c00e 0x42b4d0 0x4c93ba 0x4c9426 0x4ccfac 0x4ea69d 0x4ea8dd 0x404e3b 0x460e61 136 @ 0x431ee3 0x42c00e 0x42b4d0 0x4c93ba 0x4c9426 0x4cb16a 0x4ded04 0x402413 0x460e61 1 @ 0x412bce 0x44c6ee 0x460e61 goroutine profile: total 146 1 @ 0x4674e8 0x4672c3 0x462c04 0x403967 0x460e61 1 @ 0x431ee3 0x431fa4 0x441687 0x4412d6 0x4716c4 0x401837 0x431b00 0x460e61 1 @ 0x460e61 1 @ 0x431ee3 0x431fa4 0x431ce8 0x460e61 1 @ 0x431ee3 0x431fa4 0x421bc1 0x460e61 1 @ 0x431ee3 0x431fa4 0x41990a 0x460e61 1 @ 0x412bce 0x40af4d 0x40b1b4 0x46782c 0x460e61 1 @ 0x431ee3 0x42c00e 0x42b4d0 0x4c93ba 0x4c9426 0x4ccfac 0x4ea69d 0x4ea8dd 0x404a6b 0x460e61 1 @ 0x431ee3 0x42c00e 0x42b4d0 0x4c93ba 0x4c9426 0x4ccfac 0x4ea69d 0x4ea8dd 0x404e3b 0x460e61 136 @ 0x431ee3 0x42c00e 0x42b4d0 0x4c93ba 0x4c9426 0x4cb16a 0x4ded04 0x402413 0x460e61 1 @ 0x412bce 0x44c6ee 0x460e61 goroutine profile: total 146 1 @ 0x4674e8 0x4672c3 0x462c04 0x403967 0x460e61 1 @ 0x431ee3 0x431fa4 0x441687 0x4412d6 0x4716c4 0x401837 0x431b00 0x460e61 1 @ 0x460e61 1 @ 0x431ee3 0x431fa4 0x431ce8 0x460e61 1 @ 0x431ee3 0x431fa4 0x421bc1 0x460e61 1 @ 0x431ee3 0x431fa4 0x41990a 0x460e61 1 @ 0x412bce 0x40af4d 0x40b1b4 0x46782c 0x460e61 1 @ 0x431ee3 0x42c00e 0x42b4d0 0x4c93ba 0x4c9426 0x4ccfac 0x4ea69d 0x4ea8dd 0x404a6b 0x460e61 1 @ 0x431ee3 0x42c00e 0x42b4d0 0x4c93ba 0x4c9426 0x4ccfac 0x4ea69d 0x4ea8dd 0x404e3b 0x460e61 136 @ 0x431ee3 0x42c00e 0x42b4d0 0x4c93ba 0x4c9426 0x4cb16a 0x4ded04 0x402413 0x460e61 1 @ 0x412bce 0x44c6ee 0x460e61 goroutine profile: total 146 1 @ 0x4674e8 0x4672c3 0x462c04 0x403967 0x460e61 -------------123.prof 文件50行完------------------- 请go语言前辈指导错误,谢谢。