* [Qemu-devel] [Tracing][PATCH] Compilation fixes
@ 2010-08-05 12:05 Prerna Saxena
2010-08-05 14:45 ` [Qemu-devel] " Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Prerna Saxena @ 2010-08-05 12:05 UTC (permalink / raw)
To: qemu-devel; +Cc: Mahesh, Ananth Narayan, Stefan Hajnoczi
Fix to ensure rebuild is properly triggered when switching trace backends
using ./configure.
Also, when using the 'ust' backend, check if the relevant headers are
available at host.
Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
---
Makefile | 4 ++--
configure | 20 +++++++++++++++++---
2 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 8831174..3bd41ce 100644
--- a/Makefile
+++ b/Makefile
@@ -132,10 +132,10 @@ bt-host.o: QEMU_CFLAGS += $(BLUEZ_CFLAGS)
iov.o: iov.c iov.h
-trace.h: $(SRC_PATH)/trace-events
+trace.h: $(SRC_PATH)/trace-events config-host.mak
$(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -h < $< > $@," GEN $@")
-trace.c: $(SRC_PATH)/trace-events
+trace.c: $(SRC_PATH)/trace-events config-host.mak
$(call quiet-command,sh $(SRC_PATH)/tracetool --$(TRACE_BACKEND) -c < $< > $@," GEN $@")
trace.o: trace.c $(GENERATED_HEADERS)
diff --git a/configure b/configure
index fe1b027..ee9f1e3 100755
--- a/configure
+++ b/configure
@@ -2011,6 +2011,23 @@ if test "$?" -ne 0 ; then
exit 1
fi
+##########################################
+# For 'ust' backend, test if ust headers are present
+if test "$trace_backend" = "ust"; then
+ cat > $TMPC << EOF
+#include <ust/tracepoint.h>
+#include <ust/marker.h>
+int main(void) { return 0; }
+EOF
+ if compile_prog "" "" ; then
+ LIBS="-lust $LIBS"
+ else
+ echo "ERROR: Trace backend 'ust' does not have relevant headers available"
+ echo " on the host. Pls choose a different backend."
+ exit 1
+ fi
+fi
+##########################################
# End of CC checks
# After here, no more $cc or $ld runs
@@ -2392,9 +2409,6 @@ echo "TRACE_BACKEND=$trace_backend" >> $config_host_mak
if test "$trace_backend" = "simple"; then
echo "CONFIG_SIMPLE_TRACE=y" >> $config_host_mak
fi
-if test "$trace_backend" = "ust"; then
- LIBS="-lust $LIBS"
-fi
# Set the appropriate trace file.
if test "$trace_backend" = "simple"; then
trace_file="\"$trace_file-%u\""
--
1.6.2.5
--
Prerna Saxena
Linux Technology Centre,
IBM Systems and Technology Lab,
Bangalore, India
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Qemu-devel] Re: [Tracing][PATCH] Compilation fixes
2010-08-05 12:05 [Qemu-devel] [Tracing][PATCH] Compilation fixes Prerna Saxena
@ 2010-08-05 14:45 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2010-08-05 14:45 UTC (permalink / raw)
To: Prerna Saxena; +Cc: Mahesh, Ananth Narayan, qemu-devel
On Thu, Aug 05, 2010 at 05:35:35PM +0530, Prerna Saxena wrote:
> Fix to ensure rebuild is properly triggered when switching trace backends
> using ./configure.
> Also, when using the 'ust' backend, check if the relevant headers are
> available at host.
>
> Signed-off-by: Prerna Saxena <prerna@linux.vnet.ibm.com>
> ---
> Makefile | 4 ++--
> configure | 20 +++++++++++++++++---
> 2 files changed, 19 insertions(+), 5 deletions(-)
Applied thanks!
http://repo.or.cz/w/qemu/stefanha.git/commitdiff/431b29107008775db1dd8c4eb69dc59573017d98
Before submitting the tracing branch for qemu.git I'd like to break this
in half and squash the halves with the trace-events file and UST
commits.
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-05 18:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-05 12:05 [Qemu-devel] [Tracing][PATCH] Compilation fixes Prerna Saxena
2010-08-05 14:45 ` [Qemu-devel] " Stefan Hajnoczi
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).