* [Qemu-devel] [PATCH 0/1] Change default CFLAGS to -O3
@ 2017-01-09 10:01 Jin Guojie
2017-01-09 10:01 ` [Qemu-devel] [PATCH 1/1] " Jin Guojie
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jin Guojie @ 2017-01-09 10:01 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Jin Guojie
* in configure, the default optimization level is changed to O3.
* Tested successfully on following machines:
| Host machine | Host OS | qemu-system | Debian ISO |
|-----------------------------------------------------|
| x86 64 | Fedora25 | i386 | i386 |
| mips 64 le | Fedora25 | i386 | i386 |
Signed-off-by: Jin Guojie <jinguojie@loongson.cn>
Jin Guojie (1):
Change default CFLAGS to -O3
configure | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.9.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Qemu-devel] [PATCH 1/1] Change default CFLAGS to -O3
2017-01-09 10:01 [Qemu-devel] [PATCH 0/1] Change default CFLAGS to -O3 Jin Guojie
@ 2017-01-09 10:01 ` Jin Guojie
2017-01-09 11:18 ` Daniel P. Berrange
2017-01-09 10:33 ` [Qemu-devel] [PATCH 0/1] " Peter Maydell
2017-01-09 11:09 ` Christian Borntraeger
2 siblings, 1 reply; 5+ messages in thread
From: Jin Guojie @ 2017-01-09 10:01 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Jin Guojie
For better performance.
Signed-off-by: Jin Guojie <jinguojie@loongson.cn>
---
configure | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 218df87..8ebc286 100755
--- a/configure
+++ b/configure
@@ -4753,9 +4753,9 @@ if test "$gcov" = "yes" ; then
CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
elif test "$fortify_source" = "yes" ; then
- CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
+ CFLAGS="-O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
elif test "$debug" = "no"; then
- CFLAGS="-O2 $CFLAGS"
+ CFLAGS="-O3 $CFLAGS"
fi
##########################################
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 1/1] Change default CFLAGS to -O3
2017-01-09 10:01 ` [Qemu-devel] [PATCH 1/1] " Jin Guojie
@ 2017-01-09 11:18 ` Daniel P. Berrange
0 siblings, 0 replies; 5+ messages in thread
From: Daniel P. Berrange @ 2017-01-09 11:18 UTC (permalink / raw)
To: Jin Guojie; +Cc: qemu-devel, Paolo Bonzini
On Mon, Jan 09, 2017 at 06:01:23PM +0800, Jin Guojie wrote:
> For better performance.
The commit message needs to have actual data on what the
measured performance improvements are really.
>
> Signed-off-by: Jin Guojie <jinguojie@loongson.cn>
> ---
> configure | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 218df87..8ebc286 100755
> --- a/configure
> +++ b/configure
> @@ -4753,9 +4753,9 @@ if test "$gcov" = "yes" ; then
> CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS"
> LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS"
> elif test "$fortify_source" = "yes" ; then
> - CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
> + CFLAGS="-O3 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS"
> elif test "$debug" = "no"; then
> - CFLAGS="-O2 $CFLAGS"
> + CFLAGS="-O3 $CFLAGS"
> fi
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 0/1] Change default CFLAGS to -O3
2017-01-09 10:01 [Qemu-devel] [PATCH 0/1] Change default CFLAGS to -O3 Jin Guojie
2017-01-09 10:01 ` [Qemu-devel] [PATCH 1/1] " Jin Guojie
@ 2017-01-09 10:33 ` Peter Maydell
2017-01-09 11:09 ` Christian Borntraeger
2 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2017-01-09 10:33 UTC (permalink / raw)
To: Jin Guojie; +Cc: QEMU Developers, Paolo Bonzini
On 9 January 2017 at 10:01, Jin Guojie <jinguojie@loongson.cn> wrote:
> * in configure, the default optimization level is changed to O3.
> * Tested successfully on following machines:
>
> | Host machine | Host OS | qemu-system | Debian ISO |
> |-----------------------------------------------------|
> | x86 64 | Fedora25 | i386 | i386 |
> | mips 64 le | Fedora25 | i386 | i386 |
>
> Signed-off-by: Jin Guojie <jinguojie@loongson.cn>
>
> Jin Guojie (1):
> Change default CFLAGS to -O3
>
> configure | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
...so what are the measured performance improvements from
this change? As I understand it -O3 is where the "trade off
code size for speed" optimisations kick in, so we need
to benchmark to be sure that the increased icache usage
doesn't outweigh any speed gains. -O3 is not guaranteed
to be strictly better than -O2 (which is why for instance
Debian and Gentoo recommend -O2 as their default).
thanks
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH 0/1] Change default CFLAGS to -O3
2017-01-09 10:01 [Qemu-devel] [PATCH 0/1] Change default CFLAGS to -O3 Jin Guojie
2017-01-09 10:01 ` [Qemu-devel] [PATCH 1/1] " Jin Guojie
2017-01-09 10:33 ` [Qemu-devel] [PATCH 0/1] " Peter Maydell
@ 2017-01-09 11:09 ` Christian Borntraeger
2 siblings, 0 replies; 5+ messages in thread
From: Christian Borntraeger @ 2017-01-09 11:09 UTC (permalink / raw)
To: Jin Guojie, qemu-devel; +Cc: Paolo Bonzini
On 01/09/2017 11:01 AM, Jin Guojie wrote:
> * in configure, the default optimization level is changed to O3.
> * Tested successfully on following machines:
>
> | Host machine | Host OS | qemu-system | Debian ISO |
> |-----------------------------------------------------|
> | x86 64 | Fedora25 | i386 | i386 |
> | mips 64 le | Fedora25 | i386 | i386 |
>
> Signed-off-by: Jin Guojie <jinguojie@loongson.cn>
>
> Jin Guojie (1):
> Change default CFLAGS to -O3
>
> configure | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
There are some compilers that trigger some maybe Warnings with -O3
e.g.
CC block/vmdk.o
/home/cborntra/REPOS/qemu/block/vmdk.c: In function ‘vmdk_open_vmdk4’:
/home/cborntra/REPOS/qemu/block/vmdk.c:718:24: error: ‘extent’ may be
used uninitialized in this function [-Werror=maybe-uninitialized]
extent->has_marker = le32_to_cpu(header.flags) & VMDK4_FLAG_MARKER;
^
/home/cborntra/REPOS/qemu/block/vmdk.c: In function ‘vmdk_open_sparse’:
/home/cborntra/REPOS/qemu/block/vmdk.c:530:9: error: ‘extent’ may be
used uninitialized in this function [-Werror=maybe-uninitialized]
ret = vmdk_init_tables(bs, extent, errp);
^
/home/cborntra/REPOS/qemu/block/vmdk.c:509:17: note: ‘extent’ was
declared here
VmdkExtent *extent;
^
/home/cborntra/REPOS/qemu/block/vmdk.c: In function
‘vmdk_open_desc_file.isra.12’:
/home/cborntra/REPOS/qemu/block/vmdk.c:873:39: error: ‘extent’ may be
used uninitialized in this function [-Werror=maybe-uninitialized]
extent->flat_start_offset = flat_offset << 9;
^
/home/cborntra/REPOS/qemu/block/vmdk.c:803:17: note: ‘extent’ was
declared here
VmdkExtent *extent;
^
cc1: all warnings being treated as errors
/home/cborntra/REPOS/qemu/rules.mak:60: recipe for target 'block/vmdk.o'
failed
I have started fixing those some time ago but had no time yet finishing that.
Totally messy patches (in terms of patch description) at
https://github.com/borntraeger/qemu/commits/o3
Christian
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-01-09 11:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-09 10:01 [Qemu-devel] [PATCH 0/1] Change default CFLAGS to -O3 Jin Guojie
2017-01-09 10:01 ` [Qemu-devel] [PATCH 1/1] " Jin Guojie
2017-01-09 11:18 ` Daniel P. Berrange
2017-01-09 10:33 ` [Qemu-devel] [PATCH 0/1] " Peter Maydell
2017-01-09 11:09 ` Christian Borntraeger
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).