Update 'go tool pprof' options
This commit is contained in:
parent
5a5edf6914
commit
4dbdbd4f8b
79
src/_golang
79
src/_golang
|
|
@ -341,6 +341,18 @@ __go_fix_analyzers() {
|
|||
_values 'analyzer' $fix_analyzers
|
||||
}
|
||||
|
||||
__go_pprof_symbolize_types() {
|
||||
local -a symbolize_types=(
|
||||
"none[Do not attempt symbolization]"
|
||||
"local[Examine only local binaries]"
|
||||
"fastlocal[Only get function names from local binaries]"
|
||||
"remote[Do not examine local binaries]"
|
||||
"force[Force re-symbolization]"
|
||||
)
|
||||
|
||||
_values 'symbolize_type' $symbolize_types
|
||||
}
|
||||
|
||||
if [[ "$service" = -value-* ]]; then
|
||||
local env_variable=${${service%,-default-}#-value-,}
|
||||
# some special variables are not read from the environment
|
||||
|
|
@ -753,6 +765,7 @@ case $state in
|
|||
else
|
||||
_arguments \
|
||||
"-c[compile but don't run test]" \
|
||||
'-artifacts[save test artifacts in the directory specified by -outputdir]' \
|
||||
'-bench[run benchmarks matching the regular expression]:regexp' \
|
||||
'-benchmem[print memory allocation statistics for benchmarks]' \
|
||||
'-benchtime[run benchmarks for t rime]:t' \
|
||||
|
|
@ -1036,15 +1049,17 @@ case $state in
|
|||
':files:_files'
|
||||
;;
|
||||
|
||||
pprof)
|
||||
(pprof)
|
||||
_arguments \
|
||||
'-callgrind[outputs a graph in callgrind format]' \
|
||||
'-comments[output all profile comments]' \
|
||||
'-disasm=[output annotated assembly]:p' \
|
||||
'-dot[outputs a graph in DOT format]' \
|
||||
'-eog[visualize graph through eog]' \
|
||||
'-evince[visualize graph through evince]' \
|
||||
'-gif[outputs a graph image in GIF format]' \
|
||||
'-gv[visualize graph through gv]' \
|
||||
'-kcachegrind[visualize report in KCachegrind]' \
|
||||
'-list=[output annotated source for functions matching regexp]:p' \
|
||||
'-pdf[outputs a graph in PDF format]' \
|
||||
'-peek=[output callers/callees of functions matching regexp]:p' \
|
||||
|
|
@ -1056,23 +1071,61 @@ case $state in
|
|||
'-tags[outputs all tags in the profile]' \
|
||||
'-text[outputs top entries in text form]' \
|
||||
'-top[outputs top entries in text form]' \
|
||||
'-topproto[outputs top entries in compresses protobuf format]' \
|
||||
'-traces[outputs all profile samples in text form]' \
|
||||
'-tree[outputs a text rendering of call graph]' \
|
||||
'-web[visualize graph through web browser]' \
|
||||
'-weblist=[output annotated source in HTML]:p' \
|
||||
'-call_tree[generate a context-sensitive call tree]' \
|
||||
'-compact_labels[show minimal headers]' \
|
||||
'-divide_by=[scale all samples by dividing them by f]:f' \
|
||||
'-drop_negative[ignore negative differences]' \
|
||||
'-edgefraction=[hide edges below <f>*total]:f' \
|
||||
'-focus=[restricts to paths going through a node matching regexp]:r' \
|
||||
'-hide=[skips nodes matching regexp]:regexp' \
|
||||
'-ignore=[skips paths going through any nodes matching regexp]:r' \
|
||||
'-intel_syntax[show assembly in Intel syntax]' \
|
||||
'-mean[average sample value over first value]' \
|
||||
'-nodecount=[max number of nodes to show]:n' \
|
||||
'-nodefraction=[hide nodes below <f>*total]:f' \
|
||||
'-noinlines[ignore inlines]' \
|
||||
'-normalize[scales profile based on the base profile]' \
|
||||
'-output=[generate output on file f (stdout by default)]:f' \
|
||||
'-prune_from[drops any functions below the matched frame]' \
|
||||
'-relative_percentages[show percentages relative to focused subgraph]' \
|
||||
'-sample_index[index of sample value to display]' \
|
||||
'-show=[only show nodes matching regexp]:regexp' \
|
||||
'-show-from=[drops functions above the highest matched frame]:regexp' \
|
||||
'-show-columns[show column numbers at the source code line level]' \
|
||||
'-source_path=[search path for source files]:path:_files -/' \
|
||||
'-tagfocus=[restrict to samples tagged with key:value matching regexp]:r' \
|
||||
'-taghide=[skip tags matching this regexp]:regexp' \
|
||||
'-tagignore=[discard samples tagged with key:value matching regexp]:regexp' \
|
||||
'-tagleaf[add pseudo stack frames for labels key/value pairs at the callstack leaf]' \
|
||||
'-tagroot[add pseudo stack frames for labels key/value pairs at the callstack root]' \
|
||||
'-trim[honor nodefraction/edgefraction/nodecount defaults]' \
|
||||
'-trim_path[path to trim from source paths before search]:path:_files -/' \
|
||||
'-unit=[convert all samples to unit u for display]:u' \
|
||||
'-functions[report at function level (default)]' \
|
||||
'-filefunctions[aggregate at the file function level]' \
|
||||
'-files[report at source file level]' \
|
||||
'-lines[report at source line level]' \
|
||||
'-addresses[report at address level]' \
|
||||
'-base[show delta from this profile]:profile' \
|
||||
'-drop_negative[ignore negative differences]' \
|
||||
'-cum[sort by cumulative data]' \
|
||||
'-flat[sort entries based on own weight]' \
|
||||
'-seconds=[length of time for dynamic profiles]:n' \
|
||||
'-nodecount=[max number of nodes to show]:n' \
|
||||
'-nodefraction=[hide nodes below <f>*total]:f' \
|
||||
'-edgefraction=[hide edges below <f>*total]:f' \
|
||||
'-sample_index[index of sample value to display]' \
|
||||
'-mean[average sample value over first value]' \
|
||||
'-timeout=[timeout in seconds for profile collection]:seconds' \
|
||||
'-buildid=[override build id for main binary in profile]:id' \
|
||||
'-add_comment=[free-form annotation to add to the profile]:comment' \
|
||||
'-diff_base=[source of base profile for comparison]:source:_files' \
|
||||
'-base[show delta from this profile]:profile' \
|
||||
'-symbolize=[controls source of symbol information]:source:__go_pprof_symbolize_types' \
|
||||
'-tls_cert=[TLS client certificate file for fetchign profile and symbols]:file:_files' \
|
||||
'-tls_key=[TLS private key file for fetching profile and symbols]:file:_files' \
|
||||
'-tls_ca=[TLS CA certs file for fetching profile and symbols]:file:_files' \
|
||||
'-http=[provide web interface at host:port]:host_port' \
|
||||
'-no_browser[skip opening a browser for the interactive web UI]' \
|
||||
'-tools=[search path for object tools]:path:_files -/' \
|
||||
'-inuse_space[display in-use memory size]' \
|
||||
'-inuse_objects[display in-use object counts]' \
|
||||
'-alloc_space[display allocated memory size]' \
|
||||
|
|
@ -1080,16 +1133,6 @@ case $state in
|
|||
'-total_delay[display total delay at each region]' \
|
||||
'-contentions[display number of delays at each region]' \
|
||||
'-mean_delay[display mean delay at each region]' \
|
||||
'-runtime[show runtime call frames in memory profiles]' \
|
||||
'-focus=[restricts to paths going through a node matching regexp]:r' \
|
||||
'-ignore=[skips paths going through any nodes matching regexp]:r' \
|
||||
'-tagfocus=[restrict to samples tagged with key:value matching regexp]:r' \
|
||||
'-tagignore=[discard samples tagged with key:value matching regexp]' \
|
||||
'-call_tree[generate a context-sensitive call tree]' \
|
||||
'-unit=[convert all samples to unit u for display]:u' \
|
||||
'-divide_by=[scale all samples by dividing them by f]:f' \
|
||||
'-buildid=[override build id for main binary in profile]:id' \
|
||||
'-tools=[search path for object-level tools]:path' \
|
||||
'-help[help message]' \
|
||||
'*:files:_files'
|
||||
;;
|
||||
|
|
|
|||
Loading…
Reference in New Issue