FAQ
Reviewers: golang-dev_googlegroups.com,

Message:
Hello golang-dev@googlegroups.com,

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


Description:
runtime: mark race instrumentation callbacks as nosplitstack
It speedups the race detector somewhat, but also prevents
getcallerpc() from obtaining lessstack().

Please review this at http://codereview.appspot.com/6812091/

Affected files:
M src/pkg/runtime/race.c


Index: src/pkg/runtime/race.c
===================================================================
--- a/src/pkg/runtime/race.c
+++ b/src/pkg/runtime/race.c
@@ -47,6 +47,8 @@
}

// Called from instrumented code.
+// If we split stack, getcallerpc() can return runtime·lessstack().
+#pragma textflag 7
void
runtime·racewrite(uintptr addr)
{
@@ -58,6 +60,8 @@
}

// Called from instrumented code.
+// If we split stack, getcallerpc() can return runtime·lessstack().
+#pragma textflag 7
void
runtime·raceread(uintptr addr)
{
@@ -69,6 +73,7 @@
}

// Called from instrumented code.
+#pragma textflag 7
void
runtime·racefuncenter(uintptr pc)
{
@@ -83,6 +88,7 @@
}

// Called from instrumented code.
+#pragma textflag 7
void
runtime·racefuncexit(void)
{

Search Discussions

  • Ian Lance Taylor at Nov 6, 2012 at 4:52 pm
    LGTM
    On Tue, Nov 6, 2012 at 8:35 AM, wrote:
    Reviewers: golang-dev_googlegroups.com,

    Message:
    Hello golang-dev@googlegroups.com,

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


    Description:
    runtime: mark race instrumentation callbacks as nosplitstack
    It speedups the race detector somewhat, but also prevents
    getcallerpc() from obtaining lessstack().

    Please review this at http://codereview.appspot.com/6812091/

    Affected files:
    M src/pkg/runtime/race.c


    Index: src/pkg/runtime/race.c
    ===================================================================
    --- a/src/pkg/runtime/race.c
    +++ b/src/pkg/runtime/race.c
    @@ -47,6 +47,8 @@
    }

    // Called from instrumented code.
    +// If we split stack, getcallerpc() can return runtime·lessstack().
    +#pragma textflag 7
    void
    runtime·racewrite(uintptr addr)
    {
    @@ -58,6 +60,8 @@
    }

    // Called from instrumented code.
    +// If we split stack, getcallerpc() can return runtime·lessstack().
    +#pragma textflag 7
    void
    runtime·raceread(uintptr addr)
    {
    @@ -69,6 +73,7 @@
    }

    // Called from instrumented code.
    +#pragma textflag 7
    void
    runtime·racefuncenter(uintptr pc)
    {
    @@ -83,6 +88,7 @@
    }

    // Called from instrumented code.
    +#pragma textflag 7
    void
    runtime·racefuncexit(void)
    {
  • Dvyukov at Nov 6, 2012 at 4:55 pm
    *** Submitted as
    http://code.google.com/p/go/source/detail?r=9fd632db8de2 ***

    runtime: mark race instrumentation callbacks as nosplitstack
    It speedups the race detector somewhat, but also prevents
    getcallerpc() from obtaining lessstack().

    R=golang-dev, iant
    CC=golang-dev
    http://codereview.appspot.com/6812091


    http://codereview.appspot.com/6812091/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedNov 6, '12 at 4:35p
activeNov 6, '12 at 4:55p
posts3
users2
websitegolang.org

2 users in discussion

Dvyukov: 2 posts Ian Lance Taylor: 1 post

People

Translate

site design / logo © 2022 Grokbase