Hello rsc@golang.org, golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 5 months ago
(2012-12-01 16:55:24 UTC)
#1
The CL should reduce the include craziness in Go builds. It is difficult to measure ...
12 years, 5 months ago
(2012-12-01 17:04:08 UTC)
#2
The CL should reduce the include craziness in Go builds.
It is difficult to measure the resulting performance variation but on x86-64
Before:
perf stat bin/go install -a std -> 54.2G instructions
time bin/go install -a std -> 28.97s user, 8.17s system
After:
perf stat bin/go install -a std -> 48.3G instructions
time bin/go install -a std -> 25.93s user, 7.81s system
Lines of export data (ar pf xxx.a __.PKGDEF | wc -l) on some packages:
Before After
encoding/asn1 418 35
fmt 358 44
net 758 360 (linux/amd64)
net/http/pprof 606 361
unicode 877 241
ar pf fmt.a | wc -l: 358
ar pf
just a style thing, no other comments from me. https://codereview.appspot.com/6856126/diff/5001/src/cmd/gc/export.c File src/cmd/gc/export.c (right): https://codereview.appspot.com/6856126/diff/5001/src/cmd/gc/export.c#newcode161 src/cmd/gc/export.c:161: ...
12 years, 5 months ago
(2012-12-01 17:29:57 UTC)
#3
LGTM Code looks good as long as it works. This is all very subtle. Can ...
12 years, 5 months ago
(2012-12-06 05:47:53 UTC)
#7
LGTM
Code looks good as long as it works. This is all very subtle.
Can you move the declbuiltin.dir to fixedbugs/bugNNN.dir?
I'd like to avoid new subdirectories of test/.
Please wait until the pending comments by others are addressed.
Thanks.
Still have to take a look at DMorsing's comment. http://codereview.appspot.com/6856126/diff/5001/src/cmd/gc/export.c File src/cmd/gc/export.c (right): http://codereview.appspot.com/6856126/diff/5001/src/cmd/gc/export.c#newcode161 src/cmd/gc/export.c:161: ...
12 years, 5 months ago
(2012-12-06 07:23:55 UTC)
#9
On an old arm5 host this change shaved 300ms and 10mb off the build time ...
12 years, 5 months ago
(2012-12-07 00:37:38 UTC)
#10
On an old arm5 host this change shaved 300ms and 10mb off the build time for
pkg/net
dfc@qnap:~/go/src/pkg/net$ /usr/bin/time -v go build
Command being timed: "go build"
User time (seconds): 4.37
System time (seconds): 0.48
Percent of CPU this job got: 96%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:05.01
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 108208
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 60003
Voluntary context switches: 320
Involuntary context switches: 219
Swaps: 0
File system inputs: 0
File system outputs: 8088
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
after:
dfc@qnap:~/go/src/pkg/net$ /usr/bin/time -v go build
Command being timed: "go build"
User time (seconds): 4.09
System time (seconds): 0.47
Percent of CPU this job got: 95%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:04.75
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 98436
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 1
Minor (reclaiming a frame) page faults: 57511
Voluntary context switches: 322
Involuntary context switches: 216
Swaps: 0
File system inputs: 208
File system outputs: 7896
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
The results for the whole stdlibrary are even more impressive
before:
dfc@qnap:~/go/src$ /usr/bin/time -v go build -a std
Command being timed: "go build -a std"
User time (seconds): 91.40
System time (seconds): 10.33
Percent of CPU this job got: 94%
Elapsed (wall clock) time (h:mm:ss or m:ss): 1:47.15
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 195004
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 2
Minor (reclaiming a frame) page faults: 1036733
Voluntary context switches: 2608
Involuntary context switches: 1930
Swaps: 0
File system inputs: 848
File system outputs: 295064
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
after:
dfc@qnap:~/go/src$ /usr/bin/time -v go build -a std
Command being timed: "go build -a std"
User time (seconds): 81.01
System time (seconds): 8.71
Percent of CPU this job got: 97%
Elapsed (wall clock) time (h:mm:ss or m:ss): 1:32.27
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 192900
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 2
Minor (reclaiming a frame) page faults: 910154
Voluntary context switches: 2578
Involuntary context switches: 1564
Swaps: 0
File system inputs: 248
File system outputs: 288344
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0
I misremembered how the code was structured. On src/cmd/gc/lex.c:2031 there's a loop that pulls in ...
12 years, 5 months ago
(2012-12-07 19:06:12 UTC)
#13
I misremembered how the code was structured. On src/cmd/gc/lex.c:2031 there's a
loop that pulls in the arch dependent types (int, uint and uintptr). Those have
to be tagged as well if there's anyone out there who is insane enough to
redefine int.
On 2012/12/07 19:06:12, DMorsing wrote: > I misremembered how the code was structured. On src/cmd/gc/lex.c:2031 ...
12 years, 5 months ago
(2012-12-07 19:14:07 UTC)
#14
On 2012/12/07 19:06:12, DMorsing wrote:
> I misremembered how the code was structured. On src/cmd/gc/lex.c:2031 there's
a
> loop that pulls in the arch dependent types (int, uint and uintptr). Those
have
> to be tagged as well if there's anyone out there who is insane enough to
> redefine int.
Indeed, thanks.
Issue 6856126: code review 6856126: cmd/gc: do not export useless private symbols.
(Closed)
Created 12 years, 5 months ago by remyoudompheng
Modified 12 years, 5 months ago
Reviewers:
Base URL:
Comments: 11