Re: [Qemu-devel] [PATCH] trace: rerun tracetool after ./configure changes

2019-01-29 Thread Stefan Hajnoczi
On Tue, Jan 29, 2019 at 10:53:43AM +0800, Stefan Hajnoczi wrote:
> Autogenerated code in trace.h/trace.c and friends is specific to the
> config-host.mak TRACE_BACKENDS setting and must be regenerated when
> ./configure --enable-trace-backend= changes settings.
> 
> This patch ensures that changes to TRACE_BACKENDS are detected.  For
> example, the trace-root.h file is now updated after switching trace
> backends:
> 
>   $ ./configure && make
>   $ cp trace-root.h /tmp/old-trace-root.h
>   $ ./configure --enable-trace-backend=simple && make
>   $ diff -u /tmp/old-trace-root.h trace-root.h
> 
> Reported-by: Christophe Lyon 
> Signed-off-by: Stefan Hajnoczi 
> ---
>  Makefile | 16 
>  1 file changed, 8 insertions(+), 8 deletions(-)

Thanks, applied to my tracing tree:
https://github.com/stefanha/qemu/commits/tracing

Stefan


signature.asc
Description: PGP signature


Re: [Qemu-devel] [PATCH] trace: rerun tracetool after ./configure changes

2019-01-29 Thread Daniel P . Berrangé
On Tue, Jan 29, 2019 at 10:53:43AM +0800, Stefan Hajnoczi wrote:
> Autogenerated code in trace.h/trace.c and friends is specific to the
> config-host.mak TRACE_BACKENDS setting and must be regenerated when
> ./configure --enable-trace-backend= changes settings.
> 
> This patch ensures that changes to TRACE_BACKENDS are detected.  For
> example, the trace-root.h file is now updated after switching trace
> backends:
> 
>   $ ./configure && make
>   $ cp trace-root.h /tmp/old-trace-root.h
>   $ ./configure --enable-trace-backend=simple && make
>   $ diff -u /tmp/old-trace-root.h trace-root.h
> 
> Reported-by: Christophe Lyon 
> Signed-off-by: Stefan Hajnoczi 
> ---
>  Makefile | 16 
>  1 file changed, 8 insertions(+), 8 deletions(-)

Reviewed-by: Daniel P. Berrangé 


Regards,
Daniel
-- 
|: https://berrange.com  -o-https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o-https://fstop138.berrange.com :|
|: https://entangle-photo.org-o-https://www.instagram.com/dberrange :|



Re: [Qemu-devel] [PATCH] trace: rerun tracetool after ./configure changes

2019-01-28 Thread Philippe Mathieu-Daudé
On 1/29/19 3:53 AM, Stefan Hajnoczi wrote:
> Autogenerated code in trace.h/trace.c and friends is specific to the
> config-host.mak TRACE_BACKENDS setting and must be regenerated when
> ./configure --enable-trace-backend= changes settings.
> 
> This patch ensures that changes to TRACE_BACKENDS are detected.  For
> example, the trace-root.h file is now updated after switching trace
> backends:
> 
>   $ ./configure && make
>   $ cp trace-root.h /tmp/old-trace-root.h
>   $ ./configure --enable-trace-backend=simple && make
>   $ diff -u /tmp/old-trace-root.h trace-root.h
> 
> Reported-by: Christophe Lyon 
> Signed-off-by: Stefan Hajnoczi 

Reviewed-by: Philippe Mathieu-Daudé 

