]> Cypherpunks repositories - gostls13.git/commit
runtime: cache gotraceback setting
authorRuss Cox <rsc@golang.org>
Wed, 9 Apr 2014 02:35:41 +0000 (22:35 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 9 Apr 2014 02:35:41 +0000 (22:35 -0400)
commit5556bfa9c736f63ae18ec0ab8ef9b6a986e32ef3
treedb94514c23e3f92f702bfd5471c828018d5c0457
parentb3a33a654d2f640f3b6c7856ea742c23f6c49d1c
runtime: cache gotraceback setting

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
src/pkg/runtime/proc.c
src/pkg/runtime/runtime.c