]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/internal/dwarf: revise Abbrevs() signature
authorThan McIntosh <thanm@google.com>
Fri, 1 May 2020 16:24:03 +0000 (12:24 -0400)
committerThan McIntosh <thanm@google.com>
Mon, 4 May 2020 10:55:04 +0000 (10:55 +0000)
commit6ea7a196d0a04eb913e0136fb681610055cf9b11
treefd536ad1f3a62a9397712d53884ab6afedbd9012
parent24814e214776ae5165083a963db5c56abbde4176
[dev.link] cmd/internal/dwarf: revise Abbrevs() signature

The function Abbrevs() was returning an array of structures by value,
which is not very efficient (this was showing up in a kubernetes
kubelet linker profile). Switch the function to return a slice
instead.

Improves linker DwarfGenerateDebugSyms running time when
linking the compiler in compilebench:

DwarfGenerateDebugSyms   29.2ms ±144%  23.9ms ±125%  -17.89%  (p=0.000 n=99+99)

Change-Id: I1132816563f208c63eb82a7932d9f2bcb2455324
Reviewed-on: https://go-review.googlesource.com/c/go/+/231558
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/internal/dwarf/dwarf.go