[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC 19/48] translate-all: notify plugin code of tb_flush
From: |
Emilio G. Cota |
Subject: |
[Qemu-devel] [RFC 19/48] translate-all: notify plugin code of tb_flush |
Date: |
Thu, 25 Oct 2018 13:20:28 -0400 |
Signed-off-by: Emilio G. Cota <address@hidden>
---
accel/tcg/translate-all.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 3423cf74db..1690e3fd5b 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -1233,6 +1233,8 @@ static gboolean tb_host_size_iter(gpointer key, gpointer
value, gpointer data)
/* flush all the translation blocks */
void do_tb_flush(CPUState *cpu, run_on_cpu_data tb_flush_count)
{
+ bool did_flush = false;
+
mmap_lock();
/* If it is already been done on request of another CPU,
* just retry.
@@ -1240,6 +1242,7 @@ void do_tb_flush(CPUState *cpu, run_on_cpu_data
tb_flush_count)
if (tb_ctx.tb_flush_count != tb_flush_count.host_int) {
goto done;
}
+ did_flush = true;
if (DEBUG_TB_FLUSH_GATE) {
size_t nb_tbs = tcg_nb_tbs();
@@ -1265,6 +1268,9 @@ void do_tb_flush(CPUState *cpu, run_on_cpu_data
tb_flush_count)
done:
mmap_unlock();
+ if (did_flush) {
+ qemu_plugin_flush_cb();
+ }
}
void tb_flush(CPUState *cpu)
--
2.17.1
- [Qemu-devel] [RFC 35/48] target/sparc: prepare for 2-pass translation, (continued)
- [Qemu-devel] [RFC 35/48] target/sparc: prepare for 2-pass translation, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 41/48] configure: add --enable-plugins, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 38/48] translator: implement 2-pass translation, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 27/48] target/sh4: prepare for 2-pass translation (WIP), Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 22/48] cpu: hook plugin vcpu events, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 28/48] target/i386: prepare for 2-pass translation, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 23/48] translator: add plugin_insn argument to translate_insn, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 39/48] plugin: add API symbols to qemu-plugins.symbols, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 18/48] tcg: add memory callbacks for plugins (WIP), Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 10/48] exec: export do_tb_flush, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 19/48] translate-all: notify plugin code of tb_flush,
Emilio G. Cota <=
- [Qemu-devel] [RFC 09/48] tcg: reset runtime helpers when flushing the code cache, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 01/48] cpu: introduce run_on_cpu_no_bql, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 20/48] *-user: notify plugin of exit, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 13/48] xxhash: add qemu_xxhash8, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 48/48] plugin: add a couple of very simple examples, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 12/48] atomic_template: define pre/post macros, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 07/48] tcg: export TCGHelperInfo, Emilio G. Cota, 2018/10/25
- [Qemu-devel] [RFC 08/48] tcg: export tcg_gen_runtime_helper, Emilio G. Cota, 2018/10/25