]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove unused moreframesize_minalloc field
authorDmitriy Vyukov <dvyukov@google.com>
Sat, 15 Jun 2013 12:02:39 +0000 (16:02 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Sat, 15 Jun 2013 12:02:39 +0000 (16:02 +0400)
It was used to request large stack segment for GC
when it was running not on g0.
Now GC is running on g0 with large stack,
and it is not needed anymore.

R=golang-dev, dave
CC=golang-dev
https://golang.org/cl/10242045

src/pkg/runtime/runtime.h
src/pkg/runtime/stack.c

index f004f1a42c828b9f74a94f78d13accdbb8dd8126..f62ee81de48e421a39383aa052d7fed628960627 100644 (file)
@@ -326,7 +326,6 @@ struct      M
        void*   racepc;
        void    (*waitunlockf)(Lock*);
        void*   waitlock;
-       uint32  moreframesize_minalloc;
 
        uintptr settype_buf[1024];
        uintptr settype_bufsize;
index a63e3b0c90d2bfb86990c92113afc9c07457ebd8..abfe0cfe43fcaf46a90944759b3b5cfa87563e9a 100644 (file)
@@ -173,7 +173,7 @@ runtime·oldstack(void)
 void
 runtime·newstack(void)
 {
-       int32 framesize, minalloc, argsize;
+       int32 framesize, argsize;
        Stktop *top;
        byte *stk;
        uintptr sp;
@@ -196,19 +196,11 @@ runtime·newstack(void)
                runtime·throw("runtime: stack split argsize");
        }
 
-       minalloc = 0;
        reflectcall = framesize==1;
-       if(reflectcall) {
+       if(reflectcall)
                framesize = 0;
-               // moreframesize_minalloc is only set in runtime·gc(),
-               // that calls newstack via reflect·call().
-               minalloc = m->moreframesize_minalloc;
-               m->moreframesize_minalloc = 0;
-               if(framesize < minalloc)
-                       framesize = minalloc;
-       }
 
-       if(reflectcall && minalloc == 0 && m->morebuf.sp - sizeof(Stktop) - argsize - 32 > gp->stackguard) {
+       if(reflectcall && m->morebuf.sp - sizeof(Stktop) - argsize - 32 > gp->stackguard) {
                // special case: called from reflect.call (framesize==1)
                // to call code with an arbitrary argument size,
                // and we have enough space on the current stack.