]> git.proxmox.com Git - mirror_qemu.git/commit
tcg: distribute profiling counters across TCGContext's
authorEmilio G. Cota <cota@braap.org>
Wed, 5 Jul 2017 23:35:06 +0000 (19:35 -0400)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 24 Oct 2017 20:53:42 +0000 (13:53 -0700)
commitc3fac1138e13f8074168ee32a46afd6f3ff49059
treed75702ab689a9879a0ce1de16fd42733a56c8f8b
parentdf2cce2968069526553d82331ce9817eaca6b03a
tcg: distribute profiling counters across TCGContext's

This is groundwork for supporting multiple TCG contexts.

To avoid scalability issues when profiling info is enabled, this patch
makes the profiling info counters distributed via the following changes:

1) Consolidate profile info into its own struct, TCGProfile, which
   TCGContext also includes. Note that tcg_table_op_count is brought
   into TCGProfile after dropping the tcg_ prefix.
2) Iterate over the TCG contexts in the system to obtain the total counts.

This change also requires updating the accessors to TCGProfile fields to
use atomic_read/set whenever there may be conflicting accesses (as defined
in C11) to them.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
accel/tcg/translate-all.c
tcg/tcg.c
tcg/tcg.h