aboutsummaryrefslogtreecommitdiff
path: root/trace
diff options
context:
space:
mode:
authorLluís Vilanova <vilanova@ac.upc.edu>2014-05-30 14:11:50 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2014-08-12 14:26:12 +0100
commit707c8a98e4c42a559ad8d1ec0e77e28ffd666346 (patch)
treeb26f404ae1c05bd4ae5e01e7ff7fbcfffafa7446 /trace
parentb2b36c22bd8b14de34bd108daa96d89ba41fe8e7 (diff)
downloadqemu-arm-707c8a98e4c42a559ad8d1ec0e77e28ffd666346.tar.gz
trace: [tcg] Declare TCG tracing helper routines
Generates file "trace/generated-helpers.h" with TCG helper declarations to trace events in guest code at execution time ('trace_${event}_exec_proxy'). Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'trace')
-rw-r--r--trace/Makefile.objs24
1 files changed, 19 insertions, 5 deletions
diff --git a/trace/Makefile.objs b/trace/Makefile.objs
index d7a86969a4..0a2e6cd71c 100644
--- a/trace/Makefile.objs
+++ b/trace/Makefile.objs
@@ -49,6 +49,9 @@ util-obj-y += generated-events.o
######################################################################
# Auto-generated tracing routines
+##################################################
+# Execution level
+
$(obj)/generated-tracers.h: $(obj)/generated-tracers.h-timestamp
@cmp -s $< $@ || cp $< $@
$(obj)/generated-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
@@ -57,8 +60,8 @@ $(obj)/generated-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/conf
--backends=$(TRACE_BACKENDS) \
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
-######################################################################
-# Auto-generated tracing routines (non-DTrace)
+##############################
+# non-DTrace
$(obj)/generated-tracers.c: $(obj)/generated-tracers.c-timestamp
@cmp -s $< $@ || cp $< $@
@@ -70,9 +73,8 @@ $(obj)/generated-tracers.c-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/conf
$(obj)/generated-tracers.o: $(obj)/generated-tracers.c $(obj)/generated-tracers.h
-
-######################################################################
-# Auto-generated DTrace code
+##############################
+# DTrace
# Normal practice is to name DTrace probe file with a '.d' extension
# but that gets picked up by QEMU's Makefile as an external dependency
@@ -94,6 +96,18 @@ $(obj)/generated-tracers-dtrace.o: $(obj)/generated-tracers-dtrace.dtrace
util-obj-y += generated-tracers-dtrace.o
endif
+##################################################
+# Translation level
+
+$(obj)/generated-helpers.h: $(obj)/generated-helpers.h-timestamp
+$(obj)/generated-helpers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
+ $(call quiet-command,$(TRACETOOL) \
+ --format=tcg-helper-h \
+ --backend=$(TRACE_BACKENDS) \
+ < $< > $@," GEN $(patsubst %-timestamp,%,$@)")
+ @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
+
+
######################################################################
# Backend code