WB int `help:"print information about write barriers"`
ABIWrap int `help:"print information about ABI wrapper generation"`
MayMoreStack string `help:"call named function before all stack growth checks" concurrent:"ok"`
- PGOInlineCDFThreshold string `help:"cummulative threshold percentage for determining call sites as hot candidates for inlining" concurrent:"ok"`
+ PGOInlineCDFThreshold string `help:"cumulative threshold percentage for determining call sites as hot candidates for inlining" concurrent:"ok"`
PGOInlineBudget int `help:"inline budget for hot functions" concurrent:"ok"`
PGOInline int `help:"debug profile-guided inlining"`
- WrapGlobalMapDbg int "help:\"debug trace output for global map init wrapping\""
- WrapGlobalMapStress int "help:\"run global map init wrap in stress mode (no size cutoff)\""
+ WrapGlobalMapDbg int `help:"debug trace output for global map init wrapping"`
+ WrapGlobalMapCtl int `help:"global map init wrap control (0 => default, 1 => off, 2 => stress mode, no size cutoff)"`
ConcurrentOk bool // true if only concurrentOk flags seen
}
TraceProfile string "help:\"write an execution trace to `file`\""
TrimPath string "help:\"remove `prefix` from recorded source file paths\""
WB bool "help:\"enable write barrier\"" // TODO: remove
- WrapGlobalMapInit bool "help:\"wrap global map large inits in their own functions (to permit deadcode)\""
PgoProfile string "help:\"read profile from `file`\""
// Configuration derived from flags; not a flag itself.
Flag.LinkShared = &Ctxt.Flag_linkshared
Flag.Shared = &Ctxt.Flag_shared
Flag.WB = true
- Flag.WrapGlobalMapInit = true
Debug.ConcurrentOk = true
Debug.InlFuncsWithClosures = 1
}
// Add keep relocations for global maps.
- if base.Flag.WrapGlobalMapInit {
+ if base.Debug.WrapGlobalMapCtl != 1 {
staticinit.AddKeepRelocations()
}
// If we're compiling the package init function, search for any
// relocations that target global map init outline functions and
// turn them into weak relocs.
- if base.Flag.WrapGlobalMapInit && fn.IsPackageInit() {
+ if fn.IsPackageInit() && base.Debug.WrapGlobalMapCtl != 1 {
weakenGlobalMapInitRelocs(fn)
}
}
// Reject smaller candidates if not in stress mode.
- if rsiz < wrapGlobalMapInitSizeThreshold && base.Debug.WrapGlobalMapStress == 0 {
+ if rsiz < wrapGlobalMapInitSizeThreshold && base.Debug.WrapGlobalMapCtl != 2 {
if base.Debug.WrapGlobalMapDbg > 1 {
fmt.Fprintf(os.Stderr, "=-= skipping %v size too small at %d\n",
nm, rsiz)
// functions (if legal/profitable). Return value is an updated list
// and a list of any newly generated "map init" functions.
func OutlineMapInits(stmts []ir.Node) ([]ir.Node, []*ir.Func) {
- if !base.Flag.WrapGlobalMapInit {
+ if base.Debug.WrapGlobalMapCtl == 1 {
return stmts, nil
}
newfuncs := []*ir.Func{}