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

Issue 7399045: code review 7399045: cmd/5g, cmd/5l, cmd/6l, cmd/8l, cmd/gc, cmd/ld, runtime... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 3 months ago by cshapiro
Modified:
12 years, 3 months ago
Reviewers:
CC:
golang-dev, bradfitz, cshapiro1, dave_cheney.net, rsc
Visibility:
Public.

Description

cmd/5g, cmd/5l, cmd/6l, cmd/8l, cmd/gc, cmd/ld, runtime: accurate args and locals information Previously, the func structure contained an inaccurate value for the args member and a 0 value for the locals member. This change populates the func structure with args and locals values computed by the compiler. The number of args was already available in the ATEXT instruction. The number of locals is now passed through in the new ALOCALS instruction. This change also switches the unit of args and locals to be bytes, just like the frame member, instead of 32-bit words.

Patch Set 1 #

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

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

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

Total comments: 2

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

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

Patch Set 7 : diff -r 67ff484a1801 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -19 lines) Patch
M src/cmd/5g/peep.c View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/cmd/5l/5.out.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/5l/l.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/cmd/5l/obj.c View 1 2 chunks +6 lines, -0 lines 0 comments Download
M src/cmd/5l/span.c View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/6l/6.out.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/6l/l.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/cmd/6l/obj.c View 1 2 chunks +6 lines, -0 lines 0 comments Download
M src/cmd/6l/optab.c View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/8l/8.out.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/8l/l.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/cmd/8l/obj.c View 1 2 chunks +6 lines, -0 lines 0 comments Download
M src/cmd/8l/optab.c View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/gc/pgen.c View 1 3 chunks +6 lines, -1 line 0 comments Download
M src/cmd/ld/lib.c View 1 1 chunk +3 lines, -1 line 0 comments Download
M src/pkg/runtime/extern.go View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/runtime.h View 1 2 3 4 5 6 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/symtab.c View 1 2 3 4 1 chunk +11 lines, -11 lines 0 comments Download
M src/pkg/runtime/traceback_arm.c View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/traceback_x86.c View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10
cshapiro
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
12 years, 3 months ago (2013-02-21 01:17:45 UTC) #1
bradfitz
On Wed, Feb 20, 2013 at 5:17 PM, <cshapiro@golang.org> wrote: > Reviewers: golang-dev_googlegroups.com, > > ...
12 years, 3 months ago (2013-02-21 01:21:46 UTC) #2
cshapiro1
On 2013/02/21 01:21:46, bradfitz wrote: > s/not/now/ ? Fixed.
12 years, 3 months ago (2013-02-21 01:25:02 UTC) #3
dave_cheney.net
Adding more members to {5,6,8}l.Sym makes me worry about the RSS of the linker. Are ...
12 years, 3 months ago (2013-02-21 01:25:59 UTC) #4
cshapiro
On Wed, Feb 20, 2013 at 5:25 PM, Dave Cheney <dave@cheney.net> wrote: > Adding more ...
12 years, 3 months ago (2013-02-21 01:38:05 UTC) #5
dave_cheney.net
I'm always concerned about memory usage by the compiler/linker, but you shouldn't let that be ...
12 years, 3 months ago (2013-02-21 01:39:52 UTC) #6
rsc
LGTM We typically add new instructions to the end of the enumeration. Please move ALOCALS ...
12 years, 3 months ago (2013-02-21 02:37:29 UTC) #7
rsc
Please don't worry about the size of Sym in the linker. It's not the bottleneck ...
12 years, 3 months ago (2013-02-21 02:38:25 UTC) #8
cshapiro1
https://codereview.appspot.com/7399045/diff/9001/src/pkg/runtime/symtab.c File src/pkg/runtime/symtab.c (right): https://codereview.appspot.com/7399045/diff/9001/src/pkg/runtime/symtab.c#newcode132 src/pkg/runtime/symtab.c:132: func[nfunc-1].locals = sym->value/4; Gladly. Fixed.
12 years, 3 months ago (2013-02-21 20:47:29 UTC) #9
cshapiro
12 years, 3 months ago (2013-02-21 20:52:29 UTC) #10
*** Submitted as https://code.google.com/p/go/source/detail?r=ad69f53ba310 ***

cmd/5g, cmd/5l, cmd/6l, cmd/8l, cmd/gc, cmd/ld, runtime: accurate args and
locals information

Previously, the func structure contained an inaccurate value for
the args member and a 0 value for the locals member.

This change populates the func structure with args and locals
values computed by the compiler.  The number of args was
already available in the ATEXT instruction.  The number of
locals is now passed through in the new ALOCALS instruction.

This change also switches the unit of args and locals to be
bytes, just like the frame member, instead of 32-bit words.

R=golang-dev, bradfitz, cshapiro, dave, rsc
CC=golang-dev
https://codereview.appspot.com/7399045
Sign in to reply to this message.

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