1
0
mirror of https://github.com/golang/go synced 2024-10-05 16:31:21 -06:00

[dev.power64] runtime: disable GC and use a larger default stack

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/128120043
This commit is contained in:
Shenghou Ma 2014-08-12 22:28:25 -04:00
parent f0393221a7
commit 9b88857f75
3 changed files with 6 additions and 2 deletions

View 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
}

View 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)

View 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,