diff options
| author | Shahar Kohanim <skohanim@gmail.com> | 2016-03-23 00:44:07 +0200 |
|---|---|---|
| committer | Shahar Kohanim <skohanim@gmail.com> | 2016-03-30 03:44:41 +0000 |
| commit | 7f067c87d831f329d068fced1b136cd06039303c (patch) | |
| tree | 379aea9d949ef1a0c5534cc218cb8aba322e5e5d /src/cmd/internal/goobj/read.go | |
| parent | 777a77b4d29853e13dc803b2923bf88b498ed306 (diff) | |
| download | go-git-7f067c87d831f329d068fced1b136cd06039303c.tar.gz | |
cmd/compile, cmd/link: record lengths in object file
Record total number of relocations, pcdata, automatics, funcdata and files in
object file and use these numbers in the linker to allocate contiguous
slices to later be filled by the defined symbols.
name old secs new secs delta
LinkCmdGo 0.52 ± 3% 0.49 ± 3% -4.21% (p=0.000 n=91+92)
LinkJuju 4.48 ± 4% 4.21 ± 7% -6.08% (p=0.000 n=96+100)
name old MaxRSS new MaxRSS delta
LinkCmdGo 122k ± 2% 120k ± 4% -1.66% (p=0.000 n=98+93)
LinkJuju 799k ± 5% 865k ± 8% +8.29% (p=0.000 n=89+99)
GOGC=off
name old secs new secs delta
LinkCmdGo 0.42 ± 2% 0.41 ± 0% -2.98% (p=0.000 n=89+70)
LinkJuju 3.61 ± 0% 3.52 ± 1% -2.46% (p=0.000 n=80+89)
name old MaxRSS new MaxRSS delta
LinkCmdGo 130k ± 1% 128k ± 1% -1.33% (p=0.000 n=100+100)
LinkJuju 1.00M ± 0% 0.99M ± 0% -1.70% (p=0.000 n=100+100)
Change-Id: Ie08f6ccd4311bb78d8950548c678230a58635c73
Reviewed-on: https://go-review.googlesource.com/21026
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/internal/goobj/read.go')
| -rw-r--r-- | src/cmd/internal/goobj/read.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmd/internal/goobj/read.go b/src/cmd/internal/goobj/read.go index 2506f07de2..d64f4cbce1 100644 --- a/src/cmd/internal/goobj/read.go +++ b/src/cmd/internal/goobj/read.go @@ -614,6 +614,12 @@ func (r *objReader) parseObject(prefix []byte) error { } dataLength := r.readInt() + r.readInt() // n relocations - ignore + r.readInt() // n pcdata - ignore + r.readInt() // n autom - ignore + r.readInt() // n funcdata - ignore + r.readInt() // n files - ignore + r.dataOffset = r.offset r.skip(int64(dataLength)) |
