]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link/internal/loader: reduce ABI alias postprocessing overhead
authorThan McIntosh <thanm@google.com>
Sat, 2 Nov 2019 13:36:28 +0000 (09:36 -0400)
committerThan McIntosh <thanm@google.com>
Fri, 8 Nov 2019 16:35:06 +0000 (16:35 +0000)
commit17722c21e754f25b7694b350cdae044b9729776c
tree89823b0be12e1cc41a291300c8226b455704d789
parentb4245ea54432bcdc92dc5e0e84b07408f5ee5479
[dev.link] cmd/link/internal/loader: reduce ABI alias postprocessing overhead

In loadObjFull when populating the sym.Reloc vector for live symbols,
avoid using the loader.SymType() method to determine if a relocation
targets an ABI alias; since invoking loader.SymType requires a
global-to-local index translation and a read from the object file.
Instead just look at the target symbol itself, which has already been
created at this point.

Hyperkube performance numbers for this change:

name                         old time/op  new time/op  delta
RelinkHyperkube               29.9s ± 2%   29.2s ± 3%  -2.42%  (p=0.000 n=20+20)
RelinkWithoutDebugHyperkube   22.0s ± 3%   21.4s ± 3%  -2.58%  (p=0.000 n=20+20)

Change-Id: Ib7696d8760dd0485240246d6d640668fbf451d71
Reviewed-on: https://go-review.googlesource.com/c/go/+/205257
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/link/internal/loader/loader.go