FAQ
Reviewers: golang-dev1,

Message:
Hello golang-dev@googlegroups.com,

I'd like you to review this change to
https://code.google.com/p/go/


Description:
cmd/5l, cmd/6l, cmd/8l, cmd/gc, runtime: generate and use bitmaps of
argument pointer locations

Please review this at https://codereview.appspot.com/9223046/

Affected files:
    M src/cmd/5l/5.out.h
    M src/cmd/5l/l.h
    M src/cmd/5l/obj.c
    M src/cmd/6l/6.out.h
    M src/cmd/6l/l.h
    M src/cmd/6l/obj.c
    M src/cmd/6l/optab.c
    M src/cmd/8l/8.out.h
    M src/cmd/8l/l.h
    M src/cmd/8l/obj.c
    M src/cmd/8l/optab.c
    A src/cmd/gc/bv.c
    M src/cmd/gc/go.h
    M src/cmd/gc/pgen.c
    M src/cmd/ld/lib.c
    M src/pkg/runtime/mgc0.c
    M src/pkg/runtime/runtime.h
    M src/pkg/runtime/symtab.c


--

---
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Brad Fitzpatrick at May 8, 2013 at 3:35 am
    Impressive code/test ratio!

    Update Issue nnnn?

    Does this make anything better which you can demonstrate with some Go code?


    On Tue, May 7, 2013 at 7:22 PM, wrote:

    Reviewers: golang-dev1,

    Message:
    Hello golang-dev@googlegroups.com,

    I'd like you to review this change to
    https://code.google.com/p/go/


    Description:
    cmd/5l, cmd/6l, cmd/8l, cmd/gc, runtime: generate and use bitmaps of
    argument pointer locations

    Please review this at https://codereview.appspot.**com/9223046/<https://codereview.appspot.com/9223046/>

    Affected files:
    M src/cmd/5l/5.out.h
    M src/cmd/5l/l.h
    M src/cmd/5l/obj.c
    M src/cmd/6l/6.out.h
    M src/cmd/6l/l.h
    M src/cmd/6l/obj.c
    M src/cmd/6l/optab.c
    M src/cmd/8l/8.out.h
    M src/cmd/8l/l.h
    M src/cmd/8l/obj.c
    M src/cmd/8l/optab.c
    A src/cmd/gc/bv.c
    M src/cmd/gc/go.h
    M src/cmd/gc/pgen.c
    M src/cmd/ld/lib.c
    M src/pkg/runtime/mgc0.c
    M src/pkg/runtime/runtime.h
    M src/pkg/runtime/symtab.c


    --

    ---You received this message because you are subscribed to the Google
    Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-dev+unsubscribe@**googlegroups.com<golang-dev%2Bunsubscribe@googlegroups.com>
    .
    For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
    .

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Carl Shapiro at May 8, 2013 at 5:08 am
    I will update the change description with the relevant issue.

    This infrastructure is currently hidden behind a disabled flag so it should
    have no effect. When the flag is enabled there are pointers ignored that
    would otherwise be scanned. However, it is hard to quantify how much this
    "helps" as even with this change locations in the out area are scanned
    before they are initialized. At the moment, the benefit is largely a
    function of how many garbage values are hanging around on your stack.

    A forthcoming change will extend the bitmap to cover all locals and be
    liveness precise. That is when we will see a real benefit. It will also
    be much easier to empirically validate correctness.
    On Tue, May 7, 2013 at 8:35 PM, Brad Fitzpatrick wrote:

    Impressive code/test ratio!

    Update Issue nnnn?

    Does this make anything better which you can demonstrate with some Go code?


    On Tue, May 7, 2013 at 7:22 PM, wrote:

    Reviewers: golang-dev1,

    Message:
    Hello golang-dev@googlegroups.com,

    I'd like you to review this change to
    https://code.google.com/p/go/


    Description:
    cmd/5l, cmd/6l, cmd/8l, cmd/gc, runtime: generate and use bitmaps of
    argument pointer locations

    Please review this at https://codereview.appspot.**com/9223046/<https://codereview.appspot.com/9223046/>

    Affected files:
    M src/cmd/5l/5.out.h
    M src/cmd/5l/l.h
    M src/cmd/5l/obj.c
    M src/cmd/6l/6.out.h
    M src/cmd/6l/l.h
    M src/cmd/6l/obj.c
    M src/cmd/6l/optab.c
    M src/cmd/8l/8.out.h
    M src/cmd/8l/l.h
    M src/cmd/8l/obj.c
    M src/cmd/8l/optab.c
    A src/cmd/gc/bv.c
    M src/cmd/gc/go.h
    M src/cmd/gc/pgen.c
    M src/cmd/ld/lib.c
    M src/pkg/runtime/mgc0.c
    M src/pkg/runtime/runtime.h
    M src/pkg/runtime/symtab.c


    --

    ---You received this message because you are subscribed to the Google
    Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-dev+unsubscribe@**googlegroups.com<golang-dev%2Bunsubscribe@googlegroups.com>
    .
    For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
    .

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Brad Fitzpatrick at May 8, 2013 at 5:12 am
    Cool, thanks for the background. Putting some of that in the issue and/or
    CL description would be helpful.


    On Tue, May 7, 2013 at 10:08 PM, Carl Shapiro wrote:

    I will update the change description with the relevant issue.

    This infrastructure is currently hidden behind a disabled flag so it
    should have no effect. When the flag is enabled there are pointers ignored
    that would otherwise be scanned. However, it is hard to quantify how much
    this "helps" as even with this change locations in the out area are scanned
    before they are initialized. At the moment, the benefit is largely a
    function of how many garbage values are hanging around on your stack.

    A forthcoming change will extend the bitmap to cover all locals and be
    liveness precise. That is when we will see a real benefit. It will also
    be much easier to empirically validate correctness.
    On Tue, May 7, 2013 at 8:35 PM, Brad Fitzpatrick wrote:

    Impressive code/test ratio!

    Update Issue nnnn?

    Does this make anything better which you can demonstrate with some Go
    code?


    On Tue, May 7, 2013 at 7:22 PM, wrote:

    Reviewers: golang-dev1,

    Message:
    Hello golang-dev@googlegroups.com,

    I'd like you to review this change to
    https://code.google.com/p/go/


    Description:
    cmd/5l, cmd/6l, cmd/8l, cmd/gc, runtime: generate and use bitmaps of
    argument pointer locations

    Please review this at https://codereview.appspot.**com/9223046/<https://codereview.appspot.com/9223046/>

    Affected files:
    M src/cmd/5l/5.out.h
    M src/cmd/5l/l.h
    M src/cmd/5l/obj.c
    M src/cmd/6l/6.out.h
    M src/cmd/6l/l.h
    M src/cmd/6l/obj.c
    M src/cmd/6l/optab.c
    M src/cmd/8l/8.out.h
    M src/cmd/8l/l.h
    M src/cmd/8l/obj.c
    M src/cmd/8l/optab.c
    A src/cmd/gc/bv.c
    M src/cmd/gc/go.h
    M src/cmd/gc/pgen.c
    M src/cmd/ld/lib.c
    M src/pkg/runtime/mgc0.c
    M src/pkg/runtime/runtime.h
    M src/pkg/runtime/symtab.c


    --

    ---You received this message because you are subscribed to the Google
    Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to golang-dev+unsubscribe@**googlegroups.com<golang-dev%2Bunsubscribe@googlegroups.com>
    .
    For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
    .

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Carl Shapiro at May 8, 2013 at 5:28 am
    Will do. Thanks.

    On Tue, May 7, 2013 at 10:11 PM, Brad Fitzpatrick wrote:

    Cool, thanks for the background. Putting some of that in the issue and/or
    CL description would be helpful.


    On Tue, May 7, 2013 at 10:08 PM, Carl Shapiro wrote:

    I will update the change description with the relevant issue.

    This infrastructure is currently hidden behind a disabled flag so it
    should have no effect. When the flag is enabled there are pointers ignored
    that would otherwise be scanned. However, it is hard to quantify how much
    this "helps" as even with this change locations in the out area are scanned
    before they are initialized. At the moment, the benefit is largely a
    function of how many garbage values are hanging around on your stack.

    A forthcoming change will extend the bitmap to cover all locals and be
    liveness precise. That is when we will see a real benefit. It will also
    be much easier to empirically validate correctness.
    On Tue, May 7, 2013 at 8:35 PM, Brad Fitzpatrick wrote:

    Impressive code/test ratio!

    Update Issue nnnn?

    Does this make anything better which you can demonstrate with some Go
    code?


    On Tue, May 7, 2013 at 7:22 PM, wrote:

    Reviewers: golang-dev1,

    Message:
    Hello golang-dev@googlegroups.com,

    I'd like you to review this change to
    https://code.google.com/p/go/


    Description:
    cmd/5l, cmd/6l, cmd/8l, cmd/gc, runtime: generate and use bitmaps of
    argument pointer locations

    Please review this at https://codereview.appspot.**com/9223046/<https://codereview.appspot.com/9223046/>

    Affected files:
    M src/cmd/5l/5.out.h
    M src/cmd/5l/l.h
    M src/cmd/5l/obj.c
    M src/cmd/6l/6.out.h
    M src/cmd/6l/l.h
    M src/cmd/6l/obj.c
    M src/cmd/6l/optab.c
    M src/cmd/8l/8.out.h
    M src/cmd/8l/l.h
    M src/cmd/8l/obj.c
    M src/cmd/8l/optab.c
    A src/cmd/gc/bv.c
    M src/cmd/gc/go.h
    M src/cmd/gc/pgen.c
    M src/cmd/ld/lib.c
    M src/pkg/runtime/mgc0.c
    M src/pkg/runtime/runtime.h
    M src/pkg/runtime/symtab.c


    --

    ---You received this message because you are subscribed to the Google
    Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to golang-dev+unsubscribe@**googlegroups.com<golang-dev%2Bunsubscribe@googlegroups.com>
    .
    For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
    .

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Daniel Morsing at May 8, 2013 at 9:04 am
    https://codereview.appspot.com/9223046/diff/8001/src/cmd/gc/pgen.c
    File src/cmd/gc/pgen.c (right):

    https://codereview.appspot.com/9223046/diff/8001/src/cmd/gc/pgen.c#newcode283
    src/cmd/gc/pgen.c:283: stackmap(Node *fn)
    With the addition of the TYPE instruction, it should be possible to do
    this entirely in the linker, without having to deal with which fields
    are inargs or outargs. It is also done after allocauto, so the final
    locations of the stack variables will also be determined.

    The compiler will have to be modified to put out liveness info at some
    point, but might as well build on the stuff that's already there.

    https://codereview.appspot.com/9223046/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Dvyukov at May 8, 2013 at 6:14 pm
    https://codereview.appspot.com/9223046/diff/8001/src/pkg/runtime/symtab.c
    File src/pkg/runtime/symtab.c (right):

    https://codereview.appspot.com/9223046/diff/8001/src/pkg/runtime/symtab.c#newcode239
    src/pkg/runtime/symtab.c:239: fgc[nfunc-1] =
    runtime·mallocgc(sym->value*sizeof(*fgc), FlagNoPointers, 0, 1);
    is it meant to be sizeof(**fgc)?

    https://codereview.appspot.com/9223046/diff/8001/src/pkg/runtime/symtab.c#newcode239
    src/pkg/runtime/symtab.c:239: fgc[nfunc-1] =
    runtime·mallocgc(sym->value*sizeof(*fgc), FlagNoPointers, 0, 1);
    I am a bit concerned about lots of small and markable allocations.
    How many can be there?
    Can we allocate it from a big FlagNoGC buffer or construct statically?

    https://codereview.appspot.com/9223046/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Cshapiro at May 8, 2013 at 6:25 pm
    https://codereview.appspot.com/9223046/diff/8001/src/cmd/gc/pgen.c
    File src/cmd/gc/pgen.c (right):

    https://codereview.appspot.com/9223046/diff/8001/src/cmd/gc/pgen.c#newcode283
    src/cmd/gc/pgen.c:283: stackmap(Node *fn)
    I started out trying to implement this at link time. It turned out to
    be more difficult than I had hoped. Many of the data structured needed
    (for example, the type information data structures) are not readily
    available at link time. I could unpack all of the information being
    sent to the linker, but that turned out to be a lot more work than I
    would have liked.

    Right now I am just generating information for the argument list but my
    next change will be adding information for locals. It looks like the
    same data structure will be used for locals and for the argument list
    and its simpler to compute it all at once. Doing that work at link time
    would require recomputing a lot of state available at compile time and
    teaching the linker about data structures known to the compiler.

    https://codereview.appspot.com/9223046/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Cshapiro at May 8, 2013 at 6:30 pm
    https://codereview.appspot.com/9223046/diff/8001/src/pkg/runtime/symtab.c
    File src/pkg/runtime/symtab.c (right):

    https://codereview.appspot.com/9223046/diff/8001/src/pkg/runtime/symtab.c#newcode239
    src/pkg/runtime/symtab.c:239: fgc[nfunc-1] =
    runtime·mallocgc(sym->value*sizeof(*fgc), FlagNoPointers, 0, 1);
    Yes, that is my near-term plan.

    This information should be suitable for allocation in a read only
    segment of the executable. Moreoever, I expect there to be a lot of
    repeated data and some space will be saved through coalescing.

    I am defering any effort to efficiently store this until I have
    finalized the representation of the pointer descriptions. I keep
    discovering corner cases that influence how things should be done.

    In the mean time, if you think it would be helpful, I can put a TODO
    here.

    https://codereview.appspot.com/9223046/diff/8001/src/pkg/runtime/symtab.c#newcode239
    src/pkg/runtime/symtab.c:239: fgc[nfunc-1] =
    runtime·mallocgc(sym->value*sizeof(*fgc), FlagNoPointers, 0, 1);
    Yes, you are right. I'll fix that shortly.

    https://codereview.appspot.com/9223046/

    --

    ---
    You received this message because you are subscribed to the Google Groups "golang-dev" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-dev+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedMay 8, '13 at 2:22a
activeMay 8, '13 at 6:30p
posts9
users4
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase