qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/14] TCG Plugin inline operation enhancement
@ 2024-01-18  3:23 Pierrick Bouvier
  2024-01-18  3:23 ` [PATCH v2 01/14] plugins: implement inline operation relative to cpu_index Pierrick Bouvier
                   ` (14 more replies)
  0 siblings, 15 replies; 34+ messages in thread
From: Pierrick Bouvier @ 2024-01-18  3:23 UTC (permalink / raw)
  To: qemu-devel
  Cc: Mahmoud Mandour, Paolo Bonzini, Pierrick Bouvier,
	Richard Henderson, Alex Bennée, Alexandre Iooss

This series adds a new thread-safe API to declare inline operation
inside plugins. As well, it removes the existing non thread-safe API,
and migrates all existing plugins to use it.

Tested on Linux (user, system) for i386, x86_64 and aarch64.

To give some context, this a long term series of work around plugins,
with the goal to be able to do basic operations in a more performant and
accurate way. This will mean to add more inline operations and
conditional callbacks.

One final target of this work is to implement a plugin that implements
the icount=auto feature, and allow QEMU to run at a given "frequency"
based on number of instructions executed, without QEMU needing to keep
track of this.

Another final target is to be able to detect control flow changes in an
efficient and elegant way, by combining inline operation and conditional
callbacks.

v2
--

Implement scoreboard API (cpu local storage), so plugins don't have to deal
with how many cpus are used.

Since plugins have been modified again, I didn't transfer any reviewed-by on
those commits.

 Branches:
          base:  upstream/staging
          topic: plugin_inline_per_vcpu

 Pierrick Bouvier (15):
       [TO_REMOVE] commit support
       plugins: implement inline operation relative to cpu_index
       plugins: scoreboard API
       docs/devel: plugins can trigger a tb flush
       plugins: add inline operation per vcpu
       tests/plugin: add test plugin for inline operations
       tests/plugin/mem: migrate to new per_vcpu API
       tests/plugin/insn: migrate to new per_vcpu API
       tests/plugin/bb: migrate to new per_vcpu API
       contrib/plugins/hotblocks: migrate to new per_vcpu API
       contrib/plugins/howvec: migrate to new per_vcpu API
       plugins: remove non per_vcpu inline operation from API
       plugins: register inline op with a qemu_plugin_u64_t
       MAINTAINERS: Add myself as reviewer for TCG Plugins
       contrib/plugins/execlog: fix new warnings

  .gitignore                      |   1 +
  Dockerfile                      |  23 +++++
  MAINTAINERS                     |   1 +
  accel/tcg/plugin-gen.c          |  64 +++++++++++---
  build.sh                        |  18 ++++
  contrib/plugins/execlog.c       |   6 +-
  contrib/plugins/hotblocks.c     |  46 +++++-----
  contrib/plugins/howvec.c        |  50 +++++++----
  docs/devel/multi-thread-tcg.rst |   1 +
  include/qemu/plugin.h           |   9 ++
  include/qemu/qemu-plugin.h      | 135 ++++++++++++++++++++++-------
  mt.cpp                          |  44 ++++++++++
  plugins/api.c                   |  74 ++++++++++++----
  plugins/core.c                  | 112 +++++++++++++++++++++++--
  plugins/plugin.h                |  13 ++-
  plugins/qemu-plugins.symbols    |   9 ++
  run.sh                          |  22 +++++
  test.sh                         |  34 ++++++++
  tests/plugin/bb.c               |  63 ++++++--------
  tests/plugin/inline.c           | 182 ++++++++++++++++++++++++++++++++++++++++
  tests/plugin/insn.c             | 106 +++++++++++------------
  tests/plugin/mem.c              |  39 +++++----
  tests/plugin/meson.build        |   2 +-
  23 files changed, 846 insertions(+), 208 deletions(-)

