Skip to content

Commit

Permalink
Merge remote-tracking branch 'stefanha/tracing' into staging
Browse files Browse the repository at this point in the history
* stefanha/tracing:
  tracetool: handle DTrace keywords 'in', 'next', 'self'
  tracetool: Add MAINTAINERS info
  tracetool: Add support for the 'dtrace' backend
  tracetool: Add support for the 'ust' backend
  tracetool: Add support for the 'simple' backend
  tracetool: Add support for the 'stderr' backend
  tracetool: Add module for the 'h' format
  tracetool: Add module for the 'c' format
  tracetool: Rewrite infrastructure as python modules
  • Loading branch information
Anthony Liguori committed Apr 23, 2012
2 parents 51006bb + 256a721 commit e5e3895
Show file tree
Hide file tree
Showing 17 changed files with 1,036 additions and 677 deletions.
2 changes: 2 additions & 0 deletions MAINTAINERS
Expand Up @@ -553,6 +553,8 @@ Tracing
M: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
S: Maintained
F: trace/
F: scripts/tracetool.py
F: scripts/tracetool/
F: docs/tracing.txt
T: git://github.com/stefanha/qemu.git tracing

Expand Down
6 changes: 3 additions & 3 deletions Makefile.objs
Expand Up @@ -378,12 +378,12 @@ else
trace.h: trace.h-timestamp
endif
trace.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -h < $< > $@," GEN trace.h")
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/tracetool.py --format=h --backend=$(TRACE_BACKEND) < $< > $@," GEN trace.h")
@cmp -s $@ trace.h || cp $@ trace.h

trace.c: trace.c-timestamp
trace.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -c < $< > $@," GEN trace.c")
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/tracetool.py --format=c --backend=$(TRACE_BACKEND) < $< > $@," GEN trace.c")
@cmp -s $@ trace.c || cp $@ trace.c

trace.o: trace.c $(GENERATED_HEADERS)
Expand All @@ -396,7 +396,7 @@ trace-dtrace.h: trace-dtrace.dtrace
# rule file. So we use '.dtrace' instead
trace-dtrace.dtrace: trace-dtrace.dtrace-timestamp
trace-dtrace.dtrace-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool --$(TRACE_BACKEND) -d < $< > $@," GEN trace-dtrace.dtrace")
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/tracetool.py --format=d --backend=$(TRACE_BACKEND) < $< > $@," GEN trace-dtrace.dtrace")
@cmp -s $@ trace-dtrace.dtrace || cp $@ trace-dtrace.dtrace

trace-dtrace.o: trace-dtrace.dtrace $(GENERATED_HEADERS)
Expand Down
13 changes: 7 additions & 6 deletions Makefile.target
Expand Up @@ -59,12 +59,13 @@ TARGET_TYPE=system
endif

$(QEMU_PROG).stp: $(SRC_PATH)/trace-events
$(call quiet-command,sh $(SRC_PATH)/scripts/tracetool \
--$(TRACE_BACKEND) \
--binary $(bindir)/$(QEMU_PROG) \
--target-arch $(TARGET_ARCH) \
--target-type $(TARGET_TYPE) \
--stap < $(SRC_PATH)/trace-events > $(QEMU_PROG).stp," GEN $(QEMU_PROG).stp")
$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/tracetool.py \
--format=stap \
--backend=$(TRACE_BACKEND) \
--binary=$(bindir)/$(QEMU_PROG) \
--target-arch=$(TARGET_ARCH) \
--target-type=$(TARGET_TYPE) \
< $(SRC_PATH)/trace-events > $(QEMU_PROG).stp," GEN $(QEMU_PROG).stp")
else
stap:
endif
Expand Down
4 changes: 2 additions & 2 deletions configure
Expand Up @@ -1097,7 +1097,7 @@ 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 Set trace backend"
echo " Available backends:" $("$source_path"/scripts/tracetool --list-backends)
echo " Available backends:" $($python "$source_path"/scripts/tracetool.py --list-backends)
echo " --with-trace-file=NAME Full PATH,NAME of file to store traces"
echo " Default:trace-<pid>"
echo " --disable-spice disable spice"
Expand Down Expand Up @@ -2670,7 +2670,7 @@ fi
##########################################
# check if trace backend exists

sh "$source_path/scripts/tracetool" "--$trace_backend" --check-backend > /dev/null 2> /dev/null
$python "$source_path/scripts/tracetool.py" "--backend=$trace_backend" --check-backend > /dev/null 2> /dev/null
if test "$?" -ne 0 ; then
echo
echo "Error: invalid trace backend"
Expand Down

0 comments on commit e5e3895

Please sign in to comment.