* [PATCH v2] tools: probe for existence of qemu-xen stderr trace backend.
@ 2016-02-11 12:11 Ian Campbell
2016-02-11 12:55 ` Paul Durrant
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Ian Campbell @ 2016-02-11 12:11 UTC (permalink / raw)
To: ian.jackson, wei.liu2, xen-devel, stefano.stabellini
Cc: Anthony PERARD, Paul Durrant, Ian Campbell
QEMU upstream commit ed7f5f1d8db0 ("trace: convert stderr backend to
log") renamed the "stderr" trace backend to "log", which breaks the
xen build when pointed at a QEMU tree after that point:
./configure of QEMU fail with:
"ERROR: invalid trace backends
Please choose supported trace backends."
Upstream also changed, in baf86d6b3ca0 ("trace: switch default backend
to "log""), to use "log" as the default backend (previously it was
"nop").
Use ./scripts/tracetool.py to check for the presence of the stderr
backend and if it is present then explicitly enable it. If the stderr
backend is not present then assume a newer QEMU which defaults to
"log" and simply accept that default (there is a 1 commit window
upstream where this would result in no trace backend being enabled).
The check is done using the older (deprecated?) --check-backend/--backend
variant of the tracetool.py options rather than the new plural
versions since the singular was supported even by very old versions of
QEMU. New QEMU has compatibility code but if/when that is removed we
will still do the right thing i.e. no explict configuiration resulting
in the upstream default (currently "log").
If the explicit selection of the "stderr" backend is required then it
is now done unconditionally (not depending on debug=y), which is
simpler to arrange here but also matches the newer upstream's default
to "log" which is not conditional on debug being enabled either.
Tested with current qemu-xen-unstable (e9d8252) and current QEMU
upstream master (88c73d1), both out of tree via
QEMU_UPSTREAM_URL=/path/to/qemu-xen.git.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Paul Durrant <paul.durrant@citrix.com>
Cc: Anthony PERARD <anthony.perard@citrix.com>
---
v2: Just probe for stderr, otherwise assume the new upstream default
of log is what we will get anyway. Substantially rewrite commit
message.
---
tools/Makefile | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/Makefile b/tools/Makefile
index cb8652c..3f45fb9 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -228,7 +228,7 @@ qemu-xen-dir-force-update: qemu-xen-dir-find
fi
ifeq ($(debug),y)
-QEMU_XEN_ENABLE_DEBUG := --enable-debug --enable-trace-backend=stderr
+QEMU_XEN_ENABLE_DEBUG := --enable-debug
else
QEMU_XEN_ENABLE_DEBUG :=
endif
@@ -240,8 +240,14 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
source=.; \
fi; \
cd qemu-xen-dir; \
+ if $$source/scripts/tracetool.py --check-backend --backend stderr ; then \
+ enable_trace_backend='--enable-trace-backend=stderr'; \
+ else \
+ enable_trace_backend='' ; \
+ fi ; \
$$source/configure --enable-xen --target-list=i386-softmmu \
$(QEMU_XEN_ENABLE_DEBUG) \
+ $$enable_trace_backend \
--prefix=$(LIBEXEC) \
--libdir=$(LIBEXEC_LIB) \
--includedir=$(LIBEXEC_INC) \
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2] tools: probe for existence of qemu-xen stderr trace backend.
2016-02-11 12:11 [PATCH v2] tools: probe for existence of qemu-xen stderr trace backend Ian Campbell
@ 2016-02-11 12:55 ` Paul Durrant
2016-02-11 16:19 ` Stefano Stabellini
2016-02-11 16:30 ` Wei Liu
2 siblings, 0 replies; 5+ messages in thread
From: Paul Durrant @ 2016-02-11 12:55 UTC (permalink / raw)
To: Ian Jackson, Wei Liu, xen-devel@lists.xen.org, Stefano Stabellini
Cc: Anthony Perard, Ian Campbell
> -----Original Message-----
> From: Ian Campbell [mailto:ian.campbell@citrix.com]
> Sent: 11 February 2016 12:11
> To: Ian Jackson; Wei Liu; xen-devel@lists.xen.org; Stefano Stabellini
> Cc: Ian Campbell; Paul Durrant; Anthony Perard
> Subject: [PATCH v2] tools: probe for existence of qemu-xen stderr trace
> backend.
>
> QEMU upstream commit ed7f5f1d8db0 ("trace: convert stderr backend to
> log") renamed the "stderr" trace backend to "log", which breaks the
> xen build when pointed at a QEMU tree after that point:
>
> ./configure of QEMU fail with:
> "ERROR: invalid trace backends
> Please choose supported trace backends."
>
> Upstream also changed, in baf86d6b3ca0 ("trace: switch default backend
> to "log""), to use "log" as the default backend (previously it was
> "nop").
>
> Use ./scripts/tracetool.py to check for the presence of the stderr
> backend and if it is present then explicitly enable it. If the stderr
> backend is not present then assume a newer QEMU which defaults to
> "log" and simply accept that default (there is a 1 commit window
> upstream where this would result in no trace backend being enabled).
>
> The check is done using the older (deprecated?) --check-backend/--backend
> variant of the tracetool.py options rather than the new plural
> versions since the singular was supported even by very old versions of
> QEMU. New QEMU has compatibility code but if/when that is removed we
> will still do the right thing i.e. no explict configuiration resulting
> in the upstream default (currently "log").
>
> If the explicit selection of the "stderr" backend is required then it
> is now done unconditionally (not depending on debug=y), which is
> simpler to arrange here but also matches the newer upstream's default
> to "log" which is not conditional on debug being enabled either.
>
> Tested with current qemu-xen-unstable (e9d8252) and current QEMU
> upstream master (88c73d1), both out of tree via
> QEMU_UPSTREAM_URL=/path/to/qemu-xen.git.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Cc: Paul Durrant <paul.durrant@citrix.com>
LGTM.
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
> Cc: Anthony PERARD <anthony.perard@citrix.com>
> ---
> v2: Just probe for stderr, otherwise assume the new upstream default
> of log is what we will get anyway. Substantially rewrite commit
> message.
> ---
> tools/Makefile | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/tools/Makefile b/tools/Makefile
> index cb8652c..3f45fb9 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -228,7 +228,7 @@ qemu-xen-dir-force-update: qemu-xen-dir-find
> fi
>
> ifeq ($(debug),y)
> -QEMU_XEN_ENABLE_DEBUG := --enable-debug --enable-trace-
> backend=stderr
> +QEMU_XEN_ENABLE_DEBUG := --enable-debug
> else
> QEMU_XEN_ENABLE_DEBUG :=
> endif
> @@ -240,8 +240,14 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
> source=.; \
> fi; \
> cd qemu-xen-dir; \
> + if $$source/scripts/tracetool.py --check-backend --backend stderr ;
> then \
> + enable_trace_backend='--enable-trace-backend=stderr'; \
> + else \
> + enable_trace_backend='' ; \
> + fi ; \
> $$source/configure --enable-xen --target-list=i386-softmmu \
> $(QEMU_XEN_ENABLE_DEBUG) \
> + $$enable_trace_backend \
> --prefix=$(LIBEXEC) \
> --libdir=$(LIBEXEC_LIB) \
> --includedir=$(LIBEXEC_INC) \
> --
> 2.1.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] tools: probe for existence of qemu-xen stderr trace backend.
2016-02-11 12:11 [PATCH v2] tools: probe for existence of qemu-xen stderr trace backend Ian Campbell
2016-02-11 12:55 ` Paul Durrant
@ 2016-02-11 16:19 ` Stefano Stabellini
2016-02-11 16:30 ` Wei Liu
2 siblings, 0 replies; 5+ messages in thread
From: Stefano Stabellini @ 2016-02-11 16:19 UTC (permalink / raw)
To: Ian Campbell
Cc: wei.liu2, stefano.stabellini, ian.jackson, xen-devel,
Paul Durrant, Anthony PERARD
On Thu, 11 Feb 2016, Ian Campbell wrote:
> QEMU upstream commit ed7f5f1d8db0 ("trace: convert stderr backend to
> log") renamed the "stderr" trace backend to "log", which breaks the
> xen build when pointed at a QEMU tree after that point:
>
> ./configure of QEMU fail with:
> "ERROR: invalid trace backends
> Please choose supported trace backends."
>
> Upstream also changed, in baf86d6b3ca0 ("trace: switch default backend
> to "log""), to use "log" as the default backend (previously it was
> "nop").
>
> Use ./scripts/tracetool.py to check for the presence of the stderr
> backend and if it is present then explicitly enable it. If the stderr
> backend is not present then assume a newer QEMU which defaults to
> "log" and simply accept that default (there is a 1 commit window
> upstream where this would result in no trace backend being enabled).
>
> The check is done using the older (deprecated?) --check-backend/--backend
> variant of the tracetool.py options rather than the new plural
> versions since the singular was supported even by very old versions of
> QEMU. New QEMU has compatibility code but if/when that is removed we
> will still do the right thing i.e. no explict configuiration resulting
> in the upstream default (currently "log").
>
> If the explicit selection of the "stderr" backend is required then it
> is now done unconditionally (not depending on debug=y), which is
> simpler to arrange here but also matches the newer upstream's default
> to "log" which is not conditional on debug being enabled either.
>
> Tested with current qemu-xen-unstable (e9d8252) and current QEMU
> upstream master (88c73d1), both out of tree via
> QEMU_UPSTREAM_URL=/path/to/qemu-xen.git.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Cc: Paul Durrant <paul.durrant@citrix.com>
> Cc: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> v2: Just probe for stderr, otherwise assume the new upstream default
> of log is what we will get anyway. Substantially rewrite commit
> message.
> ---
> tools/Makefile | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/tools/Makefile b/tools/Makefile
> index cb8652c..3f45fb9 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -228,7 +228,7 @@ qemu-xen-dir-force-update: qemu-xen-dir-find
> fi
>
> ifeq ($(debug),y)
> -QEMU_XEN_ENABLE_DEBUG := --enable-debug --enable-trace-backend=stderr
> +QEMU_XEN_ENABLE_DEBUG := --enable-debug
> else
> QEMU_XEN_ENABLE_DEBUG :=
> endif
> @@ -240,8 +240,14 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
> source=.; \
> fi; \
> cd qemu-xen-dir; \
> + if $$source/scripts/tracetool.py --check-backend --backend stderr ; then \
> + enable_trace_backend='--enable-trace-backend=stderr'; \
> + else \
> + enable_trace_backend='' ; \
> + fi ; \
> $$source/configure --enable-xen --target-list=i386-softmmu \
> $(QEMU_XEN_ENABLE_DEBUG) \
> + $$enable_trace_backend \
> --prefix=$(LIBEXEC) \
> --libdir=$(LIBEXEC_LIB) \
> --includedir=$(LIBEXEC_INC) \
> --
> 2.1.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] tools: probe for existence of qemu-xen stderr trace backend.
2016-02-11 12:11 [PATCH v2] tools: probe for existence of qemu-xen stderr trace backend Ian Campbell
2016-02-11 12:55 ` Paul Durrant
2016-02-11 16:19 ` Stefano Stabellini
@ 2016-02-11 16:30 ` Wei Liu
2016-02-11 17:09 ` Ian Campbell
2 siblings, 1 reply; 5+ messages in thread
From: Wei Liu @ 2016-02-11 16:30 UTC (permalink / raw)
To: Ian Campbell
Cc: wei.liu2, stefano.stabellini, ian.jackson, xen-devel,
Paul Durrant, Anthony PERARD
On Thu, Feb 11, 2016 at 12:11:21PM +0000, Ian Campbell wrote:
> QEMU upstream commit ed7f5f1d8db0 ("trace: convert stderr backend to
> log") renamed the "stderr" trace backend to "log", which breaks the
> xen build when pointed at a QEMU tree after that point:
>
> ./configure of QEMU fail with:
> "ERROR: invalid trace backends
> Please choose supported trace backends."
>
> Upstream also changed, in baf86d6b3ca0 ("trace: switch default backend
> to "log""), to use "log" as the default backend (previously it was
> "nop").
>
> Use ./scripts/tracetool.py to check for the presence of the stderr
> backend and if it is present then explicitly enable it. If the stderr
> backend is not present then assume a newer QEMU which defaults to
> "log" and simply accept that default (there is a 1 commit window
> upstream where this would result in no trace backend being enabled).
>
> The check is done using the older (deprecated?) --check-backend/--backend
> variant of the tracetool.py options rather than the new plural
> versions since the singular was supported even by very old versions of
> QEMU. New QEMU has compatibility code but if/when that is removed we
> will still do the right thing i.e. no explict configuiration resulting
> in the upstream default (currently "log").
>
> If the explicit selection of the "stderr" backend is required then it
> is now done unconditionally (not depending on debug=y), which is
> simpler to arrange here but also matches the newer upstream's default
> to "log" which is not conditional on debug being enabled either.
>
> Tested with current qemu-xen-unstable (e9d8252) and current QEMU
> upstream master (88c73d1), both out of tree via
> QEMU_UPSTREAM_URL=/path/to/qemu-xen.git.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Cc: Paul Durrant <paul.durrant@citrix.com>
> Cc: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
> ---
> v2: Just probe for stderr, otherwise assume the new upstream default
> of log is what we will get anyway. Substantially rewrite commit
> message.
> ---
> tools/Makefile | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/tools/Makefile b/tools/Makefile
> index cb8652c..3f45fb9 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -228,7 +228,7 @@ qemu-xen-dir-force-update: qemu-xen-dir-find
> fi
>
> ifeq ($(debug),y)
> -QEMU_XEN_ENABLE_DEBUG := --enable-debug --enable-trace-backend=stderr
> +QEMU_XEN_ENABLE_DEBUG := --enable-debug
> else
> QEMU_XEN_ENABLE_DEBUG :=
> endif
> @@ -240,8 +240,14 @@ subdir-all-qemu-xen-dir: qemu-xen-dir-find
> source=.; \
> fi; \
> cd qemu-xen-dir; \
> + if $$source/scripts/tracetool.py --check-backend --backend stderr ; then \
> + enable_trace_backend='--enable-trace-backend=stderr'; \
> + else \
> + enable_trace_backend='' ; \
> + fi ; \
> $$source/configure --enable-xen --target-list=i386-softmmu \
> $(QEMU_XEN_ENABLE_DEBUG) \
> + $$enable_trace_backend \
> --prefix=$(LIBEXEC) \
> --libdir=$(LIBEXEC_LIB) \
> --includedir=$(LIBEXEC_INC) \
> --
> 2.1.4
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] tools: probe for existence of qemu-xen stderr trace backend.
2016-02-11 16:30 ` Wei Liu
@ 2016-02-11 17:09 ` Ian Campbell
0 siblings, 0 replies; 5+ messages in thread
From: Ian Campbell @ 2016-02-11 17:09 UTC (permalink / raw)
To: Wei Liu
Cc: Anthony PERARD, stefano.stabellini, ian.jackson, Paul Durrant,
xen-devel
On Thu, 2016-02-11 at 16:30 +0000, Wei Liu wrote:
> On Thu, Feb 11, 2016 at 12:11:21PM +0000, Ian Campbell wrote:
> > QEMU upstream commit ed7f5f1d8db0 ("trace: convert stderr backend to
> > log") renamed the "stderr" trace backend to "log", which breaks the
> > xen build when pointed at a QEMU tree after that point:
> >
> > ./configure of QEMU fail with:
> > "ERROR: invalid trace backends
> > Please choose supported trace backends."
> >
> > Upstream also changed, in baf86d6b3ca0 ("trace: switch default backend
> > to "log""), to use "log" as the default backend (previously it was
> > "nop").
> >
> > Use ./scripts/tracetool.py to check for the presence of the stderr
> > backend and if it is present then explicitly enable it. If the stderr
> > backend is not present then assume a newer QEMU which defaults to
> > "log" and simply accept that default (there is a 1 commit window
> > upstream where this would result in no trace backend being enabled).
> >
> > The check is done using the older (deprecated?) --check-backend/
> > --backend
> > variant of the tracetool.py options rather than the new plural
> > versions since the singular was supported even by very old versions of
> > QEMU. New QEMU has compatibility code but if/when that is removed we
> > will still do the right thing i.e. no explict configuiration resulting
> > in the upstream default (currently "log").
> >
> > If the explicit selection of the "stderr" backend is required then it
> > is now done unconditionally (not depending on debug=y), which is
> > simpler to arrange here but also matches the newer upstream's default
> > to "log" which is not conditional on debug being enabled either.
> >
> > Tested with current qemu-xen-unstable (e9d8252) and current QEMU
> > upstream master (88c73d1), both out of tree via
> > QEMU_UPSTREAM_URL=/path/to/qemu-xen.git.
> >
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> > Cc: Paul Durrant <paul.durrant@citrix.com>
> > Cc: Anthony PERARD <anthony.perard@citrix.com>
>
> Acked-by: Wei Liu <wei.liu2@citrix.com>
Thanks, applied.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-02-11 17:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-11 12:11 [PATCH v2] tools: probe for existence of qemu-xen stderr trace backend Ian Campbell
2016-02-11 12:55 ` Paul Durrant
2016-02-11 16:19 ` Stefano Stabellini
2016-02-11 16:30 ` Wei Liu
2016-02-11 17:09 ` Ian Campbell
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).