zsh-workers
 help / color / mirror / Atom feed
* PATCH: complete probes for dtrace completion
@ 2021-03-23 22:43 Oliver Kiddle
  2021-03-24 11:17 ` Jun T
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Kiddle @ 2021-03-23 22:43 UTC (permalink / raw)
  To: Zsh workers

This adds completion of dtrace probes with the -P -m -f and -n options.
Runtime options with the -x option are also now completed.
Aside from runtime options, the main options don't appear to have
changed.

I lack proper access to macOS but managed to ascertain that dtrace -l
there lists some functions where the names contain colons, spaces and
square brackets. The names look like Objective C stuff and are perhaps
just unmangled forms. I have no idea how these might be specified or
used but for the purposes of the completion, I have simply filtered them
out. Separating the four fields in the output is tricky enough anyway -
the module and function fields can be blank and column alignment can't
be relied upon. runtime options (-x) may also differ on macOS.

The probes could also be completed for -c but that has a somewhat
different form with all four fields being specified, wildcards being
allowed and is followed by a full D script.

Oliver

diff --git a/Completion/Solaris/Command/_dtrace b/Completion/Solaris/Command/_dtrace
index a095589eb..bb5193163 100644
--- a/Completion/Solaris/Command/_dtrace
+++ b/Completion/Solaris/Command/_dtrace
@@ -1,41 +1,99 @@
 #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
 
-_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]'
+    )
+  ;;
+  darwin*)
+    args=(
+      '*-W[wait for the named process to launch]:name'
+    )
+  ;;
+esac
+
+_arguments -C -s $args \
+  '-a[claim anonymous tracing state]' \
+  '(-G -h -l -V)-A[generate driver.conf(4) directives for anonymous tracing]' \
+  '-b+[set trace buffer size]:size' \
+  '*-c+[run specified command and exit upon its completion]:command' \
+  '-C[run cpp(1) preprocessor on script files]' \
+  '*-D+[define symbol when invoking preprocessor]:name' \
+  '-e[exit after compiling request but prior to enabling probes]' \
+  '-f+[enable or list probes matching the specified function name]:function:->functions' \
+  '-F[coalesce trace output by function]' \
+  '-H[print included files when invoking preprocessor]' \
+  '(-A -G -l -V)-h[generate a header file]' \
+  '*-i+[enable or list probes matching the specified probe id]:probe-id' \
+  '-I+[add include directory to preprocessor search path]:path:_directories' \
+  '(-A -G -h -V)-l[list probes instead of enabling them]' \
+  '-L+[add directory to search path for DTrace libraries]:path:_directories' \
+  '*-m+[trace or list probes matching the specified module name]:module:->modules' \
+  '*-n+[trace or list probes matching the specified probe name]:name:->probes' \
+  '-o+[set output file]:output file:_files' \
+  '-p+[grab specified process-ID and cache its symbol tables]:pid:_pids' \
+  '*-P+[trace or list probes matching the specified provider name]:provider:->providers' \
+  '-q[set quiet mode (only output explicitly traced data)]' \
+  '*-s+[enable or list probes according to the specified D script]:script file:_files' \
+  '-S[print D compiler intermediate code]' \
+  '*-U+[undefine symbol when invoking preprocessor]:name' \
+  '-v[set verbose mode (report program stability attributes)]' \
+  '(-A -G -h -l)-V[report DTrace API version]' \
+  '-w[permit destructive actions]' \
+  '*-x+[enable or modify compiler and tracing options]: : _values option
+    "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"' \
+  '-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]' && return
+
+if [[ -n $state ]]; then
+  local -a fields=( providers modules functions probes )
+  local -a suf=( : : : )
+  typeset -ga _cache_dtrace_probes
+  (( $#_cache_dtrace_probes )) || _cache_dtrace_probes=(
+      ${${${${(f)"$(_call_program dtrace-probes dtrace -l)"}[2,-1]}:#*[:[]}/(#b) #<-> #([^ ]#) #([^ ]#) #([^ ]#) ##([^ ]##)/${match[1]}:${match[3]:+$match[2]}:${match[3]:-$match[2]}:$match[4]}
+  ) # filtering out those containing : and [, they occur on macos but may just be unmangled forms and not directly usable
+  suf[${fields[(i)$state]}]=( "${compstate[quote][-1]} " ) # field matching the state gets a space suffix
+  while compset -P 1 '*:'; do
+    shift fields # each already listed field reduces one being possible
+  done
+  _tags dtrace-${^fields[1,(r)$state]}
+  while _tags; do
+    _requested dtrace-probes expl 'probe name' compadd -S "$suf[4]" - ${${(M)_cache_dtrace_probes:#((#s)|*:)${IPREFIX}[^:]#(#e)}##*:} && ret=0
+    _requested dtrace-functions expl 'function' compadd -S "$suf[3]" - ${${${(M)_cache_dtrace_probes:#((#s)|*:)${IPREFIX}[^:]#:[^:]#(#e)}%:*}##*:} && ret=0
+    _requested dtrace-modules expl 'module' compadd -S "$suf[2]" - ${${${(M)_cache_dtrace_probes:#((#s)|*:)${IPREFIX}[^:]#:[^:]#:[^:]#(#e)}#*:}%%:*} && ret=0
+    _requested dtrace-providers expl 'provider' compadd -S "$suf[1]" - ${_cache_dtrace_probes%%:*} && ret=0
+
+    (( ret )) || return 0
+  done
+fi
+
+return 1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: complete probes for dtrace completion
  2021-03-23 22:43 PATCH: complete probes for dtrace completion Oliver Kiddle
@ 2021-03-24 11:17 ` Jun T
  2021-03-24 11:30   ` Jun T
  2021-03-24 23:42   ` Oliver Kiddle
  0 siblings, 2 replies; 5+ messages in thread
