主页

索引

模块索引

搜索页面

3.2.12. go tool命令

usage:

$ go tool [-n] command [args...]

Tool runs the go tool command identified by the arguments.
With no arguments it prints the list of known tools.

For more about each tool command, see 'go doc cmd/<command>'.

-n flag:

print the command that would be executed but not execute it

pprof

$ go tool pprof
$ go tool pprof -h
$ go doc cmd/pprof

说明:

Pprof interprets and displays profiles of Go programs.
For more information, see https://blog.golang.org/profiling-go-programs

Usage:

$ go tool pprof binary profile

compile

输出 Go 代码对应的汇编代码:

$ go tool compile -S interface_internal.go > interface_internal.s

主页

索引

模块索引

搜索页面