]> Cypherpunks repositories - gostls13.git/commit
[dev.link] cmd/link: fallocate space, and remove all msync calls
authorJeremy Faller <jeremy@golang.org>
Fri, 17 Apr 2020 20:11:28 +0000 (16:11 -0400)
committerJeremy Faller <jeremy@golang.org>
Mon, 20 Apr 2020 18:32:58 +0000 (18:32 +0000)
commit8ab37b1bafdd0040530f976f45c417029cda6965
tree3d02a6edef5fc8ba7eae30b42dd9aadba335ac91
parent7d4c455a80f5ae2203beb58395dc0c4ea45c0d39
[dev.link] cmd/link: fallocate space, and remove all msync calls

The fallocate calls will lower the chances of SIGBUS in the linker, but
it might still happen on other unsupported platforms and filesystems.

Darwin cmd/compile stats:

Munmap                    16.0ms ± 8%     0.8ms ± 3%   -95.19%  (p=0.000 n=8+10)
TotalTime                  484ms ± 2%     462ms ± 2%    -4.52%  (p=0.000 n=10+9)

Updates #37310

Change-Id: I41c6e490adec26fa1ebee49a5b268828f5ba05e1
Reviewed-on: https://go-review.googlesource.com/c/go/+/228385
Run-TryBot: Jeremy Faller <jeremy@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/link/internal/ld/outbuf.go
src/cmd/link/internal/ld/outbuf_darwin.go [new file with mode: 0644]
src/cmd/link/internal/ld/outbuf_linux.go [new file with mode: 0644]
src/cmd/link/internal/ld/outbuf_mmap.go
src/cmd/link/internal/ld/outbuf_nofallocate.go [new file with mode: 0644]
src/cmd/link/internal/ld/outbuf_nommap.go
src/cmd/link/internal/ld/outbuf_test.go
src/cmd/link/internal/ld/outbuf_windows.go