Pierrick Bouvier (14):
  plugins: implement inline operation relative to cpu_index
  plugins: scoreboard API
  docs/devel: plugins can trigger a tb flush
  plugins: add inline operation per vcpu
  tests/plugin: add test plugin for inline operations
  tests/plugin/mem: migrate to new per_vcpu API
  tests/plugin/insn: migrate to new per_vcpu API
  tests/plugin/bb: migrate to new per_vcpu API
  contrib/plugins/hotblocks: migrate to new per_vcpu API
  contrib/plugins/howvec: migrate to new per_vcpu API
  plugins: remove non per_vcpu inline operation from API
  plugins: register inline op with a qemu_plugin_u64_t
  MAINTAINERS: Add myself as reviewer for TCG Plugins
  contrib/plugins/execlog: fix new warnings

 MAINTAINERS                     |   1 +
 accel/tcg/plugin-gen.c          |  64 +++++++++--
 contrib/plugins/execlog.c       |   6 +-
 contrib/plugins/hotblocks.c     |  46 ++++----
 contrib/plugins/howvec.c        |  50 ++++++---
 docs/devel/multi-thread-tcg.rst |   1 +
 include/qemu/plugin.h           |   9 ++
 include/qemu/qemu-plugin.h      | 135 ++++++++++++++++++-----
 plugins/api.c                   |  74 ++++++++++---
 plugins/core.c                  | 112 +++++++++++++++++++-
 plugins/plugin.h                |  13 ++-
 plugins/qemu-plugins.symbols    |   9 ++
 tests/plugin/bb.c               |  63 +++++------
 tests/plugin/inline.c           | 182 ++++++++++++++++++++++++++++++++
 tests/plugin/insn.c             | 106 +++++++++----------
 tests/plugin/mem.c              |  39 ++++---
 tests/plugin/meson.build        |   2 +-
 17 files changed, 704 insertions(+), 208 deletions(-)
 create mode 100644 tests/plugin/inline.c

-- 
2.43.0



^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2024-02-01  5:29 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-18  3:23 [PATCH v2 00/14] TCG Plugin inline operation enhancement Pierrick Bouvier
2024-01-18  3:23 ` [PATCH v2 01/14] plugins: implement inline operation relative to cpu_index Pierrick Bouvier
2024-01-26 12:07   ` Alex Bennée
2024-01-29 10:10     ` Pierrick Bouvier
2024-01-18  3:23 ` [PATCH v2 02/14] plugins: scoreboard API Pierrick Bouvier
2024-01-26 15:14   ` Alex Bennée
2024-01-30  7:37     ` Pierrick Bouvier
2024-01-30 10:23       ` Alex Bennée
2024-01-30 11:10         ` Pierrick Bouvier
2024-01-31  7:44     ` Pierrick Bouvier
2024-02-01  5:28       ` Pierrick Bouvier
2024-01-18  3:23 ` [PATCH v2 03/14] docs/devel: plugins can trigger a tb flush Pierrick Bouvier
2024-01-18  3:23 ` [PATCH v2 04/14] plugins: add inline operation per vcpu Pierrick Bouvier
2024-01-26 15:17   ` Alex Bennée
2024-01-18  3:23 ` [PATCH v2 05/14] tests/plugin: add test plugin for inline operations Pierrick Bouvier
2024-01-26 16:05   ` Alex Bennée
2024-01-30  7:49     ` Pierrick Bouvier
2024-01-30 14:52       ` Alex Bennée
2024-01-30 16:40         ` Pierrick Bouvier
2024-01-18  3:23 ` [PATCH v2 06/14] tests/plugin/mem: migrate to new per_vcpu API Pierrick Bouvier
2024-01-18  3:23 ` [PATCH v2 07/14] tests/plugin/insn: " Pierrick Bouvier
2024-01-18  3:23 ` [PATCH v2 08/14] tests/plugin/bb: " Pierrick Bouvier
2024-01-18  3:23 ` [PATCH v2 09/14] contrib/plugins/hotblocks: " Pierrick Bouvier
2024-01-18  3:23 ` [PATCH v2 10/14] contrib/plugins/howvec: " Pierrick Bouvier
2024-01-18  3:23 ` [PATCH v2 11/14] plugins: remove non per_vcpu inline operation from API Pierrick Bouvier
2024-01-26 16:26   ` Alex Bennée
2024-01-30  7:53     ` Pierrick Bouvier
2024-01-18  3:23 ` [PATCH v2 12/14] plugins: register inline op with a qemu_plugin_u64_t Pierrick Bouvier
2024-01-18  3:23 ` [PATCH v2 13/14] MAINTAINERS: Add myself as reviewer for TCG Plugins Pierrick Bouvier
2024-01-26 16:27   ` Alex Bennée
2024-01-18  3:23 ` [PATCH v2 14/14] contrib/plugins/execlog: fix new warnings Pierrick Bouvier
2024-01-26 16:31   ` Alex Bennée
2024-01-30  7:51     ` Pierrick Bouvier
2024-01-26  9:21 ` [PATCH v2 00/14] TCG Plugin inline operation enhancement Pierrick Bouvier

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).