From: Jun T @ 2021-03-24 11:17 UTC (permalink / raw)
  To: zsh-workers

I tested on macOS.

[1]
> 2021/03/24 7:43, Oliver Kiddle <opk@zsh.org> wrote:
> 
> I have simply filtered them
> out.

It is not filtered out due to a typo;  'pattern' in ${${...}:#pattern}
needs a trailing '*'.

On macOS, output of 'dtrace -l' includes lines like
 170    syscall            #8 entry
This just indicates there is no system call with this number.
I think these lines should also be filtered out.

And dtrace on macOS always issues waring like
dtrace: system integrity protection is on, some features will not be available
We need to send it to /dev/null.

So I replaced line 82 by
  ${${${${(f)"$(_call_program dtrace-probes dtrace -l 2>/dev/null)"}[2,-1]}:#*[:[#]*}...


[2]
> runtime options (-x) may also differ on macOS.

Yes. And I also added options listed in the online document for
Solaris 11.4:
https://docs.oracle.com/cd/E37838_01/html/E61035/gkzhi.html


[3] Option -X does not exist on macOS.


The patch below is against the current git master.

diff --git a/Completion/Solaris/Command/_dtrace b/Completion/Solaris/Command/_dtrace
index a095589eb..425d0cf66 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]'
+)
+
+_arguments -C -s $args \
+  '-a[claim anonymous tracing state]' \
+  '(-G -h -l -V)-A[generate driver.conf(4) directives for anonymous tracing]' \
+  '-b+[set trace buffer size]:size' \
+  '*-c+[run specified command and exit upon its completion]:command' \
+  '-C[run cpp(1) preprocessor on script files]' \
+  '*-D+[define symbol when invoking preprocessor]:name' \
+  '-e[exit after compiling request but prior to enabling probes]' \
+  '-f+[enable or list probes matching the specified function name]:function:->functions' \
+  '-F[coalesce trace output by function]' \
+  '-H[print included files when invoking preprocessor]' \
+  '(-A -G -l -V)-h[generate a header file]' \
+  '*-i+[enable or list probes matching the specified probe id]:probe-id' \
+  '-I+[add include directory to preprocessor search path]:path:_directories' \
+  '(-A -G -h -V)-l[list probes instead of enabling them]' \
+  '-L+[add directory to search path for DTrace libraries]:path:_directories' \
+  '*-m+[trace or list probes matching the specified module name]:module:->modules' \
+  '*-n+[trace or list probes matching the specified probe name]:name:->probes' \
+  '-o+[set output file]:output file:_files' \
+  '-p+[grab specified process-ID and cache its symbol tables]:pid:_pids' \
+  '*-P+[trace or list probes matching the specified provider name]:provider:->providers' \
+  '-q[set quiet mode (only output explicitly traced data)]' \
+  '*-s+[enable or list probes according to the specified D script]:script file:_files' \
+  '-S[print D compiler intermediate code]' \
+  '*-U+[undefine symbol when invoking preprocessor]:name' \
+  '-v[set verbose mode (report program stability attributes)]' \
+  '(-A -G -h -l)-V[report DTrace API version]' \
+  '-w[permit destructive actions]' \
+  '*-x+[enable or modify compiler and tracing options]: : _values option $xopts' \
+  '-Z[permit probe descriptions that match zero probes]' && return
+
+if [[ -n $state ]]; then
+  local -a fields=( providers modules functions probes )
+  local -a suf=( : : : )
+  typeset -ga _cache_dtrace_probes
+  (( $#_cache_dtrace_probes )) || _cache_dtrace_probes=(
+      ${${${${(f)"$(_call_program dtrace-probes dtrace -l 2>/dev/null)"}[2,-1]}:#*[:[#]*}/(#b) #<-> #([^ ]#) #([^ ]#) #([^ ]#) ##([^ ]##)/${match[1]}:${match[3]:+$match[2]}:${match[3]:-$match[2]}:$match[4]}
+  ) # filtering out those containing : and [, they occur on macos but may just be unmangled forms and not directly usable
+  suf[${fields[(i)$state]}]=( "${compstate[quote][-1]} " ) # field matching the state gets a space suffix
+  while compset -P 1 '*:'; do
+    shift fields # each already listed field reduces one being possible
+  done
+  _tags dtrace-${^fields[1,(r)$state]}
+  while _tags; do
+    _requested dtrace-probes expl 'probe name' compadd -S "$suf[4]" - ${${(M)_cache_dtrace_probes:#((#s)|*:)${IPREFIX}[^:]#(#e)}##*:} && ret=0
+    _requested dtrace-functions expl 'function' compadd -S "$suf[3]" - ${${${(M)_cache_dtrace_probes:#((#s)|*:)${IPREFIX}[^:]#:[^:]#(#e)}%:*}##*:} && ret=0
+    _requested dtrace-modules expl 'module' compadd -S "$suf[2]" - ${${${(M)_cache_dtrace_probes:#((#s)|*:)${IPREFIX}[^:]#:[^:]#:[^:]#(#e)}#*:}%%:*} && ret=0
+    _requested dtrace-providers expl 'provider' compadd -S "$suf[1]" - ${_cache_dtrace_probes%%:*} && ret=0
+    (( ret )) || return 0
+  done
+fi
+
+return 1





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: complete probes for dtrace completion
  2021-03-24 11:17 ` Jun T
@ 2021-03-24 11:30   ` Jun T
  2021-03-24 23:42   ` Oliver Kiddle
  1 sibling, 0 replies; 5+ messages in thread
From: Jun T @ 2021-03-24 11:30 UTC (permalink / raw)
  To: zsh-workers

There is a dtrace command in systemtap-sdt-{dev,devel} package for
{Debian,RedHat}-like systems (but I have never used it):

https://manpages.debian.org/buster/systemtap-sdt-dev/dtrace.1.en.html

I'm not sure _dtrace needs to support it.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: complete probes for dtrace completion
  2021-03-24 11:17 ` Jun T
  2021-03-24 11:30   ` Jun T
@ 2021-03-24 23:42   ` Oliver Kiddle
  2021-03-25  1:58     ` Jun T
  1 sibling, 1 reply; 5+ messages in thread
From: Oliver Kiddle @ 2021-03-24 23:42 UTC (permalink / raw)
  To: Jun T; +Cc: zsh-workers

Jun T wrote:
> I tested on macOS.

Thanks!

> It is not filtered out due to a typo;  'pattern' in ${${...}:#pattern}
> needs a trailing '*'.

Ah, good point, thanks.

> On macOS, output of 'dtrace -l' includes lines like
>  170    syscall            #8 entry

I get those on FreeBSD too but hadn't especially paid much attention.
Trying to specify them only produces an error so filtering is likely
correct.

> And dtrace on macOS always issues waring like
> dtrace: system integrity protection is on, some features will not be available
> We need to send it to /dev/null.

Since 5.0.8, _call_program sends stderr to /dev/null by default and
requires 2>&1 to preserve it. Were you actually getting the errors
dumped from _dtrace?

> Yes. And I also added options listed in the online document for
> Solaris 11.4:

Looks good, thanks.

> There is a dtrace command in systemtap-sdt-{dev,devel} package for
> {Debian,RedHat}-like systems (but I have never used it):

> https://manpages.debian.org/buster/systemtap-sdt-dev/dtrace.1.en.html

> I'm not sure _dtrace needs to support it.

I have used dtrace on Linux in the past but there were more occasions
where I moved over to a Solaris machine to use it. I'm not sure whether
the latest is still systemtap based. bpftrace has improved and looks to
be very similar. I've heard a Windows port exists too. I doubt _dtrace
would need much if any changes for the Linux port. I don't think it is
vital to add support but also see no reason not to. Would be better to
check the latest release on Oracle Linux rather than that old man page,
however. There's also a NetBSD port but I doubt that deviates much, if
at all.

Oliver


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: PATCH: complete probes for dtrace completion
  2021-03-24 23:42   ` Oliver Kiddle
@ 2021-03-25  1:58     ` Jun T
  0 siblings, 0 replies; 5+ messages in thread
From: Jun T @ 2021-03-25  1:58 UTC (permalink / raw)
  To: zsh-workers


> 2021/03/25 8:42、Oliver Kiddle <opk@zsh.org>のメール:
> 
> Since 5.0.8, _call_program sends stderr to /dev/null by default and
> requires 2>&1 to preserve it. Were you actually getting the errors
> dumped from _dtrace?

Sorry, I have a vague memory that I got the warning after
'dtrace -n<TAB>' but I can't reproduce it (by removing 2>/dev/null).
(Just my memory is wrong, or I did something wrong with 'sudu zsh'.)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-25  1:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 22:43 PATCH: complete probes for dtrace completion Oliver Kiddle
2021-03-24 11:17 ` Jun T
2021-03-24 11:30   ` Jun T
2021-03-24 23:42   ` Oliver Kiddle
2021-03-25  1:58     ` Jun T

zsh-workers

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-workers

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-workers zsh-workers/ http://inbox.vuxu.org/zsh-workers \
		zsh-workers@zsh.org
	public-inbox-index zsh-workers

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


code repositories for the project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git