qemu/accel/tcg
Emilio G. Cota 83974cf4f8 cputlb: bring back tlb_flush_count under !TLB_DEBUG
Commit f0aff0f124 ("cputlb: add assert_cpu_is_self checks") buried
the increment of tlb_flush_count under TLB_DEBUG. This results in
"info jit" always (mis)reporting 0 TLB flushes when !TLB_DEBUG.

Besides, under MTTCG tlb_flush_count is updated by several threads,
so in order not to lose counts we'd either have to use atomic ops
or distribute the counter, which is more scalable.

This patch does the latter by embedding tlb_flush_count in CPUArchState.
The global count is then easily obtained by iterating over the CPU list.

Note that this change also requires updating the accessors to
tlb_flush_count to use atomic_read/set whenever there may be conflicting
accesses (as defined in C11) to it.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2017-10-10 07:37:10 -07:00
..
atomic_template.h accel/tcg: move atomic_template.h to accel/tcg/ 2017-09-17 06:52:19 -07:00
cpu-exec-common.c tcg: make tcg_allowed global 2017-07-04 16:01:16 +02:00
cpu-exec.c tcg: Move USE_DIRECT_JUMP discriminator to tcg/cpu/tcg-target.h 2017-09-07 11:57:34 -07:00
cputlb.c cputlb: bring back tlb_flush_count under !TLB_DEBUG 2017-10-10 07:37:10 -07:00
Makefile.objs accel/tcg: move tcg-runtime to accel/tcg/ 2017-09-17 06:52:19 -07:00
softmmu_template.h accel/tcg: move softmmu_template.h to accel/tcg/ 2017-09-17 06:52:19 -07:00
tcg-all.c tcg: make tcg_allowed global 2017-07-04 16:01:16 +02:00
tcg-runtime.c accel/tcg: move USER code to user-exec.c 2017-09-17 06:52:19 -07:00
tcg-runtime.h accel/tcg: move tcg-runtime to accel/tcg/ 2017-09-17 06:52:19 -07:00
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
translate-all.c cputlb: bring back tlb_flush_count under !TLB_DEBUG 2017-10-10 07:37:10 -07:00
translate-all.h
translator.c tcg: Add generic translation framework 2017-09-06 08:06:47 -07:00
user-exec-stub.c accel/tcg: move user-exec to accel/tcg/ 2017-09-17 06:52:19 -07:00
user-exec.c accel/tcg: move USER code to user-exec.c 2017-09-17 06:52:19 -07:00