> ---
>  Makefile | 16 
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index de898eab62..4e70cebc6a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -145,7 +145,7 @@ tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool 
> -name "*.py")
>  
>  %/trace.h: %/trace.h-timestamp
>   @cmp $< $@ >/dev/null 2>&1 || cp $< $@
> -%/trace.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y)
> +%/trace.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) 
> $(BUILD_DIR)/config-host.mak
>   $(call quiet-command,$(TRACETOOL) \
>   --group=$(call trace-group-name,$@) \
>   --format=h \
> @@ -154,7 +154,7 @@ tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool 
> -name "*.py")
>  
>  %/trace.c: %/trace.c-timestamp
>   @cmp $< $@ >/dev/null 2>&1 || cp $< $@
> -%/trace.c-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y)
> +%/trace.c-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) 
> $(BUILD_DIR)/config-host.mak
>   $(call quiet-command,$(TRACETOOL) \
>   --group=$(call trace-group-name,$@) \
>   --format=c \
> @@ -163,7 +163,7 @@ tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool 
> -name "*.py")
>  
>  %/trace-ust.h: %/trace-ust.h-timestamp
>   @cmp $< $@ >/dev/null 2>&1 || cp $< $@
> -%/trace-ust.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y)
> +%/trace-ust.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) 
> $(BUILD_DIR)/config-host.mak
>   $(call quiet-command,$(TRACETOOL) \
>   --group=$(call trace-group-name,$@) \
>   --format=ust-events-h \
> @@ -187,7 +187,7 @@ tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool 
> -name "*.py")
>  
>  trace-root.h: trace-root.h-timestamp
>   @cmp $< $@ >/dev/null 2>&1 || cp $< $@
> -trace-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
> +trace-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) 
> $(BUILD_DIR)/config-host.mak
>   $(call quiet-command,$(TRACETOOL) \
>   --group=root \
>   --format=h \
> @@ -196,7 +196,7 @@ trace-root.h-timestamp: $(SRC_PATH)/trace-events 
> $(tracetool-y)
>  
>  trace-root.c: trace-root.c-timestamp
>   @cmp $< $@ >/dev/null 2>&1 || cp $< $@
> -trace-root.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
> +trace-root.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) 
> $(BUILD_DIR)/config-host.mak
>   $(call quiet-command,$(TRACETOOL) \
>   --group=root \
>   --format=c \
> @@ -205,7 +205,7 @@ trace-root.c-timestamp: $(SRC_PATH)/trace-events 
> $(tracetool-y)
>  
>  trace-ust-root.h: trace-ust-root.h-timestamp
>   @cmp $< $@ >/dev/null 2>&1 || cp $< $@
> -trace-ust-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
> +trace-ust-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) 
> $(BUILD_DIR)/config-host.mak
>   $(call quiet-command,$(TRACETOOL) \
>   --group=root \
>   --format=ust-events-h \
> @@ -214,7 +214,7 @@ trace-ust-root.h-timestamp: $(SRC_PATH)/trace-events 
> $(tracetool-y)
>  
>  trace-ust-all.h: trace-ust-all.h-timestamp
>   @cmp $< $@ >/dev/null 2>&1 || cp $< $@
> -trace-ust-all.h-timestamp: $(trace-events-files) $(tracetool-y)
> +trace-ust-all.h-timestamp: $(trace-events-files) $(tracetool-y) 
> $(BUILD_DIR)/config-host.mak
>   $(call quiet-command,$(TRACETOOL) \
>   --group=all \
>   --format=ust-events-h \
> @@ -223,7 +223,7 @@ trace-ust-all.h-timestamp: $(trace-events-files) 
> $(tracetool-y)
>  
>  trace-ust-all.c: trace-ust-all.c-timestamp
>   @cmp $< $@ >/dev/null 2>&1 || cp $< $@
> -trace-ust-all.c-timestamp: $(trace-events-files) $(tracetool-y)
> +trace-ust-all.c-timestamp: $(trace-events-files) $(tracetool-y) 
> $(BUILD_DIR)/config-host.mak
>   $(call quiet-command,$(TRACETOOL) \
>   --group=all \
>   --format=ust-events-c \
> 



[Qemu-devel] [PATCH] trace: rerun tracetool after ./configure changes

2019-01-28 Thread Stefan Hajnoczi
Autogenerated code in trace.h/trace.c and friends is specific to the
config-host.mak TRACE_BACKENDS setting and must be regenerated when
./configure --enable-trace-backend= changes settings.

This patch ensures that changes to TRACE_BACKENDS are detected.  For
example, the trace-root.h file is now updated after switching trace
backends:

  $ ./configure && make
  $ cp trace-root.h /tmp/old-trace-root.h
  $ ./configure --enable-trace-backend=simple && make
  $ diff -u /tmp/old-trace-root.h trace-root.h

Reported-by: Christophe Lyon 
Signed-off-by: Stefan Hajnoczi 
---
 Makefile | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index de898eab62..4e70cebc6a 100644
--- a/Makefile
+++ b/Makefile
@@ -145,7 +145,7 @@ tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool 
-name "*.py")
 
 %/trace.h: %/trace.h-timestamp
@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-%/trace.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y)
+%/trace.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) 
$(BUILD_DIR)/config-host.mak
$(call quiet-command,$(TRACETOOL) \
--group=$(call trace-group-name,$@) \
--format=h \
@@ -154,7 +154,7 @@ tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool 
-name "*.py")
 
 %/trace.c: %/trace.c-timestamp
