echo " --disable-docs disable documentation build"
echo " --disable-vhost-net disable vhost-net acceleration support"
echo " --enable-vhost-net enable vhost-net acceleration support"
-echo " --enable-trace-backend=B Trace backend nop simple ust dtrace"
+echo " --enable-trace-backend=B Set trace backend"
+echo " Available backends:" $("$source_path"/scripts/tracetool --list-backends)
echo " --with-trace-file=NAME Full PATH,NAME of file to store traces"
echo " Default:trace-<pid>"
echo " --disable-spice disable spice"
trace backends but it is portable. This is the recommended trace backend
unless you have specific needs for more advanced backends.
+=== Stderr ===
+
+The "stderr" backend sends trace events directly to standard error output
+during emulation.
+
==== Monitor commands ====
* info trace
usage()
{
cat >&2 <<EOF
-usage: $0 [--nop | --simple | --ust] [-h | -c]
+usage: $0 [--nop | --simple | --stderr | --ust | --dtrace] [-h | -c]
Generate tracing code for a file on stdin.
Backends:
--nop Tracing disabled
--simple Simple built-in backend
+ --stderr Stderr built-in backend
--ust LTTng User Space Tracing backend
--dtrace DTrace/SystemTAP backend
EOF
}
+#STDERR
+linetoh_begin_stderr()
+{
+ cat <<EOF
+#include <stdio.h>
+EOF
+}
+
+linetoh_stderr()
+{
+ local name args argnames argc fmt
+ name=$(get_name "$1")
+ args=$(get_args "$1")
+ argnames=$(get_argnames "$1" ",")
+ argc=$(get_argc "$1")
+ fmt=$(get_fmt "$1")
+
+ if [ "$argc" -gt 0 ]; then
+ argnames=", $argnames"
+ fi
+
+ cat <<EOF
+static inline void trace_$name($args)
+{
+ fprintf(stderr, "$name $fmt\n" $argnames);
+}
+EOF
+}
+
+linetoh_end_stderr()
+{
+return
+}
+
+linetoc_begin_stderr()
+{
+return
+}
+
+linetoc_stderr()
+{
+return
+}
+
+linetoc_end_stderr()
+{
+return
+}
+#END OF STDERR
+
# Clean up after UST headers which pollute the namespace
ust_clean_namespace() {
cat <<EOF
until [ -z "$1" ]
do
case "$1" in
- "--nop" | "--simple" | "--ust" | "--dtrace") backend="${1#--}" ;;
+ "--nop" | "--simple" | "--stderr" | "--ust" | "--dtrace") backend="${1#--}" ;;
"--binary") shift ; binary="$1" ;;
"--target-arch") shift ; targetarch="$1" ;;
"--check-backend") exit 0 ;; # used by ./configure to test for backend
+ "--list-backends") # used by ./configure to list available backends
+ echo "nop simple stderr ust dtrace"
+ exit 0
+ ;;
+
*)
usage;;
esac