aboutsummaryrefslogtreecommitdiff
path: root/trace
diff options
context:
space:
mode:
authorLluís Vilanova <vilanova@ac.upc.edu>2014-05-30 14:12:13 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2014-08-12 14:26:12 +0100
commit465830fbd9be22995b34d7b3f8cd35572e1f8a36 (patch)
tree7e391213bdc5e2b018c7fdff5b0a87d23bada6a8 /trace
parent76b53aa32457e63957540d99149901989c075d3c (diff)
trace: [tcg] Generate TCG tracing routines
Generate header "trace/generated-tcg-tracers.h" with the necessary routines for tracing events in guest code: * trace_${event}_tcg Convenience wrapper that calls the translation-time tracer 'trace_${event}_trans', and calls 'gen_helper_trace_${event}_exec to generate the TCG code to later trace the event at execution time. 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.objs9
1 files changed, 9 insertions, 0 deletions
diff --git a/trace/Makefile.objs b/trace/Makefile.objs
index 72cc3f57d1..387f191fd4 100644
--- a/trace/Makefile.objs
+++ b/trace/Makefile.objs
@@ -128,6 +128,15 @@ $(obj)/generated-helpers.o: $(obj)/generated-helpers.c
target-obj-y += generated-helpers.o
+$(obj)/generated-tcg-tracers.h: $(obj)/generated-tcg-tracers.h-timestamp
+$(obj)/generated-tcg-tracers.h-timestamp: $(SRC_PATH)/trace-events $(BUILD_DIR)/config-host.mak
+ $(call quiet-command,$(TRACETOOL) \
+ --format=tcg-h \
+ --backend=$(TRACE_BACKENDS) \
+ < $< > $@," GEN $(patsubst %-timestamp,%,$@)")
+ @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
+
+
######################################################################
# Backend code