GODEBUG completion

This commit is contained in:
Paul Seyfert 2020-03-04 16:11:02 +01:00
parent 78a4bdfa7b
commit 129f3f78d4
1 changed files with 29 additions and 1 deletions

View File

@ -59,6 +59,33 @@ __go_buildmodes() {
_values 'mode' $buildmodes _values 'mode' $buildmodes
} }
__go_runtimedebug() {
local -a vars
vars=(
'allocfreetrace[profile allocations]:boolean:(1 0)'
'clobberfree[clobber memory after free]:boolean:(1 0)'
'cgocheck[check passing go pointers to non-go]: :((0\:"no checks" 1\:"check checks" 2\:"expensive checks"))'
'efence[allocate on unique pages]:boolean:(1 0)'
"gccheckmark[verify garbage collector's concurrent mark phase]:boolean:(1 0)"
'gcpacertrace[print state of the concurrent pacer from garbage collector]:boolean:(1 0)'
'gcshrinkstackoff[disable moving goroutines to smaller stacks]:boolean:(1 0)'
'gcstoptheworld[disable concurrent garbage collection]: :((0\:default 1\:"disable concurrent garbage collection" 2\:"disable concurrent gc and sweeping"))'
'gctrace[emit memory collection and pause information from the garbage collector]:boolean:(1 0)'
'madvdontneed[use MADV_DONTNEED instead of MADV_FREE]:boolean:(1 0)'
'memprofilerate[every N-th allocation should be profiled]:int:'
'invalidptr[crash on invalid integers in pointer-type variables]:boolean:(1 0)'
'sbrk[replace memory allocator and garbage collector by trivial allocator]:boolean:(1 0)'
'scavenge[enable debugging mode of heap scavenger]:boolean:(1 0)'
'scavtrace[emit scavenger work information (memory returned and memory utilization)]:boolean:(1 0)'
'scheddetail[emit detailed states of scheduler, processors, threads, goroutines]:boolean:(1 0)'
'schedtrace[emmit scheduler state every N ms to stderr]:int'
'tracebackancestors[set ancestor goroutines to be printed in goroutine creation stacks]:int'
'asyncpreemptoff[disable signal-based asynchronous goroutine preemption.]:boolean:(1 0)'
)
_values -s ',' -S '=' "runtime debug behaviour" $vars[@]
}
__go_gcdebugflags() { __go_gcdebugflags() {
_values -s , -S = 'debug flag' \ _values -s , -S = 'debug flag' \
'append[print information about append compilation]' \ 'append[print information about append compilation]' \
@ -261,7 +288,7 @@ __go_envvarvals() {
;; ;;
# not implemented # not implemented
GODEBUG) GODEBUG)
_message "see 'go doc runtime'" __go_runtimedebug
;; ;;
GOFLAGS) GOFLAGS)
;& ;&
@ -380,6 +407,7 @@ case $state in
"GCCGO[gccgo command to run.]:gccgo command" "GCCGO[gccgo command to run.]:gccgo command"
"GOBIN[directory where 'go install' installs to]:go install target dir" "GOBIN[directory where 'go install' installs to]:go install target dir"
"GOCACHE[directory to store cached information]:go build cache dir" "GOCACHE[directory to store cached information]:go build cache dir"
"GODEBUG[enable runtime debug facilities]:runtime debug settings"
"GOENV[location of the go environment configuration file]:configuration file" "GOENV[location of the go environment configuration file]:configuration file"
"GOFLAGS[default go command line flags]:space sparated default command line flags" "GOFLAGS[default go command line flags]:space sparated default command line flags"
"GOINSECURE[module prefixes that are feched insecurely]:comma separated module prefixes" "GOINSECURE[module prefixes that are feched insecurely]:comma separated module prefixes"