FAQ
I'd like to understand more about how and where the automatic pre-emption
checks (those that are messing up gdb stepping;
http://code.google.com/p/go/issues/detail?id=6776 ) get inserted.

Would someone be so kind as to point to where I can find the source code
for the insertion mechanism? I'd like to omitting such insertions for a
moment -- on my local copy of go -- so as to get sane gdb behavior back. I
only have a single goroutine anyway.

Thanks.

- J

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

Search Discussions

  • Dmitry Vyukov at Dec 16, 2013 at 8:53 am
    Preemption checks are combined with split stack check.
    You can find them in e.g. src/cmd/6l/pass.c in dostkoff().
    But if you remove them, you will break split stacks as well.

    You can disable preemption by commenting out:
             gp->preempt = true;
             gp->stackguard0 = StackPreempt;
    in src/pkg/runtime/proc.c in preemptone().

    On Mon, Dec 16, 2013 at 12:25 PM, Jason E. Aten wrote:
    I'd like to understand more about how and where the automatic pre-emption
    checks (those that are messing up gdb stepping;
    http://code.google.com/p/go/issues/detail?id=6776 ) get inserted.

    Would someone be so kind as to point to where I can find the source code for
    the insertion mechanism? I'd like to omitting such insertions for a moment
    -- on my local copy of go -- so as to get sane gdb behavior back. I only
    have a single goroutine anyway.

    Thanks.

    - J

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jason E. Aten at Dec 16, 2013 at 9:05 am
    Thanks Dmitry.

    On Mon, Dec 16, 2013 at 12:53 AM, Dmitry Vyukov wrote:

    Preemption checks are combined with split stack check.
    You can find them in e.g. src/cmd/6l/pass.c in dostkoff().
    But if you remove them, you will break split stacks as well.

    You can disable preemption by commenting out:
    gp->preempt = true;
    gp->stackguard0 = StackPreempt;
    in src/pkg/runtime/proc.c in preemptone().

    On Mon, Dec 16, 2013 at 12:25 PM, Jason E. Aten wrote:
    I'd like to understand more about how and where the automatic pre-emption
    checks (those that are messing up gdb stepping;
    http://code.google.com/p/go/issues/detail?id=6776 ) get inserted.

    Would someone be so kind as to point to where I can find the source code for
    the insertion mechanism? I'd like to omitting such insertions for a moment
    -- on my local copy of go -- so as to get sane gdb behavior back. I only
    have a single goroutine anyway.

    Thanks.

    - J

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Keith Randall at Dec 17, 2013 at 9:20 pm
    You can get by without split stacks if you set the initial stack large
    enough. Set src/pkg/runtime/stack.h:StackMin to whatever you want.

    Then you could get rid of the stack check preamble in
    src/liblink/obj{5,6,8}.c:addstacksplit.
    On Monday, December 16, 2013 1:05:32 AM UTC-8, Jason E. Aten wrote:

    Thanks Dmitry.


    On Mon, Dec 16, 2013 at 12:53 AM, Dmitry Vyukov <dvy...@google.com<javascript:>
    wrote:
    Preemption checks are combined with split stack check.
    You can find them in e.g. src/cmd/6l/pass.c in dostkoff().
    But if you remove them, you will break split stacks as well.

    You can disable preemption by commenting out:
    gp->preempt = true;
    gp->stackguard0 = StackPreempt;
    in src/pkg/runtime/proc.c in preemptone().


    On Mon, Dec 16, 2013 at 12:25 PM, Jason E. Aten <j.e....@gmail.com<javascript:>>
    wrote:
    I'd like to understand more about how and where the automatic
    pre-emption
    checks (those that are messing up gdb stepping;
    http://code.google.com/p/go/issues/detail?id=6776 ) get inserted.

    Would someone be so kind as to point to where I can find the source code for
    the insertion mechanism? I'd like to omitting such insertions for a moment
    -- on my local copy of go -- so as to get sane gdb behavior back. I only
    have a single goroutine anyway.

    Thanks.

    - J

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jason E. Aten at Dec 17, 2013 at 10:25 pm
    Nice. Thanks Keith.

    On Tue, Dec 17, 2013 at 1:20 PM, Keith Randall wrote:

    You can get by without split stacks if you set the initial stack large
    enough. Set src/pkg/runtime/stack.h:StackMin to whatever you want.

    Then you could get rid of the stack check preamble in
    src/liblink/obj{5,6,8}.c:addstacksplit.
    On Monday, December 16, 2013 1:05:32 AM UTC-8, Jason E. Aten wrote:

    Thanks Dmitry.

    On Mon, Dec 16, 2013 at 12:53 AM, Dmitry Vyukov wrote:

    Preemption checks are combined with split stack check.
    You can find them in e.g. src/cmd/6l/pass.c in dostkoff().
    But if you remove them, you will break split stacks as well.

    You can disable preemption by commenting out:
    gp->preempt = true;
    gp->stackguard0 = StackPreempt;
    in src/pkg/runtime/proc.c in preemptone().


    On Mon, Dec 16, 2013 at 12:25 PM, Jason E. Aten <j.e....@gmail.com>
    wrote:
    I'd like to understand more about how and where the automatic
    pre-emption
    checks (those that are messing up gdb stepping;
    http://code.google.com/p/go/issues/detail?id=6776 ) get inserted.

    Would someone be so kind as to point to where I can find the source code for
    the insertion mechanism? I'd like to omitting such insertions for a moment
    -- on my local copy of go -- so as to get sane gdb behavior back. I only
    have a single goroutine anyway.

    Thanks.

    - J

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts...@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to a topic in the
    Google Groups "golang-nuts" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/golang-nuts/5v-gldgsoJk/unsubscribe.
    To unsubscribe from this group and all its topics, send an email to
    golang-nuts+unsubscribe@googlegroups.com.

    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Dave Cheney at Dec 17, 2013 at 10:26 pm
    Would you please report back with some benchmark results after modifying you go install.

    Cheers

    Dave
    On 18 Dec 2013, at 9:24, "Jason E. Aten" wrote:

    Nice. Thanks Keith.

    On Tue, Dec 17, 2013 at 1:20 PM, Keith Randall wrote:
    You can get by without split stacks if you set the initial stack large enough. Set src/pkg/runtime/stack.h:StackMin to whatever you want.

    Then you could get rid of the stack check preamble in src/liblink/obj{5,6,8}.c:addstacksplit.
    On Monday, December 16, 2013 1:05:32 AM UTC-8, Jason E. Aten wrote:
    Thanks Dmitry.

    On Mon, Dec 16, 2013 at 12:53 AM, Dmitry Vyukov wrote:
    Preemption checks are combined with split stack check.
    You can find them in e.g. src/cmd/6l/pass.c in dostkoff().
    But if you remove them, you will break split stacks as well.

    You can disable preemption by commenting out:
    gp->preempt = true;
    gp->stackguard0 = StackPreempt;
    in src/pkg/runtime/proc.c in preemptone().

    On Mon, Dec 16, 2013 at 12:25 PM, Jason E. Aten wrote:
    I'd like to understand more about how and where the automatic pre-emption
    checks (those that are messing up gdb stepping;
    http://code.google.com/p/go/issues/detail?id=6776 ) get inserted.

    Would someone be so kind as to point to where I can find the source code for
    the insertion mechanism? I'd like to omitting such insertions for a moment
    -- on my local copy of go -- so as to get sane gdb behavior back. I only
    have a single goroutine anyway.

    Thanks.

    - J

    --
    You received this message because you are subscribed to the Google Groups
    "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to golang-nuts...@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
    To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/5v-gldgsoJk/unsubscribe.
    To unsubscribe from this group and all its topics, send an email to golang-nuts+unsubscribe@googlegroups.com.

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedDec 16, '13 at 8:25a
activeDec 17, '13 at 10:26p
posts6
users4
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase