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

Issue 7106050: code review 7106050: cmd/5l: reduce the size of Prog and Sym (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 6 months ago by dave
Modified:
12 years, 5 months ago
Reviewers:
CC:
minux1, remyoudompheng, rsc, golang-dev
Visibility:
Public.

Description

cmd/5l: reduce the size of Prog and Sym Prog * Remove the unused Prog* dlink * note that align is also unused, but removing it does not help due to alignment issues. Saves 4 bytes, sizeof(Prog): 84 => 80. Sym * Align {u,}char fields on word boundaries Saves 4 bytes, sizeof(Sym): 136 => 132. Tested on linux/arm and freebsd/arm.

Patch Set 1 #

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

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

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

Patch Set 5 : diff -r a5410435a57d https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r a5410435a57d https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -4 lines) Patch
M src/cmd/5l/l.h View 1 2 4 chunks +3 lines, -4 lines 0 comments Download

Messages

Total messages: 17
dave_cheney.net
Hello minux.ma@gmail.com, remyoudompheng@gmail.com, rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
12 years, 6 months ago (2013-01-15 09:58:56 UTC) #1
dave_cheney.net
Please hold off, I think I've found an additional 8 unused bytes in Prog. On ...
12 years, 6 months ago (2013-01-15 10:07:41 UTC) #2
minux1
On Tue, Jan 15, 2013 at 5:58 PM, <dave@cheney.net> wrote: > Saves 4 bytes, under ...
12 years, 6 months ago (2013-01-15 10:21:00 UTC) #3
dave_cheney.net
I've found another 8 bytes that can be saved. Here is a before / after ...
12 years, 6 months ago (2013-01-15 10:24:06 UTC) #4
dave_cheney.net
Hello minux.ma@gmail.com, remyoudompheng@gmail.com, rsc@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 6 months ago (2013-01-15 10:25:14 UTC) #5
minux1
https://codereview.appspot.com/7106050/diff/4004/src/cmd/5l/l.h File src/cmd/5l/l.h (left): https://codereview.appspot.com/7106050/diff/4004/src/cmd/5l/l.h#oldcode77 src/cmd/5l/l.h:77: Sym* gotype; i think gotype is needed if we ...
12 years, 6 months ago (2013-01-15 10:30:56 UTC) #6
dave_cheney.net
Are you talking about the lack of proper dwarf symbols on arm ? If so, ...
12 years, 6 months ago (2013-01-15 10:52:04 UTC) #7
minux1
On Tue, Jan 15, 2013 at 6:52 PM, Dave Cheney <dave@cheney.net> wrote: > Are you ...
12 years, 6 months ago (2013-01-15 10:59:33 UTC) #8
dave_cheney.net
Thanks. Maybe by that time other savings will have materialised to make the size of ...
12 years, 6 months ago (2013-01-15 11:00:42 UTC) #9
minux1
Did you find out why clang on FreeBSD is able to pack our struct smaller ...
12 years, 6 months ago (2013-01-15 18:45:02 UTC) #10
dave_cheney.net
On 2013/01/15 18:45:02, minux wrote: > Did you find out why clang on FreeBSD is ...
12 years, 6 months ago (2013-01-15 23:27:06 UTC) #11
minux1
LGTM.
12 years, 6 months ago (2013-01-16 10:49:09 UTC) #12
rsc
LGTM https://codereview.appspot.com/7106050/diff/4004/src/cmd/5l/l.h File src/cmd/5l/l.h (left): https://codereview.appspot.com/7106050/diff/4004/src/cmd/5l/l.h#oldcode77 src/cmd/5l/l.h:77: Sym* gotype; On 2013/01/15 10:30:56, minux wrote: > ...
12 years, 6 months ago (2013-01-18 21:06:17 UTC) #13
dave_cheney.net
>> i think gotype is needed if we want to generate >> DWARF debuginfo with ...
12 years, 6 months ago (2013-01-18 21:18:32 UTC) #14
rsc
I expect it to be important in the near future. I don't want to make ...
12 years, 6 months ago (2013-01-18 21:22:14 UTC) #15
dave_cheney.net
fair enough, that is good to know. Currently these two defines #define datasize reg #define ...
12 years, 6 months ago (2013-01-18 21:23:58 UTC) #16
dave_cheney.net
12 years, 5 months ago (2013-01-20 09:14:37 UTC) #17
*** Submitted as https://code.google.com/p/go/source/detail?r=9dacae220eca ***

cmd/5l: reduce the size of Prog and Sym

Prog
* Remove the unused Prog* dlink
* note that align is also unused, but removing it does not help due to alignment
issues.

Saves 4 bytes, sizeof(Prog): 84 => 80.

Sym
* Align {u,}char fields on word boundaries

Saves 4 bytes, sizeof(Sym): 136 => 132.

Tested on linux/arm and freebsd/arm.

R=minux.ma, remyoudompheng, rsc
CC=golang-dev
https://codereview.appspot.com/7106050
Sign in to reply to this message.

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