• Russ Cox's avatar
    runtime: cache gotraceback setting · 5556bfa9
    Russ Cox authored
    On Plan 9 gotraceback calls getenv calls malloc, and we gotraceback
    on every call to gentraceback, which happens during garbage collection.
    Honestly I don't even know how this works on Plan 9.
    I suspect it does not, and that we are getting by because
    no one has tried to run with $GOTRACEBACK set at all.
    
    This will speed up all the other systems by epsilon, since they
    won't call getenv and atoi repeatedly.
    
    LGTM=bradfitz
    R=golang-codereviews, bradfitz, 0intro
    CC=golang-codereviews
    https://golang.org/cl/85430046
    5556bfa9
proc.c 81.3 KB