@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-%/trace.c-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y)
+%/trace.c-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) 
$(BUILD_DIR)/config-host.mak
$(call quiet-command,$(TRACETOOL) \
--group=$(call trace-group-name,$@) \
--format=c \
@@ -163,7 +163,7 @@ tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool 
-name "*.py")
 
 %/trace-ust.h: %/trace-ust.h-timestamp
@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-%/trace-ust.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y)
+%/trace-ust.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) 
$(BUILD_DIR)/config-host.mak
$(call quiet-command,$(TRACETOOL) \
--group=$(call trace-group-name,$@) \
--format=ust-events-h \
@@ -187,7 +187,7 @@ tracetool-y += $(shell find $(SRC_PATH)/scripts/tracetool 
-name "*.py")
 
 trace-root.h: trace-root.h-timestamp
@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
+trace-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) 
$(BUILD_DIR)/config-host.mak
$(call quiet-command,$(TRACETOOL) \
--group=root \
--format=h \
@@ -196,7 +196,7 @@ trace-root.h-timestamp: $(SRC_PATH)/trace-events 
$(tracetool-y)
 
 trace-root.c: trace-root.c-timestamp
@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-root.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
+trace-root.c-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) 
$(BUILD_DIR)/config-host.mak
$(call quiet-command,$(TRACETOOL) \
--group=root \
--format=c \
@@ -205,7 +205,7 @@ trace-root.c-timestamp: $(SRC_PATH)/trace-events 
$(tracetool-y)
 
 trace-ust-root.h: trace-ust-root.h-timestamp
@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-ust-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y)
+trace-ust-root.h-timestamp: $(SRC_PATH)/trace-events $(tracetool-y) 
$(BUILD_DIR)/config-host.mak
$(call quiet-command,$(TRACETOOL) \
--group=root \
--format=ust-events-h \
@@ -214,7 +214,7 @@ trace-ust-root.h-timestamp: $(SRC_PATH)/trace-events 
$(tracetool-y)
 
 trace-ust-all.h: trace-ust-all.h-timestamp
@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-ust-all.h-timestamp: $(trace-events-files) $(tracetool-y)
+trace-ust-all.h-timestamp: $(trace-events-files) $(tracetool-y) 
$(BUILD_DIR)/config-host.mak
$(call quiet-command,$(TRACETOOL) \
--group=all \
--format=ust-events-h \
@@ -223,7 +223,7 @@ trace-ust-all.h-timestamp: $(trace-events-files) 
$(tracetool-y)
 
 trace-ust-all.c: trace-ust-all.c-timestamp
@cmp $< $@ >/dev/null 2>&1 || cp $< $@
-trace-ust-all.c-timestamp: $(trace-events-files) $(tracetool-y)
+trace-ust-all.c-timestamp: $(trace-events-files) $(tracetool-y) 
$(BUILD_DIR)/config-host.mak
$(call quiet-command,$(TRACETOOL) \
--group=all \
--format=ust-events-c \
-- 
2.20.1