Skip to content

Commit 7defbff

Browse files
author
Jeremy Faller
committed
cmd/compile: remove isStmt symbol from FuncInfo
As promised in CL 188238, removing the obsolete symbol. Here are the latest stats. This is baselined at "e53edafb66" with only these changes applied, run on magna.cam. The linker looks straight better (in memory and speed). There is still a change I'm working on walking the progs to generate the debug_lines data in the compiler. That will likely result in a compiler speedup. name old time/op new time/op delta Template 324ms ± 3% 317ms ± 3% -2.07% (p=0.043 n=10+10) Unicode 142ms ± 4% 144ms ± 3% ~ (p=0.393 n=10+10) GoTypes 1.05s ± 2% 1.07s ± 2% +1.59% (p=0.019 n=9+9) Compiler 4.09s ± 2% 4.11s ± 1% ~ (p=0.218 n=10+10) SSA 12.5s ± 1% 12.7s ± 1% +1.00% (p=0.035 n=10+10) Flate 199ms ± 7% 203ms ± 5% ~ (p=0.481 n=10+10) GoParser 245ms ± 3% 246ms ± 5% ~ (p=0.780 n=9+10) Reflect 672ms ± 4% 688ms ± 3% +2.42% (p=0.015 n=10+10) Tar 280ms ± 4% 284ms ± 4% ~ (p=0.123 n=10+10) XML 379ms ± 4% 381ms ± 2% ~ (p=0.529 n=10+10) LinkCompiler 1.16s ± 4% 1.12s ± 2% -3.03% (p=0.001 n=10+9) ExternalLinkCompiler 2.28s ± 3% 2.23s ± 3% -2.51% (p=0.011 n=8+9) LinkWithoutDebugCompiler 686ms ± 9% 667ms ± 2% ~ (p=0.277 n=9+8) StdCmd 14.1s ± 1% 14.0s ± 1% ~ (p=0.739 n=10+10) name old user-time/op new user-time/op delta Template 604ms ±23% 564ms ± 7% ~ (p=0.661 n=10+9) Unicode 429ms ±40% 418ms ±37% ~ (p=0.579 n=10+10) GoTypes 2.43s ±12% 2.51s ± 7% ~ (p=0.393 n=10+10) Compiler 9.22s ± 3% 9.27s ± 3% ~ (p=0.720 n=9+10) SSA 26.3s ± 3% 26.6s ± 2% ~ (p=0.579 n=10+10) Flate 328ms ±19% 333ms ±12% ~ (p=0.842 n=10+9) GoParser 387ms ± 5% 378ms ± 9% ~ (p=0.356 n=9+10) Reflect 1.36s ±20% 1.43s ±21% ~ (p=0.631 n=10+10) Tar 469ms ±12% 471ms ±21% ~ (p=0.497 n=9+10) XML 685ms ±18% 698ms ±19% ~ (p=0.739 n=10+10) LinkCompiler 1.86s ±10% 1.87s ±11% ~ (p=0.968 n=10+9) ExternalLinkCompiler 3.20s ±13% 3.01s ± 8% -5.70% (p=0.046 n=8+9) LinkWithoutDebugCompiler 1.08s ±15% 1.09s ±20% ~ (p=0.579 n=10+10) name old alloc/op new alloc/op delta Template 36.3MB ± 0% 36.4MB ± 0% +0.26% (p=0.000 n=10+10) Unicode 28.5MB ± 0% 28.5MB ± 0% ~ (p=0.165 n=10+10) GoTypes 120MB ± 0% 121MB ± 0% +0.29% (p=0.000 n=9+10) Compiler 546MB ± 0% 548MB ± 0% +0.32% (p=0.000 n=10+10) SSA 1.84GB ± 0% 1.85GB ± 0% +0.49% (p=0.000 n=10+10) Flate 22.9MB ± 0% 23.0MB ± 0% +0.25% (p=0.000 n=10+10) GoParser 27.8MB ± 0% 27.9MB ± 0% +0.25% (p=0.000 n=10+8) Reflect 77.5MB ± 0% 77.7MB ± 0% +0.27% (p=0.000 n=9+9) Tar 34.5MB ± 0% 34.6MB ± 0% +0.23% (p=0.000 n=10+10) XML 44.2MB ± 0% 44.4MB ± 0% +0.32% (p=0.000 n=10+10) LinkCompiler 239MB ± 0% 230MB ± 0% -3.86% (p=0.000 n=10+10) ExternalLinkCompiler 243MB ± 0% 243MB ± 0% +0.22% (p=0.000 n=10+10) LinkWithoutDebugCompiler 164MB ± 0% 155MB ± 0% -5.45% (p=0.000 n=10+10) name old allocs/op new allocs/op delta Template 371k ± 0% 372k ± 0% +0.44% (p=0.000 n=10+10) Unicode 340k ± 0% 340k ± 0% +0.05% (p=0.000 n=10+10) GoTypes 1.32M ± 0% 1.32M ± 0% +0.46% (p=0.000 n=10+10) Compiler 5.34M ± 0% 5.37M ± 0% +0.59% (p=0.000 n=10+10) SSA 17.6M ± 0% 17.7M ± 0% +0.63% (p=0.000 n=10+10) Flate 233k ± 0% 234k ± 0% +0.48% (p=0.000 n=10+10) GoParser 309k ± 0% 310k ± 0% +0.40% (p=0.000 n=10+10) Reflect 964k ± 0% 969k ± 0% +0.54% (p=0.000 n=10+10) Tar 346k ± 0% 348k ± 0% +0.48% (p=0.000 n=10+9) XML 424k ± 0% 426k ± 0% +0.51% (p=0.000 n=10+10) LinkCompiler 751k ± 0% 645k ± 0% -14.13% (p=0.000 n=10+10) ExternalLinkCompiler 1.79M ± 0% 1.69M ± 0% -5.30% (p=0.000 n=10+10) LinkWithoutDebugCompiler 217k ± 0% 222k ± 0% +2.02% (p=0.000 n=10+10) name old object-bytes new object-bytes delta Template 547kB ± 0% 559kB ± 0% +2.17% (p=0.000 n=10+10) Unicode 215kB ± 0% 216kB ± 0% +0.60% (p=0.000 n=10+10) GoTypes 1.99MB ± 0% 2.03MB ± 0% +2.02% (p=0.000 n=10+10) Compiler 7.86MB ± 0% 8.07MB ± 0% +2.73% (p=0.000 n=10+10) SSA 26.4MB ± 0% 27.2MB ± 0% +3.27% (p=0.000 n=10+10) Flate 337kB ± 0% 343kB ± 0% +2.02% (p=0.000 n=10+10) GoParser 432kB ± 0% 441kB ± 0% +2.11% (p=0.000 n=10+10) Reflect 1.33MB ± 0% 1.36MB ± 0% +1.87% (p=0.000 n=10+10) Tar 477kB ± 0% 487kB ± 0% +2.24% (p=0.000 n=10+10) XML 617kB ± 0% 632kB ± 0% +2.33% (p=0.000 n=10+10) name old export-bytes new export-bytes delta Template 18.5kB ± 0% 18.5kB ± 0% ~ (all equal) Unicode 7.92kB ± 0% 7.92kB ± 0% ~ (all equal) GoTypes 35.0kB ± 0% 35.0kB ± 0% ~ (all equal) Compiler 109kB ± 0% 109kB ± 0% +0.09% (p=0.000 n=10+10) SSA 137kB ± 0% 137kB ± 0% +0.03% (p=0.000 n=10+10) Flate 4.89kB ± 0% 4.89kB ± 0% ~ (all equal) GoParser 8.49kB ± 0% 8.49kB ± 0% ~ (all equal) Reflect 11.4kB ± 0% 11.4kB ± 0% ~ (all equal) Tar 10.5kB ± 0% 10.5kB ± 0% ~ (all equal) XML 16.7kB ± 0% 16.7kB ± 0% ~ (all equal) name old text-bytes new text-bytes delta HelloSize 760kB ± 0% 760kB ± 0% ~ (all equal) CmdGoSize 10.8MB ± 0% 10.8MB ± 0% ~ (all equal) name old data-bytes new data-bytes delta HelloSize 10.7kB ± 0% 10.7kB ± 0% ~ (all equal) CmdGoSize 312kB ± 0% 312kB ± 0% ~ (all equal) name old bss-bytes new bss-bytes delta HelloSize 122kB ± 0% 122kB ± 0% ~ (all equal) CmdGoSize 146kB ± 0% 146kB ± 0% ~ (all equal) name old exe-bytes new exe-bytes delta HelloSize 1.11MB ± 0% 1.13MB ± 0% +1.10% (p=0.000 n=10+10) CmdGoSize 14.9MB ± 0% 15.0MB ± 0% +0.77% (p=0.000 n=10+10) Change-Id: I42e6087cd6231dbdcfff5464e46d373474e455e1 Reviewed-on: https://go-review.googlesource.com/c/go/+/192417 Reviewed-by: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com>
1 parent cf03238 commit 7defbff

