aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/inline
diff options
context:
space:
mode:
authorCherry Mui <cherryyz@google.com>2022-11-07 17:05:33 -0500
committerCherry Mui <cherryyz@google.com>2022-11-08 18:10:43 +0000
commite5d2814576937162ce183d5aab09616ae13d983c (patch)
treeb922ea236f4ade7f97b4353fee901ea8f1e7e6c4 /src/cmd/compile/internal/inline
parentefe541d4e53f0e229e7069adbdcedb7f0b117d8e (diff)
downloadgo-e5d2814576937162ce183d5aab09616ae13d983c.tar.xz
cmd/compile: adjust PGO debug output slightly
- Include the callee names in hot call inlining message. - Print the graph when pgoinline >= 2. Change-Id: Iceb89b5f18cefc69ab9256aca9a910743d22ec0f Reviewed-on: https://go-review.googlesource.com/c/go/+/448496 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Cherry Mui <cherryyz@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/cmd/compile/internal/inline')
-rw-r--r--src/cmd/compile/internal/inline/inl.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/inline/inl.go b/src/cmd/compile/internal/inline/inl.go
index be4773ab28..6aaecfc7c6 100644
--- a/src/cmd/compile/internal/inline/inl.go
+++ b/src/cmd/compile/internal/inline/inl.go
@@ -122,7 +122,7 @@ func pgoInlinePrologue(p *pgo.Profile) {
}
}
})
- if base.Debug.PGOInline > 0 {
+ if base.Debug.PGOInline >= 2 {
fmt.Printf("hot-cg before inline in dot format:")
p.PrintWeightedCallGraphDOT(inlineHotCallSiteThresholdPercent)
}
@@ -165,7 +165,7 @@ func computeThresholdFromCDF(p *pgo.Profile) (float64, []pgo.NodeMapKey) {
// pgoInlineEpilogue updates IRGraph after inlining.
func pgoInlineEpilogue(p *pgo.Profile) {
- if base.Debug.PGOInline > 0 {
+ if base.Debug.PGOInline >= 2 {
ir.VisitFuncsBottomUp(typecheck.Target.Decls, func(list []*ir.Func, recursive bool) {
for _, f := range list {
name := ir.PkgFuncName(f)
@@ -930,7 +930,7 @@ func mkinlcall(n *ir.CallExpr, fn *ir.Func, maxCost int32, inlCalls *[]*ir.Inlin
return n
}
if base.Debug.PGOInline > 0 {
- fmt.Printf("hot-budget check allows inlining for callsite at %v\n", ir.Line(n))
+ fmt.Printf("hot-budget check allows inlining for call %s at %v\n", ir.PkgFuncName(fn), ir.Line(n))
}
} else {
// The inlined function body is too big. Typically we use this check to restrict