Go version
go version go1.25rc1 darwin/arm64
Output of go env
in your module/workspace:
N/A
What did you do?
$ go1.25rc1 help testflag | sed -n '4,8p'
Several of the flags control profiling and write an execution profile
suitable for "go tool pprof"; run "go tool pprof -h" for more
information. The --alloc_space, --alloc_objects, and --show_bytes
options of pprof control how the information is presented.
$ go1.25rc1 tool pprof -h 2>&1 | grep -A8 'Legacy'
Legacy convenience options:
-inuse_space Same as -sample_index=inuse_space
-inuse_objects Same as -sample_index=inuse_objects
-alloc_space Same as -sample_index=alloc_space
-alloc_objects Same as -sample_index=alloc_objects
-total_delay Same as -sample_index=delay
-contentions Same as -sample_index=contentions
-mean_delay Same as -mean -sample_index=delay
What did you see happen?
go help testflag
mentions legacy options of pprof
. Those options are even mentioned with double dash (--alloc_space
) instead of single dash.
What did you expect to see?
I don't know. This paragraph is so outdated that I wonder if it is still relevant.
Comment From: gabyhelp
Related Issues
- cmd/pprof: doc about -alloc_space in Go 1.9 #20734 (closed)
- cmd/pprof: rejects inuse_space flag with debug=0 profiles #18230 (closed)
Related Code Changes
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
Comment From: dmitshur
CC @golang/command-line, @cherrymui.