From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PULL 16/30] configure, meson: move coroutine options to meson_options.txt
Date: Tue, 15 Feb 2022 10:32:09 +0100 [thread overview]
Message-ID: <20220215093223.110827-17-pbonzini@redhat.com> (raw)
In-Reply-To: <20220215093223.110827-1-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
configure | 31 -------------------------------
meson.build | 11 +++++++++--
meson_options.txt | 4 ++++
scripts/meson-buildoptions.sh | 7 +++++++
4 files changed, 20 insertions(+), 33 deletions(-)
diff --git a/configure b/configure
index 5a4a642846..1cc836ee55 100755
--- a/configure
+++ b/configure
@@ -322,8 +322,6 @@ vss_win32_sdk="$default_feature"
win_sdk="no"
want_tools="$default_feature"
coroutine=""
-coroutine_pool="$default_feature"
-debug_stack_usage="no"
tls_priority="NORMAL"
plugins="$default_feature"
secret_keyring="$default_feature"
@@ -937,12 +935,6 @@ for opt do
;;
--with-coroutine=*) coroutine="$optarg"
;;
- --disable-coroutine-pool) coroutine_pool="no"
- ;;
- --enable-coroutine-pool) coroutine_pool="yes"
- ;;
- --enable-debug-stack-usage) debug_stack_usage="yes"
- ;;
--disable-vhost-net) vhost_net="no"
;;
--enable-vhost-net) vhost_net="yes"
@@ -1258,8 +1250,6 @@ Advanced options (experts only):
--with-vss-sdk=SDK-path enable Windows VSS support in QEMU Guest Agent
--with-win-sdk=SDK-path path to Windows Platform SDK (to build VSS .tlb)
--tls-priority default TLS protocol/cipher priority string
- --enable-debug-stack-usage
- track the maximum stack usage of stacks created by qemu_alloc_stack
--enable-plugins
enable plugins via shared library loading
--disable-containers don't use containers for cross-building
@@ -1289,7 +1279,6 @@ cat << EOF
vhost-kernel vhost kernel backend support
vhost-user vhost-user backend support
vhost-vdpa vhost-vdpa kernel backend support
- coroutine-pool coroutine freelist (better performance)
opengl opengl support
tools build qemu-io, qemu-nbd and qemu-img tools
gio libgio support
@@ -2498,17 +2487,6 @@ else
esac
fi
-if test "$coroutine_pool" = ""; then
- coroutine_pool=yes
-fi
-
-if test "$debug_stack_usage" = "yes"; then
- if test "$coroutine_pool" = "yes"; then
- echo "WARN: disabling coroutine pool for stack usage debugging"
- coroutine_pool=no
- fi
-fi
-
##################################################
# SafeStack
@@ -3102,15 +3080,6 @@ if [ "$bsd" = "yes" ] ; then
fi
echo "CONFIG_COROUTINE_BACKEND=$coroutine" >> $config_host_mak
-if test "$coroutine_pool" = "yes" ; then
- echo "CONFIG_COROUTINE_POOL=1" >> $config_host_mak
-else
- echo "CONFIG_COROUTINE_POOL=0" >> $config_host_mak
-fi
-
-if test "$debug_stack_usage" = "yes" ; then
- echo "CONFIG_DEBUG_STACK_USAGE=y" >> $config_host_mak
-fi
if test "$have_asan_iface_fiber" = "yes" ; then
echo "CONFIG_ASAN_IFACE_FIBER=y" >> $config_host_mak
diff --git a/meson.build b/meson.build
index 8fc23df33d..79ceff64a7 100644
--- a/meson.build
+++ b/meson.build
@@ -1548,7 +1548,14 @@ config_host_data.set_quoted('CONFIG_HOST_DSOSUF', host_dsosuf)
config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device)
config_host_data.set('HOST_WORDS_BIGENDIAN', host_machine.endian() == 'big')
+have_coroutine_pool = get_option('coroutine_pool')
+if get_option('debug_stack_usage') and have_coroutine_pool
+ message('Disabling coroutine pool to measure stack usage')
+ have_coroutine_pool = false
+endif
+config_host_data.set10('CONFIG_COROUTINE_POOL', have_coroutine_pool)
config_host_data.set('CONFIG_DEBUG_MUTEX', get_option('debug_mutex'))
+config_host_data.set('CONFIG_DEBUG_STACK_USAGE', get_option('debug_stack_usage'))
config_host_data.set('CONFIG_GPROF', get_option('gprof'))
config_host_data.set('CONFIG_LIVE_BLOCK_MIGRATION', get_option('live_block_migration').allowed())
config_host_data.set('CONFIG_QOM_CAST_DEBUG', get_option('qom_cast_debug'))
@@ -3403,7 +3410,7 @@ summary_info += {'PIE': get_option('b_pie')}
summary_info += {'static build': config_host.has_key('CONFIG_STATIC')}
summary_info += {'malloc trim support': has_malloc_trim}
summary_info += {'membarrier': have_membarrier}
-summary_info += {'debug stack usage': config_host.has_key('CONFIG_DEBUG_STACK_USAGE')}
+summary_info += {'debug stack usage': get_option('debug_stack_usage')}
summary_info += {'mutex debugging': get_option('debug_mutex')}
summary_info += {'memory allocator': get_option('malloc')}
summary_info += {'avx2 optimization': config_host_data.get('CONFIG_AVX2_OPT')}
@@ -3471,7 +3478,7 @@ summary(summary_info, bool_yn: true, section: 'Targets and accelerators')
# Block layer
summary_info = {}
summary_info += {'coroutine backend': config_host['CONFIG_COROUTINE_BACKEND']}
-summary_info += {'coroutine pool': config_host['CONFIG_COROUTINE_POOL'] == '1'}
+summary_info += {'coroutine pool': have_coroutine_pool}
if have_block
summary_info += {'Block whitelist (rw)': config_host['CONFIG_BDRV_RW_WHITELIST']}
summary_info += {'Block whitelist (ro)': config_host['CONFIG_BDRV_RO_WHITELIST']}
diff --git a/meson_options.txt b/meson_options.txt
index 781e4d5170..03ae957102 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -246,8 +246,12 @@ option('block_drv_whitelist_in_tools', type: 'boolean', value: false,
description: 'use block whitelist also in tools instead of only QEMU')
option('rng_none', type: 'boolean', value: false,
description: 'dummy RNG, avoid using /dev/(u)random and getrandom()')
+option('coroutine_pool', type: 'boolean', value: true,
+ description: 'coroutine freelist (better performance)')
option('debug_mutex', type: 'boolean', value: false,
description: 'mutex debugging support')
+option('debug_stack_usage', type: 'boolean', value: false,
+ description: 'measure coroutine stack usage')
option('qom_cast_debug', type: 'boolean', value: false,
description: 'cast debugging support')
option('gprof', type: 'boolean', value: false,
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index a2d6f34b21..9a6e53a2e7 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -8,7 +8,10 @@ meson_options_help() {
printf "%s\n" ' (choices: auto/disabled/enabled/internal/system)'
printf "%s\n" ' --enable-cfi Control-Flow Integrity (CFI)'
printf "%s\n" ' --enable-cfi-debug Verbose errors in case of CFI violation'
+ printf "%s\n" ' --disable-coroutine-pool coroutine freelist (better performance)'
printf "%s\n" ' --enable-debug-mutex mutex debugging support'
+ printf "%s\n" ' --enable-debug-stack-usage'
+ printf "%s\n" ' measure coroutine stack usage'
printf "%s\n" ' --enable-fdt[=CHOICE] Whether and how to find the libfdt library'
printf "%s\n" ' (choices: auto/disabled/enabled/internal/system)'
printf "%s\n" ' --enable-fuzzing build fuzzing targets'
@@ -164,6 +167,8 @@ _meson_option_parse() {
--disable-cocoa) printf "%s" -Dcocoa=disabled ;;
--enable-coreaudio) printf "%s" -Dcoreaudio=enabled ;;
--disable-coreaudio) printf "%s" -Dcoreaudio=disabled ;;
+ --enable-coroutine-pool) printf "%s" -Dcoroutine_pool=true ;;
+ --disable-coroutine-pool) printf "%s" -Dcoroutine_pool=false ;;
--enable-crypto-afalg) printf "%s" -Dcrypto_afalg=enabled ;;
--disable-crypto-afalg) printf "%s" -Dcrypto_afalg=disabled ;;
--enable-curl) printf "%s" -Dcurl=enabled ;;
@@ -174,6 +179,8 @@ _meson_option_parse() {
--disable-dbus-display) printf "%s" -Ddbus_display=disabled ;;
--enable-debug-mutex) printf "%s" -Ddebug_mutex=true ;;
--disable-debug-mutex) printf "%s" -Ddebug_mutex=false ;;
+ --enable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=true ;;
+ --disable-debug-stack-usage) printf "%s" -Ddebug_stack_usage=false ;;
--enable-dmg) printf "%s" -Ddmg=enabled ;;
--disable-dmg) printf "%s" -Ddmg=disabled ;;
--enable-docs) printf "%s" -Ddocs=enabled ;;
--
2.34.1
next prev parent reply other threads:[~2022-02-15 9:47 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-15 9:31 [PULL 00/30] Misc mostly build system patches for 2022-02-15 Paolo Bonzini
2022-02-15 9:31 ` [PULL 01/30] target/i386: add TCG support for UMIP Paolo Bonzini
2022-02-15 9:31 ` [PULL 02/30] memory: Fix qemu crash on starting dirty log twice with stopped VM Paolo Bonzini
2022-02-15 9:31 ` [PULL 03/30] tests/qemu-iotests/testrunner: Print diff to stderr in TAP mode Paolo Bonzini
2022-02-15 9:31 ` [PULL 04/30] meson: use .allowed() method for features Paolo Bonzini
2022-02-15 9:31 ` [PULL 05/30] meson: use .require() and .disable_auto_if() " Paolo Bonzini
2022-02-15 9:31 ` [PULL 06/30] configure, meson: move AVX tests to meson Paolo Bonzini
2022-02-15 9:32 ` [PULL 07/30] configure, meson: move membarrier test " Paolo Bonzini
2022-02-15 9:32 ` [PULL 08/30] configure, meson: move AF_ALG " Paolo Bonzini
2022-02-15 9:32 ` [PULL 09/30] configure, meson: move libnuma detection " Paolo Bonzini
2022-02-15 9:32 ` [PULL 10/30] configure, meson: move TPM check " Paolo Bonzini
2022-02-15 9:32 ` [PULL 11/30] configure, meson: cleanup qemu-ga libraries Paolo Bonzini
2022-02-15 9:32 ` [PULL 12/30] configure, meson: move image format options to meson_options.txt Paolo Bonzini
2022-02-15 9:32 ` [PULL 13/30] configure, meson: move block layer " Paolo Bonzini
2022-02-15 9:32 ` [PULL 14/30] meson: define qemu_cflags/qemu_ldflags Paolo Bonzini
2022-02-15 9:32 ` [PULL 15/30] configure, meson: move some default-disabled options to meson_options.txt Paolo Bonzini
2023-04-11 9:42 ` Peter Maydell
2022-02-15 9:32 ` Paolo Bonzini [this message]
2022-02-15 9:32 ` [PULL 17/30] configure, meson: move smbd " Paolo Bonzini
2022-02-15 9:32 ` [PULL 18/30] configure, meson: move guest-agent, tools to meson Paolo Bonzini
2022-03-17 22:34 ` Brad Smith
2022-02-15 9:32 ` [PULL 19/30] meson: refine check for whether to look for virglrenderer Paolo Bonzini
2022-02-15 9:32 ` [PULL 20/30] configure, meson: move OpenGL check to meson Paolo Bonzini
2022-02-15 9:32 ` [PULL 21/30] qga/vss-win32: fix midl arguments Paolo Bonzini
2022-02-15 9:32 ` [PULL 22/30] meson: drop --with-win-sdk Paolo Bonzini
2022-02-15 9:32 ` [PULL 23/30] qga/vss-win32: use widl if available Paolo Bonzini
2022-02-15 9:32 ` [PULL 24/30] qga/vss: use standard windows headers location Paolo Bonzini
2022-02-15 9:32 ` [PULL 25/30] configure, meson: replace VSS SDK checks and options with --enable-vss-sdk Paolo Bonzini
2022-02-15 9:32 ` [PULL 26/30] meson: do not make qga/vss-win32/meson.build conditional on C++ presence Paolo Bonzini
2022-02-15 9:32 ` [PULL 27/30] qga/vss-win32: require widl/midl, remove pre-built TLB file Paolo Bonzini
2022-02-15 9:32 ` [PULL 28/30] meson: require dynamic linking for VSS support Paolo Bonzini
2022-02-15 9:32 ` [PULL 29/30] meson, configure: move ntddscsi API check to meson Paolo Bonzini
2022-02-15 9:32 ` [PULL 30/30] configure, meson: move CONFIG_IASL to a Meson option Paolo Bonzini
2022-02-16 9:56 ` [PULL 00/30] Misc mostly build system patches for 2022-02-15 Peter Maydell
2022-02-16 14:03 ` Paolo Bonzini
2022-02-16 14:41 ` Peter Maydell
2022-02-16 21:06 ` Paolo Bonzini
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=20220215093223.110827-17-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).