Skip to content

cmd/go/internal/test: "go help testflag" refers to legacy options of pprof #74336

Open
@dolmen

Description

@dolmen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.GoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions