Skip to content

docs: Go PGO works now — remove the note added when it did not (#171) - #181

Merged
dpsoft merged 1 commit into
mainfrom
docs/go-pgo-works
Oct 3, 2026
Merged

dpsoft merged 1 commit into
mainfrom
docs/go-pgo-works

Conversation

@dpsoft

@dpsoft dpsoft commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Follow-up to #180.

#177 added a note saying go build -pgo= does not accept these profiles. That was true when written. #180 populated Function.start_line and verified the Go compiler matches on it and acts on the result:

hot-callsite-thres-from-CDF=3.90987408880053
hot-node enabled increased budget=2000 for func=main.main.func1

So the note is now false. It comes out, replaced by the two commands that actually do the thing:

perf-agent --profile --pid <PID> --duration 30s --profile-output cpu.pb.gz
go build -pgo=cpu.pb.gz -o app .

The inlined-frame limitation is stated rather than left for a reader to discover from a thinner profile: those frames carry no start line, Go keys its hot nodes on out-of-line functions, and it accepts and applies the profile regardless.

https://claude.ai/code/session_01P5889hA6CrX8ysnQkvv6im

#177 added a note saying `go build -pgo=` does not accept these profiles,
which was true when written. #180 populated Function.start_line and
verified the Go compiler matches on it and acts:

    hot-callsite-thres-from-CDF=3.90987408880053
    hot-node enabled increased budget=2000 for func=main.main.func1

So the note is now false and comes out, replaced by the two commands that
do the thing. The inlined-frame limitation is stated rather than left for
a reader to discover from a thinner profile: those frames carry no start
line, Go keys its hot nodes on out-of-line functions, and it accepts and
applies the profile regardless.

Claude-Session: https://claude.ai/code/session_01P5889hA6CrX8ysnQkvv6im
@dpsoft
dpsoft merged commit 05cd56f into main Oct 3, 2026
16 checks passed
@dpsoft
dpsoft deleted the docs/go-pgo-works branch October 5, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant