aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2023-05-01 13:34:43 -0400
committerKevin Wolf <kwolf@redhat.com>2023-05-10 14:16:54 +0200
commit58a2e3f5c37be02dac3086b81bdda9414b931edf (patch)
treec7d848ec1ee79f0b784decade1800867e67f0315 /meson.build
parente19b157f3c66c44e3b89cb50a2030f0187b968e9 (diff)
downloadqemu-58a2e3f5c37be02dac3086b81bdda9414b931edf.zip
qemu-58a2e3f5c37be02dac3086b81bdda9414b931edf.tar.gz
qemu-58a2e3f5c37be02dac3086b81bdda9414b931edf.tar.bz2
block: compile out assert_bdrv_graph_readable() by default
reader_count() is a performance bottleneck because the global aio_context_list_lock mutex causes thread contention. Put this debugging assertion behind a new ./configure --enable-debug-graph-lock option and disable it by default. The --enable-debug-graph-lock option is also enabled by the more general --enable-debug option. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20230501173443.153062-1-stefanha@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build2
1 files changed, 2 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index c56e0fe..6465554 100644
--- a/meson.build
+++ b/meson.build
@@ -1963,6 +1963,7 @@ if get_option('debug_stack_usage') and have_coroutine_pool
have_coroutine_pool = false
endif
config_host_data.set10('CONFIG_COROUTINE_POOL', have_coroutine_pool)
+config_host_data.set('CONFIG_DEBUG_GRAPH_LOCK', get_option('debug_graph_lock'))
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'))
@@ -3841,6 +3842,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 graph lock': get_option('debug_graph_lock')}
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')}