--stap Generate .stp file (DTrace with SystemTAP only)
Options:
- --binary [path] Full path to QEMU binary
- --target-arch [arch] QEMU emulator target arch
- --target-type [type] QEMU emulator target type ('system' or 'user')
+ --binary [path] Full path to QEMU binary
+ --target-arch [arch] QEMU emulator target arch
+ --target-type [type] QEMU emulator target type ('system' or 'user')
+ --probe-prefix [prefix] Prefix for dtrace probe names
+ (default: qemu-\$targettype-\$targetarch)
EOF
exit 1
# Define prototype for probe arguments
cat <<EOF
-probe qemu.$targettype.$targetarch.$name = process("$binary").mark("$name")
+probe $probeprefix.$name = process("$binary").mark("$name")
{
EOF
echo "--binary is required for SystemTAP tapset generator"
exit 1
fi
- if [ -z "$targettype" ]; then
+ if [ -z "$probeprefix" -a -z "$targettype" ]; then
echo "--target-type is required for SystemTAP tapset generator"
exit 1
fi
- if [ -z "$targetarch" ]; then
+ if [ -z "$probeprefix" -a -z "$targetarch" ]; then
echo "--target-arch is required for SystemTAP tapset generator"
exit 1
fi
+ if [ -z "$probeprefix" ]; then
+ probeprefix="qemu.$targettype.$targetarch";
+ fi
echo "/* This file is autogenerated by tracetool, do not edit. */"
convert stap
}
binary=
targettype=
targetarch=
+probeprefix=
until [ -z "$1" ]
"--binary") shift ; binary="$1" ;;
"--target-arch") shift ; targetarch="$1" ;;
"--target-type") shift ; targettype="$1" ;;
+ "--probe-prefix") shift ; probeprefix="$1" ;;
"-h" | "-c" | "-d") output="${1#-}" ;;
"--stap") output="${1#--}" ;;