Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3525)

Issue 65890043: code review 65890043: cmd/go: skip writing dwarf debug info for ephemeral binaries (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 2 months ago by rsc
Modified:
10 years, 2 months ago
Reviewers:
r, bradfitz
CC:
r, bradfitz, golang-codereviews
Visibility:
Public.

Description

cmd/go: skip writing dwarf debug info for ephemeral binaries Update issue 6853 For an ephemeral binary - one created, run, and then deleted - there is no need to write dwarf debug information, since the binary will not be used with gdb. In this case, instruct the linker not to spend time and disk space generating the debug information by passing the -w flag to the linker. Omitting dwarf information reduces the size of most binaries by 25%. We may be more aggressive about this in the future.

Patch Set 1 #

Patch Set 2 : diff -r 737767dd81fd https://code.google.com/p/go/ #

Total comments: 2

Patch Set 3 : diff -r 737767dd81fd https://code.google.com/p/go/ #

Patch Set 4 : diff -r 737767dd81fd https://code.google.com/p/go/ #

Patch Set 5 : diff -r 1b09c63ca02a https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -1 line) Patch
M src/cmd/go/build.go View 1 1 chunk +4 lines, -0 lines 0 comments Download
M src/cmd/go/pkg.go View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/go/run.go View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/go/test.go View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M test/run.go View 1 2 3 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10
rsc
Hello r (cc: golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
10 years, 2 months ago (2014-02-19 04:50:36 UTC) #1
bradfitz
https://codereview.appspot.com/65890043/diff/20001/src/cmd/go/test.go File src/cmd/go/test.go (right): https://codereview.appspot.com/65890043/diff/20001/src/cmd/go/test.go#newcode657 src/cmd/go/test.go:657: omitDWARF: !testC, does this include the implicit testC that's ...
10 years, 2 months ago (2014-02-19 04:55:16 UTC) #2
rsc
https://codereview.appspot.com/65890043/diff/20001/src/cmd/go/test.go File src/cmd/go/test.go (right): https://codereview.appspot.com/65890043/diff/20001/src/cmd/go/test.go#newcode657 src/cmd/go/test.go:657: omitDWARF: !testC, On 2014/02/19 04:55:16, bradfitz wrote: > does ...
10 years, 2 months ago (2014-02-19 05:04:16 UTC) #3
bradfitz
LGTM
10 years, 2 months ago (2014-02-19 05:07:47 UTC) #4
rsc
I added test/run.go to this CL.
10 years, 2 months ago (2014-02-19 05:11:17 UTC) #5
bradfitz
Still uploading?
10 years, 2 months ago (2014-02-19 05:12:02 UTC) #6
rsc
uploaded
10 years, 2 months ago (2014-02-19 05:13:53 UTC) #7
bradfitz
LGTM
10 years, 2 months ago (2014-02-19 05:15:43 UTC) #8
r
LGTM maybe updates 6853 again?
10 years, 2 months ago (2014-02-19 06:36:23 UTC) #9
rsc
10 years, 2 months ago (2014-02-19 15:01:17 UTC) #10
*** Submitted as https://code.google.com/p/go/source/detail?r=306e64f0c0cf ***

cmd/go: skip writing dwarf debug info for ephemeral binaries

Update issue 6853

For an ephemeral binary - one created, run, and then deleted -
there is no need to write dwarf debug information, since the
binary will not be used with gdb. In this case, instruct the linker
not to spend time and disk space generating the debug information
by passing the -w flag to the linker.

Omitting dwarf information reduces the size of most binaries by 25%.
We may be more aggressive about this in the future.

LGTM=bradfitz, r
R=r, bradfitz
CC=golang-codereviews
https://codereview.appspot.com/65890043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b