(Sorry if this comes out garbled, I'm on a web editor not a proper email client)
On Fri, Feb 4, 2022 at 3:49 PM Alex Bennée <alex.ben...@linaro.org> wrote: > +typedef struct { > + uint64_t last_pc; > + uint64_t insn_count; > +} InstructionCount; This will need padding to take up a cache line. > +static InstructionCount counts[MAX_CPUS]; And this will need alignment so that it begins on a cache line as well (although if the struct is aligned that might be enough). See examples of QEMU_ALIGNED, e.g. in struct qht_bucket. Doing this will avoid cache line ping-pong across vCPU threads and therefore improve scalability. +static bool do_frequency; AFAICT is unused. Thanks, Emilio