qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: Christophe Lyon <christophe.lyon@st.com>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] trace: rerun tracetool after ./configure changes
Date: Tue, 29 Jan 2019 07:49:56 +0100	[thread overview]
Message-ID: <49271e18-0f23-6824-3666-32e4dd6ff43f@redhat.com> (raw)
In-Reply-To: <20190129025343.4788-1-stefanha@redhat.com>

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 <christophe.lyon@st.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  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 \
> 

  reply	other threads:[~2019-01-29  6:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-29  2:53 [Qemu-devel] [PATCH] trace: rerun tracetool after ./configure changes Stefan Hajnoczi
2019-01-29  6:49 ` Philippe Mathieu-Daudé [this message]
2019-01-29 10:44 ` Daniel P. Berrangé
2019-01-30  3:00 ` Stefan Hajnoczi

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=49271e18-0f23-6824-3666-32e4dd6ff43f@redhat.com \
    --to=philmd@redhat.com \
    --cc=christophe.lyon@st.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).