File tree

8 files changed

+7
-27
lines changed

8 files changed

+7
-27
lines changed

src/cmd/internal/dwarf/dwarf.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ const LocPrefix = "go.loc."
2727
// RangePrefix is the prefix for all the symbols containing DWARF range lists.
2828
const RangePrefix = "go.range."
2929

30-
// IsStmtPrefix is the prefix for all the symbols containing DWARF is_stmt info for the line number table.
31-
const IsStmtPrefix = "go.isstmt."
32-
3330
// DebugLinesPrefix is the prefix for all the symbols containing DWARF debug_line information from the compiler.
3431
const DebugLinesPrefix = "go.debuglines."
3532

src/cmd/internal/obj/link.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,6 @@ type FuncInfo struct {
406406
dwarfLocSym *LSym
407407
dwarfRangesSym *LSym
408408
dwarfAbsFnSym *LSym
409-
dwarfIsStmtSym *LSym
410409
dwarfDebugLinesSym *LSym
411410

412411
GCArgs *LSym

src/cmd/internal/obj/objfile.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ func isDwarf64(ctxt *Link) bool {
551551
return ctxt.Headtype == objabi.Haix
552552
}
553553

554-
func (ctxt *Link) dwarfSym(s *LSym) (dwarfInfoSym, dwarfLocSym, dwarfRangesSym, dwarfAbsFnSym, dwarfIsStmtSym, dwarfDebugLines *LSym) {
554+
func (ctxt *Link) dwarfSym(s *LSym) (dwarfInfoSym, dwarfLocSym, dwarfRangesSym, dwarfAbsFnSym, dwarfDebugLines *LSym) {
555555
if s.Type != objabi.STEXT {
556556
ctxt.Diag("dwarfSym of non-TEXT %v", s)
557557
}
@@ -564,10 +564,9 @@ func (ctxt *Link) dwarfSym(s *LSym) (dwarfInfoSym, dwarfLocSym, dwarfRangesSym,
564564
if s.WasInlined() {
565565
s.Func.dwarfAbsFnSym = ctxt.DwFixups.AbsFuncDwarfSym(s)
566566
}
567-
s.Func.dwarfIsStmtSym = ctxt.LookupDerived(s, dwarf.IsStmtPrefix+s.Name)
568567
s.Func.dwarfDebugLinesSym = ctxt.LookupDerived(s, dwarf.DebugLinesPrefix+s.Name)
569568
}
570-
return s.Func.dwarfInfoSym, s.Func.dwarfLocSym, s.Func.dwarfRangesSym, s.Func.dwarfAbsFnSym, s.Func.dwarfIsStmtSym, s.Func.dwarfDebugLinesSym
569+
return s.Func.dwarfInfoSym, s.Func.dwarfLocSym, s.Func.dwarfRangesSym, s.Func.dwarfAbsFnSym, s.Func.dwarfDebugLinesSym
571570
}
572571

573572
func (s *LSym) Len() int64 {
@@ -591,14 +590,13 @@ func (ctxt *Link) fileSymbol(fn *LSym) *LSym {
591590
// TEXT symbol 's'. The various DWARF symbols must already have been
592591
// initialized in InitTextSym.
593592
func (ctxt *Link) populateDWARF(curfn interface{}, s *LSym, myimportpath string) {
594-
info, loc, ranges, absfunc, _, lines := ctxt.dwarfSym(s)
593+
info, loc, ranges, absfunc, lines := ctxt.dwarfSym(s)
595594
if info.Size != 0 {
596595
ctxt.Diag("makeFuncDebugEntry double process %v", s)
597596
}
598597
var scopes []dwarf.Scope
599598
var inlcalls dwarf.InlCalls
600599
if ctxt.DebugInfo != nil {
601-
stmtData(ctxt, s)
602600
scopes, inlcalls = ctxt.DebugInfo(s, curfn)
603601
}
604602
var err error

src/cmd/internal/obj/pcln.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,6 @@ func pctopcdata(ctxt *Link, sym *LSym, oldval int32, p *Prog, phase int32, arg i
295295
return int32(p.To.Offset)
296296
}
297297

298-
// stmtData writes out pc-linked is_stmt data for eventual use in the DWARF line numbering table.
299-
func stmtData(ctxt *Link, cursym *LSym) {
300-
var pctostmtData Pcdata
301-
funcpctab(ctxt, &pctostmtData, cursym, "pctostmt", pctostmt, nil)
302-
cursym.Func.dwarfIsStmtSym.P = pctostmtData.P
303-
}
304-
305298
func linkpcln(ctxt *Link, cursym *LSym) {
306299
pcln := &cursym.Func.Pcln
307300

src/cmd/internal/obj/plist.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func (ctxt *Link) InitTextSym(s *LSym, flag int) {
137137
ctxt.Text = append(ctxt.Text, s)
138138

139139
// Set up DWARF entries for s.
140-
info, loc, ranges, _, isstmt, lines := ctxt.dwarfSym(s)
140+
info, loc, ranges, _, lines := ctxt.dwarfSym(s)
141141
info.Type = objabi.SDWARFINFO
142142
info.Set(AttrDuplicateOK, s.DuplicateOK())
143143
if loc != nil {
@@ -148,9 +148,6 @@ func (ctxt *Link) InitTextSym(s *LSym, flag int) {
148148
ranges.Type = objabi.SDWARFRANGE
149149
ranges.Set(AttrDuplicateOK, s.DuplicateOK())
150150
ctxt.Data = append(ctxt.Data, info, ranges)
151-
isstmt.Type = objabi.SDWARFMISC
152-
isstmt.Set(AttrDuplicateOK, s.DuplicateOK())
153-
ctxt.Data = append(ctxt.Data, isstmt)
154151
lines.Type = objabi.SDWARFLINES
155152
lines.Set(AttrDuplicateOK, s.DuplicateOK())
156153
ctxt.Data = append(ctxt.Data, lines)

src/cmd/internal/objabi/symkind.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ const (
6060
SDWARFRANGE
6161
SDWARFLOC
6262
SDWARFLINES
63-
SDWARFMISC
6463
// ABI alias. An ABI alias symbol is an empty symbol with a
6564
// single relocation with 0 size that references the native
6665
// function implementation symbol.

src/cmd/link/internal/sym/symkind.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ const (
111111
SDWARFRANGE
112112
SDWARFLOC
113113
SDWARFLINES
114-
SDWARFMISC // Not really a section; informs/affects other DWARF section generation
115114

116115
// ABI aliases (these never appear in the output)
117116
SABIALIAS
@@ -132,7 +131,6 @@ var AbiSymKindToSymKind = [...]SymKind{
132131
SDWARFRANGE,
133132
SDWARFLOC,
134133
SDWARFLINES,
135-
SDWARFMISC,
136134
SABIALIAS,
137135
}
138136

src/cmd/link/internal/sym/symkind_string.go

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)