summaryrefslogtreecommitdiffstats
path: root/Completion/Solaris/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Solaris/Command')
-rw-r--r--Completion/Solaris/Command/_dtrace187
1 files changed, 149 insertions, 38 deletions
diff --git a/Completion/Solaris/Command/_dtrace b/Completion/Solaris/Command/_dtrace
index a095589eb..6a6636af3 100644
--- a/Completion/Solaris/Command/_dtrace
+++ b/Completion/Solaris/Command/_dtrace
@@ -1,41 +1,152 @@
#compdef dtrace
-# Synced with Nevada build 160 man pages
-_dtrace() {
- _arguments -s \
- '-32[generate 32-bit D programs and ELF files]' \
- '-64[generate 64-bit D programs and ELF files]' \
- '-a[claim anonymous tracing state]' \
- '-A[generate driver.conf(4) directives for anonymous tracing]' \
- '-b[set trace buffer size]' \
- '-c[run specified command and exit upon its completion]' \
- '-C[run cpp(1) preprocessor on script files]' \
- '-D[define symbol when invoking preprocessor]' \
- '-e[exit after compiling request but prior to enabling probes]' \
- '-f[enable or list probes matching the specified function name]:function: ' \
- '-F[coalesce trace output by function]' \
- '-G[generate an ELF file containing embedded dtrace program]' \
- '-H[print included files when invoking preprocessor]' \
- '-h[Generate a header file]' \
- '-i[enable or list probes matching the specified probe id]' \
- '-I[add include directory to preprocessor search path]:include dir:_files -/' \
- '-L[Add directory to search path for DTrace libraries]:lib dir:_files -/' \
- '-l[list probes matching specified criteria]' \
- '-m[enable or list probes matching the specified module name]:module: ' \
- '-n[enable or list probes matching the specified probe name]:name: ' \
- '-o[set output file]:output file:_files' \
- '-p[grab specified process-ID and cache its symbol tables]:pid:_pids' \
- '-P[enable or list probes matching the specified provider name]:provider: ' \
- '-q[set quiet mode (only output explicitly traced data)]' \
- '-s[enable or list probes according to the specified D script]' \
- '-S[print D compiler intermediate code]' \
- '-U[undefine symbol when invoking preprocessor]' \
- '-v[set verbose mode (report program stability attributes)]' \
- '-V[report DTrace API version]' \
- '-w[permit destructive actions]' \
- '-x[enable or modify compiler and tracing options]' \
- '-X[specify ISO C conformance settings for preprocessor]:ISO C conformance:((a\:"ISO plus K&R extensions (default)" c\:"Strictly conformant ISO C" s\:"K&R C only" t\:"ISO plus K&R extensions"))' \
- '-Z[permit probe descriptions that match zero probes]'
-}
+local curcontext="$curcontext" ret=1
+local -a state line args xopts
-_dtrace "$@"
+case $OSTYPE in
+ ^darwin*)
+ args=(
+ '-32[generate 32-bit D programs and ELF files]'
+ '-64[generate 64-bit D programs and ELF files]'
+ '(-A -h -l -V)-G[generate an ELF file containing embedded dtrace program]'
+ '-X+[specify ISO C conformance settings for preprocessor]:ISO C conformance:((a\:"ISO plus K&R extensions (default)" c\:"Strictly conformant ISO C" s\:"K&R C only" t\:"ISO plus K&R extensions"))'
+ )
+ xopts=(
+ 'errexit[exit on error with specified status code (default 1)]::status'
+ 'noresolve[do not perform user address symbol resolution]'
+ 'uresolve[specify resolution of user addresses]:how:(no symbol basename absolute)'
+ )
+ ;;
+ darwin*)
+ args=(
+ '*-W[wait for the named process to launch]:name'
+ )
+ xopts=(
+ 'amin[set minimum stability attributes]:attribute'
+ 'arch[set target data model]:arch'
+ 'argref[ignore additional positional command-line args]'
+ 'core[create core dump when exiting dtrace]'
+ 'cpp[run C preprocessor over D programs before compiling]'
+ 'cpphdrs[print each header file name used]'
+ 'ctypes[write all CTF definitions into a file]:file:_file'
+ 'debug[enable DTrace debug messages]'
+ 'define[add preprocessor define]:var[=val]'
+ 'disallow_dsym[do not use dSYM files]'
+ 'droptags[print drop tags to stderr]'
+ 'empty[allow empty D files]'
+ 'encoding[set encoding used for output]:encoding:(ascii utf8)'
+ 'errtags[prefix error message with error tags]'
+ 'evaltime[when to start instrumenting a new process]:when:(preinit postinit)'
+ 'incdir[add include file search directory]:directory:_files -/'
+ 'ireg[specify size of DIF integer register set]:size'
+ 'late[set whether references to dynamic translators are allowed]: :(dynamic static)'
+ 'libdir[add library search directory]:directory:_files -/'
+ 'mangled[show mangled symbols for C++/Swift probes]'
+ 'nolibs[do not include D system libraries]'
+ 'nojtanalysis[disable jump table analysis]'
+ 'noerror[do not show error messages]'
+ 'pgmax[set maximum number of processes DTrace can grab at the same time]:number'
+ 'preallocate[preallocate memory in dtrace before running the script]:size'
+ 'pspec[interpret ambiguous specifications as probe names]'
+ 'strip[strip non-loadable sections from D program]'
+ 'tree[show dtrace compiler parse tree at different stages]:bitmap:(1 2 4)'
+ 'tregs[specify size of DIF tuple register set]:size'
+ 'undef[add #undef into preprocessor predefines]:var name'
+ 'verbose[show D compiler intermediate code]'
+ 'version[request specific version of DTrace scripting language]:version'
+ 'zdefs[permit probe descriptions that match zero probes]'
+ 'buflimit[specify threshold percentage for early buffer switches]:percentage (1-99)'
+ 'temporal[whether to sort events in time order]:bool:(true false)'
+ 'stacksymbols[whether to symbolicate stack symbols]:bool:(true false)'
+ )
+ ;;
+esac
+
+xopts+=(
+ 'aggrate[rate of aggregation reading]:time'
+ 'aggsize[aggregation buffer size]:size'
+ 'ustackframes[number of user stack frames]:scalar'
+ 'bufpolicy[specify the buffer policy for the principal buffer]:policy:(fill switch ring)'
+ 'bufresize[buffer resizing policy]:policy:(auto manual)'
+ 'bufsize[size of the per-CPU principal buffer]:size'
+ 'cleanrate[cleaning rate (hz)]:time'
+ 'cpu[specify the CPU on which to enable tracing]:scalar'
+ 'defaultargs[allow references to unspecified macro arguments]'
+ 'destructive[allow destructive actions]'
+ 'dynvarsize[size of the dynamic variable space]:size'
+ 'flowindent[turn on flow indentation]'
+ 'grabanon[claim anonymous state]'
+ 'jstackframes[number of default stack frames for jstack()]:scalar'
+ 'jstackstrsize[default string space size for jstack()]:scalar'
+ 'nspec[number of speculations]:scalar'
+ 'quiet[set quiet mode]'
+ 'specsize[size of the speculation buffer]:size'
+ 'strsize[maximum size of strings]:size'
+ 'stackframes[maximum number of kernelspace stack frames to unwind for stack()]:scalar'
+ 'stackindent[whitespace characters to use when indenting stack() and ustack() output]:scalar'
+ 'statusrate[rate of status checking]:time'
+ 'switchrate[rate of buffer switching]:time'
+ 'ustackframes[maximum number of userspace stack frames to unwind for ustack()]:scalar'
+ 'agghist[whether to show histogram for all aggregations]:bool:(true false)'
+ 'aggpack[pack aggregations together]'
+ 'aggsortkey[sort aggregation by key]'
+ 'aggsortkeypos[position of aggregate key used for sorting]:position'
+ 'aggsortpos[position of the aggregate variable used for sorting]:position'
+ 'aggsortrev[sort aggregations in reverse order]'
+ 'aggzoom[zoom aggregation histogram to the maximum value]'
+ 'rawbytes[always print tracemem output in hexadecimal]'