summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohamad Gebai <mohamad.gebai@gmail.com>2014-01-29 22:47:56 -0500
committerStefan Hajnoczi <stefanha@redhat.com>2014-02-19 11:08:53 +0100
commite6bf23f82d2d907dc99cf2581b4852417843a42d (patch)
treefe4d1641e3bb9c9f605be2e2793d14d2f4b7898c
parent9530570fa5f86a52e31c92b26578a973b439d493 (diff)
downloadqemu-e6bf23f82d2d907dc99cf2581b4852417843a42d.tar.gz
qemu-e6bf23f82d2d907dc99cf2581b4852417843a42d.tar.bz2
qemu-e6bf23f82d2d907dc99cf2581b4852417843a42d.zip
Adapt Makefiles to the new LTTng ust interface
Add generation of new files for LTTng ust. Signed-off-by: Mohamad Gebai <mohamad.gebai@polymtl.ca> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--Makefile5
-rw-r--r--trace/Makefile.objs25
2 files changed, 30 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 807054b3a1..a443cd4976 100644
--- a/Makefile
+++ b/Makefile
@@ -57,6 +57,11 @@ GENERATED_HEADERS += trace/generated-tracers-dtrace.h
endif
GENERATED_SOURCES += trace/generated-tracers.c
+ifeq ($(TRACE_BACKEND),ust)
+GENERATED_HEADERS += trace/generated-ust-provider.h
+GENERATED_SOURCES += trace/generated-ust.c
+endif
+
# Don't try to regenerate Makefile or configure
# We don't generate any of them
Makefile: ;
diff --git a/trace/Makefile.objs b/trace/Makefile.objs
index 3b88e498b5..d321946d38 100644
--- a/trace/Makefile.objs
+++ b/trace/Makefile.objs
@@ -1,6 +1,30 @@
# -*- mode: makefile -*-
######################################################################
+# Auto-generated event descriptions for LTTng ust code
+
+ifeq ($(TRACE_BACKEND),ust)
+$(obj)/generated-ust-provider.h: $(obj)/generated-ust-provider.h-timestamp
+$(obj)/generated-ust-provider.h-timestamp: $(SRC_PATH)/trace-events
+ $(call quiet-command,$(TRACETOOL) \
+ --format=ust-events-h \
+ --backend=$(TRACE_BACKEND) \
+ < $< > $@," GEN $(patsubst %-timestamp,%,$@)")
+ @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
+
+$(obj)/generated-ust.c: $(obj)/generated-ust.c-timestamp $(BUILD_DIR)/config-host.mak
+$(obj)/generated-ust.c-timestamp: $(SRC_PATH)/trace-events
+ $(call quiet-command,$(TRACETOOL) \
+ --format=ust-events-c \
+ --backend=$(TRACE_BACKEND) \
+ < $< > $@," GEN $(patsubst %-timestamp,%,$@)")
+ @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
+
+$(obj)/generated-events.h: $(obj)/generated-ust-provider.h
+$(obj)/generated-events.c: $(obj)/generated-ust.c
+endif
+
+######################################################################
# Auto-generated event descriptions
$(obj)/generated-events.h: $(obj)/generated-events.h-timestamp
@@ -77,5 +101,6 @@ util-obj-$(CONFIG_TRACE_DEFAULT) += default.o
util-obj-$(CONFIG_TRACE_SIMPLE) += simple.o
util-obj-$(CONFIG_TRACE_STDERR) += stderr.o
util-obj-$(CONFIG_TRACE_FTRACE) += ftrace.o
+util-obj-$(CONFIG_TRACE_UST) += generated-ust.o
util-obj-y += control.o
util-obj-y += generated-tracers.o