1
0
mirror of https://github.com/golang/go synced 2024-11-22 18:44:54 -07:00

runtime: remove unused moreframesize_minalloc field

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
This commit is contained in:
Dmitriy Vyukov 2013-06-15 16:02:39 +04:00
parent 8f6341d9ee
commit 5caf762457
2 changed files with 3 additions and 12 deletions

View File

@ -326,7 +326,6 @@ struct M
void* racepc; void* racepc;
void (*waitunlockf)(Lock*); void (*waitunlockf)(Lock*);
void* waitlock; void* waitlock;
uint32 moreframesize_minalloc;
uintptr settype_buf[1024]; uintptr settype_buf[1024];
uintptr settype_bufsize; uintptr settype_bufsize;

View File

@ -173,7 +173,7 @@ runtime·oldstack(void)
void void
runtime·newstack(void) runtime·newstack(void)
{ {
int32 framesize, minalloc, argsize; int32 framesize, argsize;
Stktop *top; Stktop *top;
byte *stk; byte *stk;
uintptr sp; uintptr sp;
@ -196,19 +196,11 @@ runtime·newstack(void)
runtime·throw("runtime: stack split argsize"); runtime·throw("runtime: stack split argsize");
} }
minalloc = 0;
reflectcall = framesize==1; reflectcall = framesize==1;
if(reflectcall) { if(reflectcall)
framesize = 0; 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) // special case: called from reflect.call (framesize==1)
// to call code with an arbitrary argument size, // to call code with an arbitrary argument size,
// and we have enough space on the current stack. // and we have enough space on the current stack.