cmd/link/internal: eliminate all ld.Cputime() usages

Also a similar 'elapsed' function and its usages were deleted.

Fixes #19865.

Change-Id: Ib125365e69cf2eda60de64fa74290c8c7d1fd65a
Reviewed-on: https://go-review.googlesource.com/c/go/+/171730
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
nikita-vanyasin 2019-04-13 16:42:48 +03:00 committed by Josh Bleecher Snyder
parent 65a1e24209
commit c3e8a20a65
17 changed files with 12 additions and 259 deletions

View file

@ -402,7 +402,7 @@ func (ctxt *Link) loadlib() {
lib := ctxt.Library[i]
if lib.Shlib == "" {
if ctxt.Debugvlog > 1 {
ctxt.Logf("%5.2f autolib: %s (from %s)\n", Cputime(), lib.File, lib.Objref)
ctxt.Logf("autolib: %s (from %s)\n", lib.File, lib.Objref)
}
loadobjfile(ctxt, lib)
}
@ -411,7 +411,7 @@ func (ctxt *Link) loadlib() {
for _, lib := range ctxt.Library {
if lib.Shlib != "" {
if ctxt.Debugvlog > 1 {
ctxt.Logf("%5.2f autolib: %s (from %s)\n", Cputime(), lib.Shlib, lib.Objref)
ctxt.Logf("autolib: %s (from %s)\n", lib.Shlib, lib.Objref)
}
ldshlibsyms(ctxt, lib.Shlib)
}
@ -842,7 +842,7 @@ func loadobjfile(ctxt *Link, lib *sym.Library) {
pkg := objabi.PathToPrefix(lib.Pkg)
if ctxt.Debugvlog > 1 {
ctxt.Logf("%5.2f ldobj: %s (%s)\n", Cputime(), lib.File, pkg)
ctxt.Logf("ldobj: %s (%s)\n", lib.File, pkg)
}
f, err := bio.Open(lib.File)
if err != nil {
@ -1439,7 +1439,7 @@ func (ctxt *Link) hostlink() {
}
if ctxt.Debugvlog != 0 {
ctxt.Logf("%5.2f host link:", Cputime())
ctxt.Logf("host link:")
for _, v := range argv {
ctxt.Logf(" %q", v)
}
@ -1877,7 +1877,7 @@ func ldshlibsyms(ctxt *Link, shlib string) {
}
}
if ctxt.Debugvlog > 1 {
ctxt.Logf("%5.2f ldshlibsyms: found library with name %s at %s\n", Cputime(), shlib, libpath)
ctxt.Logf("ldshlibsyms: found library with name %s at %s\n", shlib, libpath)
}
f, err := elf.Open(libpath)
@ -2387,7 +2387,7 @@ func genasmsym(ctxt *Link, put func(*Link, *sym.Symbol, string, SymbolType, int6
}
if ctxt.Debugvlog != 0 || *flagN {
ctxt.Logf("%5.2f symsize = %d\n", Cputime(), uint32(Symsize))
ctxt.Logf("symsize = %d\n", uint32(Symsize))
}
}