From 06da6e44d725117be404c3f342ef539099043fe4 Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Wed, 17 Nov 2010 18:06:06 -0600 Subject: [PATCH] Revert "Add a DTrace tracing backend targetted for SystemTAP compatability" This reverts commit 4addb1127f6327c7ebcbd150a6b589e7677adc92. --- .gitignore | 2 - Makefile | 23 ---------- Makefile.objs | 4 -- configure | 14 +----- tracetool | 116 +++++--------------------------------------------- 5 files changed, 11 insertions(+), 148 deletions(-) diff --git a/.gitignore b/.gitignore index 3efb4ecc13..a43e4d1d98 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,6 @@ config-host.* config-target.* trace.h trace.c -trace-dtrace.h -trace-dtrace.dtrace *-timestamp *-softmmu *-darwin-user diff --git a/Makefile b/Makefile index 747e47c834..68963198f0 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,6 @@ # Makefile for QEMU. GENERATED_HEADERS = config-host.h trace.h qemu-options.def -ifeq ($(TRACE_BACKEND),dtrace) -GENERATED_HEADERS += trace-dtrace.h -endif ifneq ($(wildcard config-host.mak),) # Put the all: rule here so that config-host.mak can contain dependencies. @@ -111,11 +108,7 @@ ui/vnc.o: QEMU_CFLAGS += $(VNC_TLS_CFLAGS) bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS) -ifeq ($(TRACE_BACKEND),dtrace) -trace.h: trace.h-timestamp trace-dtrace.h -else trace.h: trace.h-timestamp -endif trace.h-timestamp: $(SRC_PATH)/trace-events config-host.mak $(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -h < $< > $@," GEN trace.h") @cmp -s $@ trace.h || cp $@ trace.h @@ -127,20 +120,6 @@ trace.c-timestamp: $(SRC_PATH)/trace-events config-host.mak trace.o: trace.c $(GENERATED_HEADERS) -trace-dtrace.h: trace-dtrace.dtrace - $(call quiet-command,dtrace -o $@ -h -s $<, " GEN trace-dtrace.h") - -# Normal practice is to name DTrace probe file with a '.d' extension -# but that gets picked up by QEMU's Makefile as an external dependancy -# rule file. So we use '.dtrace' instead -trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp -trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events config-host.mak - $(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -d < $< > $@," GEN trace-dtrace.dtrace") - @cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace - -trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS) - $(call quiet-command,dtrace -o $@ -G -s $<, " GEN trace-dtrace.o") - simpletrace.o: simpletrace.c $(GENERATED_HEADERS) version.o: $(SRC_PATH)/version.rc config-host.mak @@ -178,8 +157,6 @@ clean: rm -f slirp/*.o slirp/*.d audio/*.o audio/*.d block/*.o block/*.d net/*.o net/*.d fsdev/*.o fsdev/*.d ui/*.o ui/*.d rm -f qemu-img-cmds.h rm -f trace.c trace.h trace.c-timestamp trace.h-timestamp - rm -f trace-dtrace.dtrace trace-dtrace.dtrace-timestamp - rm -f trace-dtrace.h trace-dtrace.h-timestamp $(MAKE) -C tests clean for d in $(ALL_SUBDIRS) libhw32 libhw64 libuser libdis libdis-user; do \ if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \ diff --git a/Makefile.objs b/Makefile.objs index 23b17cefad..15569afa14 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -286,15 +286,11 @@ libdis-$(CONFIG_SPARC_DIS) += sparc-dis.o ###################################################################### # trace -ifeq ($(TRACE_BACKEND),dtrace) -trace-obj-y = trace-dtrace.o -else trace-obj-y = trace.o ifeq ($(TRACE_BACKEND),simple) trace-obj-y += simpletrace.o user-obj-y += qemu-timer-common.o endif -endif vl.o: QEMU_CFLAGS+=$(GPROF_CFLAGS) diff --git a/configure b/configure index f8dad3eb00..7025d2bf0d 100755 --- a/configure +++ b/configure @@ -929,7 +929,7 @@ echo " --enable-docs enable documentation build" 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 " --trace-backend=B Trace backend nop simple ust dtrace" +echo " --trace-backend=B Trace backend nop simple ust" echo " --trace-file=NAME Full PATH,NAME of file to store traces" echo " Default:trace-" echo " --disable-spice disable spice" @@ -2193,18 +2193,6 @@ EOF exit 1 fi fi - -########################################## -# For 'dtrace' backend, test if 'dtrace' command is present -if test "$trace_backend" = "dtrace"; then - if ! has 'dtrace' ; then - echo - echo "Error: dtrace command is not found in PATH $PATH" - echo - exit 1 - fi -fi - ########################################## # End of CC checks # After here, no more $cc or $ld runs diff --git a/tracetool b/tracetool index 5b6636ac27..701085837f 100755 --- a/tracetool +++ b/tracetool @@ -20,12 +20,10 @@ Backends: --nop Tracing disabled --simple Simple built-in backend --ust LTTng User Space Tracing backend - --dtrace DTrace/SystemTAP backend Output formats: -h Generate .h file -c Generate .c file - -d Generate .d file (DTrace only) EOF exit 1 } @@ -48,9 +46,8 @@ get_args() # Get the argument name list of a trace event get_argnames() { - local nfields field name sep + local nfields field name nfields=0 - sep="$2" for field in $(get_args "$1"); do nfields=$((nfields + 1)) @@ -61,7 +58,7 @@ get_argnames() name=${field%,} test "$field" = "$name" && continue - printf "%s%s " $name $sep + printf "%s" "$name, " done # Last argument name @@ -76,7 +73,7 @@ get_argc() { local name argc argc=0 - for name in $(get_argnames "$1", ","); do + for name in $(get_argnames "$1"); do argc=$((argc + 1)) done echo $argc @@ -157,7 +154,7 @@ EOF cast_args_to_uint64_t() { local arg - for arg in $(get_argnames "$1", ","); do + for arg in $(get_argnames "$1"); do printf "%s" "(uint64_t)(uintptr_t)$arg" done } @@ -250,7 +247,7 @@ linetoh_ust() local name args argnames name=$(get_name "$1") args=$(get_args "$1") - argnames=$(get_argnames "$1", ",") + argnames=$(get_argnames "$1") cat <