[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v5 36/44] tcg/plugins: enable by default for most TCG builds
From: |
Alex Bennée |
Subject: |
[PULL v5 36/44] tcg/plugins: enable by default for most TCG builds |
Date: |
Wed, 14 Jul 2021 16:00:28 +0100 |
Aside from a minor bloat to file size the ability to have TCG plugins
has no real impact on performance unless a plugin is actively loaded.
Even then the libempty.so plugin shows only a minor degradation in
performance caused by the extra book keeping the TCG has to do to keep
track of instructions. As it's a useful feature lets just enable it by
default and reduce our testing matrix a little.
We need to move our linker testing earlier so we can be sure we can
enable the loader module required. As we have ruled out static &
plugins in an earlier patch we can also reduce the indent a little.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210709143005.1554-33-alex.bennee@linaro.org>
diff --git a/docs/devel/tcg-plugins.rst b/docs/devel/tcg-plugins.rst
index 18c6581d85..0cd77c77d2 100644
--- a/docs/devel/tcg-plugins.rst
+++ b/docs/devel/tcg-plugins.rst
@@ -71,7 +71,8 @@ API
Usage
=====
-The QEMU binary needs to be compiled for plugin support::
+Any QEMU binary with TCG support has plugins enabled by default.
+Earlier releases needed to be explicitly enabled with::
configure --enable-plugins
diff --git a/configure b/configure
index e7f2fcd02c..49b5481139 100755
--- a/configure
+++ b/configure
@@ -429,7 +429,7 @@ libxml2="auto"
debug_mutex="no"
libpmem="auto"
default_devices="true"
-plugins="no"
+plugins="$default_feature"
fuzzing="no"
rng_none="no"
secret_keyring="$default_feature"
@@ -2209,6 +2209,8 @@ if test "$static" = "yes" ; then
fi
if test "$plugins" = "yes"; then
error_exit "static and plugins are mutually incompatible"
+ else
+ plugins="no"
fi
fi
@@ -3102,6 +3104,69 @@ for drv in $audio_drv_list; do
esac
done
+##########################################
+# plugin linker support probe
+
+if test "$plugins" != "no"; then
+
+ #########################################
+ # See if --dynamic-list is supported by the linker
+
+ ld_dynamic_list="no"
+ cat > $TMPTXT <<EOF
+{
+ foo;
+};
+EOF
+
+ cat > $TMPC <<EOF
+#include <stdio.h>
+void foo(void);
+
+void foo(void)
+{
+ printf("foo\n");
+}
+
+int main(void)
+{
+ foo();
+ return 0;
+}
+EOF
+
+ if compile_prog "" "-Wl,--dynamic-list=$TMPTXT" ; then
+ ld_dynamic_list="yes"
+ fi
+
+ #########################################
+ # See if -exported_symbols_list is supported by the linker
+
+ ld_exported_symbols_list="no"
+ cat > $TMPTXT <<EOF
+ _foo
+EOF
+
+ if compile_prog "" "-Wl,-exported_symbols_list,$TMPTXT" ; then
+ ld_exported_symbols_list="yes"
+ fi
+
+ if test "$ld_dynamic_list" = "no" &&
+ test "$ld_exported_symbols_list" = "no" ; then
+ if test "$plugins" = "yes"; then
+ error_exit \
+ "Plugin support requires dynamic linking and specifying a set
of symbols " \
+ "that are exported to plugins. Unfortunately your linker
doesn't " \
+ "support the flag (--dynamic-list or -exported_symbols_list)
used " \
+ "for this purpose."
+ else
+ plugins="no"
+ fi
+ else
+ plugins="yes"
+ fi
+fi
+
##########################################
# glib support probe
@@ -3110,7 +3175,7 @@ glib_modules=gthread-2.0
if test "$modules" = yes; then
glib_modules="$glib_modules gmodule-export-2.0"
fi
-if test "$plugins" = yes; then
+if test "$plugins" = "yes"; then
glib_modules="$glib_modules gmodule-2.0"
fi
@@ -3935,61 +4000,6 @@ if compile_prog "" "" ; then
atomic64=yes
fi
-#########################################
-# See if --dynamic-list is supported by the linker
-ld_dynamic_list="no"
-if test "$static" = "no" ; then
- cat > $TMPTXT <<EOF
-{
- foo;
-};
-EOF
-
- cat > $TMPC <<EOF
-#include <stdio.h>
-void foo(void);
-
-void foo(void)
-{
- printf("foo\n");
-}
-
-int main(void)
-{
- foo();
- return 0;
-}
-EOF
-
- if compile_prog "" "-Wl,--dynamic-list=$TMPTXT" ; then
- ld_dynamic_list="yes"
- fi
-fi
-
-#########################################
-# See if -exported_symbols_list is supported by the linker
-
-ld_exported_symbols_list="no"
-if test "$static" = "no" ; then
- cat > $TMPTXT <<EOF
- _foo
-EOF
-
- if compile_prog "" "-Wl,-exported_symbols_list,$TMPTXT" ; then
- ld_exported_symbols_list="yes"
- fi
-fi
-
-if test "$plugins" = "yes" &&
- test "$ld_dynamic_list" = "no" &&
- test "$ld_exported_symbols_list" = "no" ; then
- error_exit \
- "Plugin support requires dynamic linking and specifying a set of symbols
" \
- "that are exported to plugins. Unfortunately your linker doesn't " \
- "support the flag (--dynamic-list or -exported_symbols_list) used " \
- "for this purpose."
-fi
-
########################################
# check if getauxval is available.
diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index d9b834c848..89df51517c 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -354,29 +354,6 @@ build-some-softmmu:
TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
MAKE_CHECK_ARGS: check-tcg
-# Run check-tcg against linux-user (with plugins)
-# we skip sparc64-linux-user until it has been fixed somewhat
-# we skip cris-linux-user as it doesn't use the common run loop
-build-user-plugins:
- extends: .native_build_job_template
- needs:
- job: amd64-debian-user-cross-container
- variables:
- IMAGE: debian-all-test-cross
- CONFIGURE_ARGS: --disable-tools --disable-system --enable-plugins
--enable-debug-tcg --target-list-exclude=sparc64-linux-user,cris-linux-user
- MAKE_CHECK_ARGS: check-tcg
- timeout: 1h 30m
-
-build-some-softmmu-plugins:
- extends: .native_build_job_template
- needs:
- job: amd64-debian-user-cross-container
- variables:
- IMAGE: debian-all-test-cross
- CONFIGURE_ARGS: --disable-tools --disable-user --enable-plugins
--enable-debug-tcg
- TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
- MAKE_CHECK_ARGS: check-tcg
-
clang-system:
extends: .native_build_job_template
needs:
--
2.20.1
- [PULL v5 07/44] disable modular TCG on Darwin, (continued)
- [PULL v5 07/44] disable modular TCG on Darwin, Alex Bennée, 2021/07/14
- [PULL v5 02/44] Jobs based on custom runners: build environment docs and playbook, Alex Bennée, 2021/07/14
- [PULL v5 09/44] gitlab: support for FreeBSD 12, 13 and macOS 11 via cirrus-run, Alex Bennée, 2021/07/14
- [PULL v5 06/44] meson: fix condition for io_uring stubs, Alex Bennée, 2021/07/14
- [PULL v5 10/44] cirrus: delete FreeBSD and macOS jobs, Alex Bennée, 2021/07/14
- [PULL v5 11/44] hw/usb/ccid: remove references to NSS, Alex Bennée, 2021/07/14
- [PULL v5 14/44] tests/docker: use explicit docker.io registry, Alex Bennée, 2021/07/14
- [PULL v5 12/44] tests/docker: don't use BUILDKIT in GitLab either, Alex Bennée, 2021/07/14
- [PULL v5 39/44] docs/devel: tcg-plugins: add execlog plugin description, Alex Bennée, 2021/07/14
- [PULL v5 23/44] tests/docker: expand ubuntu1804 package list, Alex Bennée, 2021/07/14
- [PULL v5 36/44] tcg/plugins: enable by default for most TCG builds,
Alex Bennée <=
- [PULL v5 44/44] MAINTAINERS: Added myself as a reviewer for TCG Plugins, Alex Bennée, 2021/07/14
- [PULL v5 34/44] configure: add an explicit static and plugins check, Alex Bennée, 2021/07/14
- [PULL v5 26/44] tests/vm: update NetBSD to 9.2, Alex Bennée, 2021/07/14
- [PULL v5 24/44] tests/docker: expand ubuntu2004 package list, Alex Bennée, 2021/07/14
- [PULL v5 40/44] plugins: Added a new cache modelling plugin, Alex Bennée, 2021/07/14
- [PULL v5 22/44] tests/docker: expand fedora package list, Alex Bennée, 2021/07/14
- [PULL v5 30/44] meson.build: move TCG plugin summary output, Alex Bennée, 2021/07/14
- [PULL v5 20/44] tests/docker: remove mingw packages from Fedora, Alex Bennée, 2021/07/14
- [PULL v5 43/44] docs/devel: Added cache plugin to the plugins docs, Alex Bennée, 2021/07/14
- [PULL v5 41/44] plugins/cache: Enable cache parameterization, Alex Bennée, 2021/07/14