From: Mohamad Gebai <mohamad.gebai@gmail.com>
To: qemu-devel@nongnu.org
Cc: Mohamad Gebai <mohamad.gebai@polymtl.ca>
Subject: [Qemu-devel] [RFC PATCH 3/3] Adapt Makefiles to the new LTTng ust interface.
Date: Mon, 30 Sep 2013 11:05:01 -0400 [thread overview]
Message-ID: <1380553501-20670-4-git-send-email-mohamad.gebai@polymtl.ca> (raw)
In-Reply-To: <1380553501-20670-1-git-send-email-mohamad.gebai@polymtl.ca>
Add generation of new files for LTTng ust.
Signed-off-by: Mohamad Gebai <mohamad.gebai@polymtl.ca>
---
Makefile | 5 +++++
trace/Makefile.objs | 29 +++++++++++++++++++++++++++--
2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 60fb87e..0c797c5 100644
--- a/Makefile
+++ b/Makefile
@@ -50,6 +50,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 3b88e49..00880b3 100644
--- a/trace/Makefile.objs
+++ b/trace/Makefile.objs
@@ -1,9 +1,33 @@
# -*- 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=events \
+ < $< > $@," 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=events \
+ < $< > $@," GEN $(patsubst %-timestamp,%,$@)")
+ @cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
+
+ust_provider=$(obj)/generated-ust-provider.h
+ust=$(obj)/generated-ust.c
+endif
+
+######################################################################
# Auto-generated event descriptions
-$(obj)/generated-events.h: $(obj)/generated-events.h-timestamp
+$(obj)/generated-events.h: $(obj)/generated-events.h-timestamp $(ust_provider)
$(obj)/generated-events.h-timestamp: $(SRC_PATH)/trace-events
$(call quiet-command,$(TRACETOOL) \
--format=events-h \
@@ -11,7 +35,7 @@ $(obj)/generated-events.h-timestamp: $(SRC_PATH)/trace-events
< $< > $@," GEN $(patsubst %-timestamp,%,$@)")
@cmp -s $@ $(patsubst %-timestamp,%,$@) || cp $@ $(patsubst %-timestamp,%,$@)
-$(obj)/generated-events.c: $(obj)/generated-events.c-timestamp $(BUILD_DIR)/config-host.mak
+$(obj)/generated-events.c: $(obj)/generated-events.c-timestamp $(BUILD_DIR)/config-host.mak $(ust)
$(obj)/generated-events.c-timestamp: $(SRC_PATH)/trace-events
$(call quiet-command,$(TRACETOOL) \
--format=events-c \
@@ -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
--
1.7.10.4
next prev parent reply other threads:[~2013-09-30 15:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-30 15:04 [Qemu-devel] [RFC PATCH 0/3] Fix UST backend for LTTng 2.x Mohamad Gebai
2013-09-30 15:04 ` [Qemu-devel] [RFC PATCH 1/3] Fix configure script " Mohamad Gebai
2013-09-30 15:05 ` [Qemu-devel] [RFC PATCH 2/3] Modified the tracetool framework " Mohamad Gebai
2013-09-30 15:05 ` Mohamad Gebai [this message]
2013-10-01 10:04 ` [Qemu-devel] [RFC PATCH 0/3] Fix UST backend " Alex Bennée
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1380553501-20670-4-git-send-email-mohamad.gebai@polymtl.ca \
--to=mohamad.gebai@gmail.com \
--cc=mohamad.gebai@polymtl.ca \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).