mirror of
https://github.com/golang/go
synced 2024-10-05 18:21: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:
parent
f0393221a7
commit
9b88857f75
@ -278,7 +278,7 @@ func profilealloc(mp *m, x unsafe.Pointer, size uintptr) {
|
|||||||
// force = 1 - do GC regardless of current heap usage
|
// force = 1 - do GC regardless of current heap usage
|
||||||
// force = 2 - go GC and eager sweep
|
// force = 2 - go GC and eager sweep
|
||||||
func gogc(force int32) {
|
func gogc(force int32) {
|
||||||
if memstats.enablegc == 0 {
|
if GOARCH == "power64" || GOARCH == "power64le" || memstats.enablegc == 0 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1305,6 +1305,10 @@ runtime·gc(int32 force)
|
|||||||
if(!mstats.enablegc || g == g->m->g0 || g->m->locks > 0 || runtime·panicking)
|
if(!mstats.enablegc || g == g->m->g0 || g->m->locks > 0 || runtime·panicking)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(thechar == '9') {
|
||||||
|
runtime·gcpercent = -1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if(runtime·gcpercent == GcpercentUnknown) { // first time through
|
if(runtime·gcpercent == GcpercentUnknown) { // first time through
|
||||||
runtime·lock(&runtime·mheap);
|
runtime·lock(&runtime·mheap);
|
||||||
if(runtime·gcpercent == GcpercentUnknown)
|
if(runtime·gcpercent == GcpercentUnknown)
|
||||||
|
@ -76,7 +76,7 @@ enum {
|
|||||||
// The minimum stack segment size to allocate.
|
// The minimum stack segment size to allocate.
|
||||||
// If the amount needed for the splitting frame + StackExtra
|
// If the amount needed for the splitting frame + StackExtra
|
||||||
// is less than this number, the stack will have this size instead.
|
// is less than this number, the stack will have this size instead.
|
||||||
StackMin = 8192,
|
StackMin = 65536,
|
||||||
StackSystemRounded = StackSystem + (-StackSystem & (StackMin-1)),
|
StackSystemRounded = StackSystem + (-StackSystem & (StackMin-1)),
|
||||||
FixedStack = StackMin + StackSystemRounded,
|
FixedStack = StackMin + StackSystemRounded,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user