diff options
| author | Dmitriy Vyukov <dvyukov@google.com> | 2013-06-28 18:37:06 +0400 |
|---|---|---|
| committer | Dmitriy Vyukov <dvyukov@google.com> | 2013-06-28 18:37:06 +0400 |
| commit | 4b536a550f1a9edd7be5c777dfb5eb906320eb89 (patch) | |
| tree | b372383d0e4c6b715a2baf475d68391f40d1a652 /src/pkg/runtime/runtime.h | |
| parent | 1e112cd59f560129f4dca5e9af7c3cbc445850b6 (diff) | |
| download | go-4b536a550f1a9edd7be5c777dfb5eb906320eb89.tar.xz | |
runtime: introduce GODEBUG env var
Currently it replaces GOGCTRACE env var (GODEBUG=gctrace=1).
The plan is to extend it with other type of debug tracing,
e.g. GODEBUG=gctrace=1,schedtrace=100.
R=rsc
CC=bradfitz, daniel.morsing, gobot, golang-dev
https://golang.org/cl/10026045
Diffstat (limited to 'src/pkg/runtime/runtime.h')
| -rw-r--r-- | src/pkg/runtime/runtime.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h index 8b3f10f945..6c590be633 100644 --- a/src/pkg/runtime/runtime.h +++ b/src/pkg/runtime/runtime.h @@ -86,6 +86,7 @@ typedef struct ParFor ParFor; typedef struct ParForThread ParForThread; typedef struct CgoMal CgoMal; typedef struct PollDesc PollDesc; +typedef struct DebugVars DebugVars; /* * Per-CPU declaration. @@ -525,6 +526,12 @@ struct CgoMal void *alloc; }; +// Holds variables parsed from GODEBUG env var. +struct DebugVars +{ + int32 gctrace; +}; + /* * defined macros * you need super-gopher-guru privilege @@ -702,6 +709,7 @@ extern uint32 runtime·maxstring; extern uint32 runtime·Hchansize; extern uint32 runtime·cpuid_ecx; extern uint32 runtime·cpuid_edx; +extern DebugVars runtime·debug; /* * common functions and data @@ -841,6 +849,7 @@ int32 runtime·netpollopen(uintptr, PollDesc*); int32 runtime·netpollclose(uintptr); void runtime·netpollready(G**, PollDesc*, int32); void runtime·crash(void); +void runtime·parsedebugvars(void); void _rt0_go(void); #pragma varargck argpos runtime·printf 1 |
