3 # This file and its contents are supplied under the terms of the
4 # Common Development and Distribution License ("CDDL"), version 1.0.
5 # You may only use this file in accordance with the terms of version
8 # A full copy of the text of the CDDL should have accompanied this
9 # source. A copy of the CDDL is also available via the Internet at
10 # http://www.illumos.org/license/CDDL.
14 # Copyright (c) 2023 Domagoj Stolfa
18 dtraceout=/tmp/dtrace.$bname
22 $dtrace -o $dtraceout.$1 -x oformat=$1 -s /dev/stdin <<__EOF__
41 echo expected one argument: '<'dtrace-path'>'
51 echo $bname: failed to produce valid JSON. see $dtraceout.json
56 xmllint $dtraceout.xml
59 echo $bname: failed to produce valid XML. see $dtraceout.xml