mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
cputlb: Count "partial" and "elided" tlb flushes
Our only statistic so far was "full" tlb flushes, where all mmu_idx are flushed at the same time. Now count "partial" tlb flushes where sets of mmu_idx are flushed, but the set is not maximal. Account one per mmu_idx flushed, as that is the unit of work performed. We don't actually count elided flushes yet, but go ahead and change the interface presented to the monitor all at once. Tested-by: Emilio G. Cota <cota@braap.org> Reviewed-by: Emilio G. Cota <cota@braap.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
f8144c6c1e
commit
e09de0a20d
4 changed files with 30 additions and 10 deletions
|
@ -166,6 +166,15 @@ typedef struct CPUTLBCommon {
|
|||
* mmu_idx may be discarded. Protected by tlb_c.lock.
|
||||
*/
|
||||
uint16_t pending_flush;
|
||||
|
||||
/*
|
||||
* Statistics. These are not lock protected, but are read and
|
||||
* written atomically. This allows the monitor to print a snapshot
|
||||
* of the stats without interfering with the cpu.
|
||||
*/
|
||||
size_t full_flush_count;
|
||||
size_t part_flush_count;
|
||||
size_t elide_flush_count;
|
||||
} CPUTLBCommon;
|
||||
|
||||
/*
|
||||
|
@ -179,8 +188,7 @@ typedef struct CPUTLBCommon {
|
|||
CPUTLBEntry tlb_table[NB_MMU_MODES][CPU_TLB_SIZE]; \
|
||||
CPUTLBEntry tlb_v_table[NB_MMU_MODES][CPU_VTLB_SIZE]; \
|
||||
CPUIOTLBEntry iotlb[NB_MMU_MODES][CPU_TLB_SIZE]; \
|
||||
CPUIOTLBEntry iotlb_v[NB_MMU_MODES][CPU_VTLB_SIZE]; \
|
||||
size_t tlb_flush_count;
|
||||
CPUIOTLBEntry iotlb_v[NB_MMU_MODES][CPU_VTLB_SIZE];
|
||||
|
||||
#else
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue