qemu/accel/tcg
Matt Borgerson a392277dcf plugins: Set final instruction count in plugin_gen_tb_end
Translation logic may partially decode an instruction, then abort and
remove the instruction from the TB. This can happen for example when an
instruction spans two pages. In this case, plugins may get an incorrect
result when calling qemu_plugin_tb_n_insns to query for the number of
instructions in the TB. This patch updates plugin_gen_tb_end to set the
final instruction count.

Signed-off-by: Matt Borgerson <contact@mborgerson.com>
[AJB: added g_assert to defed API]
Message-Id: <CADc=-s5RwGViNTR-h5cq3np673W3RRFfhr4vCGJp0EoDUxvhog@mail.gmail.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20231009164104.369749-23-alex.bennee@linaro.org>
2023-10-11 08:46:39 +01:00
..
atomic_common.c.inc tcg: Use HAVE_CMPXCHG128 instead of CONFIG_CMPXCHG128 2023-07-15 08:02:49 +01:00
atomic_template.h accel/tcg: Modify atomic_mmu_lookup() to use CPUState 2023-10-04 11:03:54 -07:00
cpu-exec-common.c accel/tcg: Make cpu-exec-common.c a target agnostic unit 2023-10-04 11:03:54 -07:00
cpu-exec.c accel/tcg: Make monitor.c a target-agnostic unit 2023-10-04 11:03:54 -07:00
cputlb.c accel/tcg: Make cpu-exec-common.c a target agnostic unit 2023-10-04 11:03:54 -07:00
debuginfo.c accel/tcg: Add debuginfo support 2023-01-16 10:14:12 -10:00
debuginfo.h coroutine: Split qemu/coroutine-core.h off qemu/coroutine.h 2023-01-20 07:21:46 +01:00
icount-common.c system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
internal-common.h accel/tcg: Make cpu-exec-common.c a target agnostic unit 2023-10-04 11:03:54 -07:00
internal-target.h accel/tcg: Make cpu-exec-common.c a target agnostic unit 2023-10-04 11:03:54 -07:00
ldst_atomicity.c.inc accel/tcg: Use CPUState in atomicity helpers 2023-10-04 11:03:54 -07:00
ldst_common.c.inc accel/tcg: move ld/st helpers to ldst_common.c.inc 2023-10-04 11:03:54 -07:00
meson.build accel/tcg: Make cpu-exec-common.c a target agnostic unit 2023-10-04 11:03:54 -07:00
monitor.c accel/tcg: Make monitor.c a target-agnostic unit 2023-10-04 11:03:54 -07:00
perf.c accel/tcg: Unmap perf_marker 2023-06-05 12:06:49 -07:00
perf.h tcg: add perfmap and jitdump 2023-01-16 10:14:12 -10:00
plugin-gen.c plugins: Set final instruction count in plugin_gen_tb_end 2023-10-11 08:46:39 +01:00
plugin-helpers.h tcg: exclude non-memory effecting helpers from instrumentation 2023-02-02 11:48:20 +00:00
tb-context.h tcg: Move tb_phys_invalidate_count to tb_ctx 2021-07-09 09:38:33 -07:00
tb-hash.h accel/tcg: Widen pc to vaddr in CPUJumpCache 2023-06-26 17:32:59 +02:00
tb-jmp-cache.h accel/tcg: Widen pc to vaddr in CPUJumpCache 2023-06-26 17:32:59 +02:00
tb-maint.c accel/tcg: Make cpu-exec-common.c a target agnostic unit 2023-10-04 11:03:54 -07:00
tcg-accel-ops-icount.c accel/tcg: Remove cpu_neg() 2023-10-03 08:01:02 -07:00
tcg-accel-ops-icount.h accel/tcg/tcg-accel-ops-rr: ensure fairness with icount 2023-05-11 09:53:41 +01:00
tcg-accel-ops-mttcg.c tcg: Split out tcg init functions to tcg/startup.h 2023-10-04 11:03:54 -07:00
tcg-accel-ops-mttcg.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tcg-accel-ops-rr.c tcg: Split out tcg init functions to tcg/startup.h 2023-10-04 11:03:54 -07:00
tcg-accel-ops-rr.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tcg-accel-ops.c accel/tcg: Remove cpu_neg() 2023-10-03 08:01:02 -07:00
tcg-accel-ops.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tcg-all.c tcg: Split out tcg init functions to tcg/startup.h 2023-10-04 11:03:54 -07:00
tcg-runtime-gvec.c tcg: Add gvec compare with immediate and scalar operand 2023-09-16 14:57:15 +00:00
tcg-runtime.c tcg: Split helper-proto.h 2023-06-05 12:04:29 -07:00
tcg-runtime.h tcg: Add gvec compare with immediate and scalar operand 2023-09-16 14:57:15 +00:00
trace-events accel/tcg: Remove trace events from trace-root.h 2022-12-20 17:11:12 -08:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
translate-all.c accel/tcg: Make monitor.c a target-agnostic unit 2023-10-04 11:03:54 -07:00
translator.c plugins: Set final instruction count in plugin_gen_tb_end 2023-10-11 08:46:39 +01:00
user-exec-stub.c user-exec-stub: remove unused variable 2023-09-25 18:25:03 +02:00
user-exec.c tcg: Correct invalid mentions of 'softmmu' by 'system-mode' 2023-10-07 19:02:33 +02:00