-
Notifications
You must be signed in to change notification settings - Fork 17.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/compile: PGO compiler diagnostics #58153
Comments
Bumping to 1.22. There is more structural work to be done. For 1.21, PGO devirtualization does include structured JSON output with |
Change https://go.dev/cl/528400 mentions this issue: |
When a PGO build fails or produces incorrect program, it is often unclear what the problem is. Add pgo hash so we can bisect to individual optimization decisions, which often helps debugging. Related to #58153. Change-Id: I651ffd9c53bad60f2f28c8ec2a90a3f532982712 Reviewed-on: https://go-review.googlesource.com/c/go/+/528400 LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Pratt <[email protected]>
Minor change: |
In addition to structured output, we also hope to print some statistics, such as |
I saw this and thought, "can't this be obtained from the compiler's -json output"?
and then if you diff the
There will be more complicated changes in places, because sometimes inlining can reduce a function's cost. note: "grepall" is
|
Today, the compiler has some limited diagnostics of behavior with PGO using the
-d=pgoinline=1
flag. These are really just ad-hoc logging points. We want more robust diagnostics, for reasons @josharian lays out well in #55022 (comment):Plus (c) of making it easier for us to investigate compilers issues filed here.
Our current thinking for initial work here is to provide more complete/structured output of all optimization decisions, rather than just "decisions due to PGO", because the latter is ambiguous. e.g., if we decide to do an inline because of PGO and that affects the non-PGO heuristics further up the call tree, does that count as a "PGO" decision.
cc @cherrymui @aclements
The text was updated successfully, but these errors were encountered: