Commit 68d8ef4e authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/stsquad/tags/pull-tcg-plugins-281019-4' into staging



TCG Plugins initial implementation

  - use --enable-plugins @ configure
  - low impact introspection (-plugin empty.so to measure overhead)
  - plugins cannot alter guest state
  - example plugins included in source tree (tests/plugins)
  - -d plugin to enable plugin output in logs
  - check-tcg runs extra tests when plugins enabled
  - documentation in docs/devel/plugins.rst

# gpg: Signature made Mon 28 Oct 2019 15:13:23 GMT
# gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full]
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* remotes/stsquad/tags/pull-tcg-plugins-281019-4: (57 commits)
  travis.yml: enable linux-gcc-debug-tcg cache
  MAINTAINERS: add me for the TCG plugins code
  scripts/checkpatch.pl: don't complain about (foo, /* empty */)
  .travis.yml: add --enable-plugins tests
  include/exec: wrap cpu_ldst.h in CONFIG_TCG
  accel/stubs: reduce headers from tcg-stub
  tests/plugin: add hotpages to analyse memory access patterns
  tests/plugin: add instruction execution breakdown
  tests/plugin: add a hotblocks plugin
  tests/tcg: enable plugin testing
  tests/tcg: drop test-i386-fprem from TESTS when not SLOW
  tests/tcg: move "virtual" tests to EXTRA_TESTS
  tests/tcg: set QEMU_OPTS for all cris runs
  tests/tcg/Makefile.target: fix path to config-host.mak
  tests/plugin: add sample plugins
  linux-user: support -plugin option
  vl: support -plugin option
  plugin: add qemu_plugin_outs helper
  plugin: add qemu_plugin_insn_disas helper
  plugin: expand the plugin_init function to include an info block
  ...

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 62a23835 19633df8
Loading
Loading
Loading
Loading
+18 −3
Original line number Diff line number Diff line
@@ -135,7 +135,7 @@ matrix:
    # TCG debug can be run just on its own and is mostly agnostic to user/softmmu distinctions
    - env:
        - CONFIG="--enable-debug-tcg --disable-system"
        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug"
        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"


    - env:
@@ -336,14 +336,29 @@ matrix:
    - env:
        - CONFIG="--disable-system --enable-debug-tcg"
        - TEST_CMD="make -j3 check-tcg V=1"
        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"


    # Run check-tcg against linux-user (with plugins)
    # we skip sparc64-linux-user until it has been fixed somewhat
    - env:
        - CONFIG="--disable-system --enable-plugins --enable-debug-tcg --target-list-exclude=sparc64-linux-user"
        - TEST_CMD="make -j3 check-tcg V=1"
        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"


    # Run check-tcg against softmmu targets
    - env:
        - CONFIG="--enable-debug-tcg --target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
        - TEST_CMD="make -j3 check-tcg V=1"
        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-default"
        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"


    # Run check-tcg against softmmu targets (with plugins)
    - env:
        - CONFIG="--enable-plugins --enable-debug-tcg --target-list=xtensa-softmmu,arm-softmmu,aarch64-softmmu,alpha-softmmu"
        - TEST_CMD="make -j3 check-tcg V=1"
        - CACHE_NAME="${TRAVIS_BRANCH}-linux-gcc-debug-tcg"


    # Release builds
+6 −0
Original line number Diff line number Diff line
@@ -2360,6 +2360,12 @@ M: Richard Henderson <rth@twiddle.net>
S: Maintained
F: tcg/

TCG Plugins
M: Alex Bennée <alex.bennee@linaro.org>
S: Maintained
F: plugins/
F: tests/plugin

AArch64 TCG target
M: Claudio Fontana <claudio.fontana@huawei.com>
M: Claudio Fontana <claudio.fontana@gmail.com>
+15 −1
Original line number Diff line number Diff line
@@ -74,6 +74,12 @@ CONFIG_ALL=y
config-host.mak: $(SRC_PATH)/configure $(SRC_PATH)/pc-bios $(SRC_PATH)/VERSION
	@echo $@ is out-of-date, running configure
	@./config.status

# Force configure to re-run if the API symbols are updated
ifeq ($(CONFIG_PLUGIN),y)
config-host.mak: $(SRC_PATH)/plugins/qemu-plugins.symbols
endif

else
config-host.mak:
ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOALS),,fail))
@@ -737,6 +743,7 @@ distclean: clean
	rm -f qemu-doc.fn qemu-doc.fns qemu-doc.info qemu-doc.ky qemu-doc.kys
	rm -f qemu-doc.log qemu-doc.pdf qemu-doc.pg qemu-doc.toc qemu-doc.tp
	rm -f qemu-doc.vr qemu-doc.txt
	rm -f qemu-plugins-ld.symbols qemu-plugins-ld64.symbols
	rm -f config.log
	rm -f linux-headers/asm
	rm -f docs/version.texi
@@ -853,7 +860,11 @@ endif

ICON_SIZES=16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512

install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-localstatedir \
install-includedir:
	$(INSTALL_DIR) "$(DESTDIR)$(includedir)"

install: all $(if $(BUILD_DOCS),install-doc) \
	install-datadir install-localstatedir install-includedir \
	$(if $(INSTALL_BLOBS),$(edk2-decompressed)) \
	recurse-install
ifneq ($(TOOLS),)
@@ -915,6 +926,9 @@ endif
		"$(DESTDIR)$(qemu_desktopdir)/qemu.desktop"
ifdef CONFIG_GTK
	$(MAKE) -C po $@
endif
ifeq ($(CONFIG_PLUGIN),y)
	$(INSTALL_DATA) $(SRC_PATH)/include/qemu/qemu-plugin.h "$(DESTDIR)$(includedir)/qemu-plugin.h"
endif
	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps"
	set -e; for x in $(KEYMAPS); do \
+2 −0
Original line number Diff line number Diff line
@@ -119,6 +119,8 @@ obj-y += disas.o
obj-$(call notempty,$(TARGET_XML_FILES)) += gdbstub-xml.o
LIBS := $(libs_cpu) $(LIBS)

obj-$(CONFIG_PLUGIN) += plugins/

#########################################################
# Linux user emulator target

+0 −1
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@
 */

#include "qemu/osdep.h"
#include "qemu-common.h"
#include "cpu.h"
#include "tcg/tcg.h"
#include "exec/exec-all.h"
Loading