]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.power64] runtime: disable GC and use a larger default stack
authorShenghou Ma <minux@golang.org>
Wed, 13 Aug 2014 02:28:25 +0000 (22:28 -0400)
committerShenghou Ma <minux@golang.org>
Wed, 13 Aug 2014 02:28:25 +0000 (22:28 -0400)
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/128120043

src/pkg/runtime/malloc.go
src/pkg/runtime/mgc0.c
src/pkg/runtime/stack.h

index dedcea94a6f12ea54fe6ce567bb2c989772fb9fc..68baa80d52e02e154974ca87dff44f5f127bfcd0 100644 (file)
@@ -278,7 +278,7 @@ func profilealloc(mp *m, x unsafe.Pointer, size uintptr) {
 // force = 1 - do GC regardless of current heap usage
 // force = 2 - go GC and eager sweep
 func gogc(force int32) {
-       if memstats.enablegc == 0 {
+       if GOARCH == "power64" || GOARCH == "power64le" || memstats.enablegc == 0 {
                return
        }
 
index e7955151ce09a75a52e4ff2ec75087763836c1b9..03622db2834cad0d711b0285be02a2e6964b86ec 100644 (file)
@@ -1305,6 +1305,10 @@ runtime·gc(int32 force)
        if(!mstats.enablegc || g == g->m->g0 || g->m->locks > 0 || runtime·panicking)
                return;
 
+       if(thechar == '9') {
+               runtime·gcpercent = -1;
+               return;
+       }
        if(runtime·gcpercent == GcpercentUnknown) {    // first time through
                runtime·lock(&runtime·mheap);
                if(runtime·gcpercent == GcpercentUnknown)
index ee5fd351d5f8281d7fc8634ee3ea9897667ef1dd..64d377754f5573302414ca24fffc16cdeb9e6488 100644 (file)
@@ -76,7 +76,7 @@ enum {
        // The minimum stack segment size to allocate.
        // If the amount needed for the splitting frame + StackExtra
        // is less than this number, the stack will have this size instead.
-       StackMin = 8192,
+       StackMin = 65536,
        StackSystemRounded = StackSystem + (-StackSystem & (StackMin-1)),
        FixedStack = StackMin + StackSystemRounded,