notdirty_write: fix store-related performance problems
Every store would always cause the tb_invalidate_phys_page_fast path to be invoked, amounting to a 40x slowdown of stores compared to loads. Change this code to only worry about TB invalidation for regions marked as executable (i.e. emulated executable). Even without uc_set_native_thunks, this change fixes most of the performance issues seen with thunking to native calls. Signed-off-by: Andrei Warkentin <andrei.warkentin@intel.com>
This commit is contained in:
@@ -464,6 +464,7 @@ tb_page_addr_t get_page_addr_code_hostp(CPUArchState *env, target_ulong addr,
|
||||
void **hostp);
|
||||
|
||||
void tlb_reset_dirty(CPUState *cpu, ram_addr_t start1, ram_addr_t length);
|
||||
void tlb_reset_dirty_by_vaddr(CPUState *cpu, target_ulong start1, target_ulong length);
|
||||
void tlb_set_dirty(CPUState *cpu, target_ulong vaddr);
|
||||
|
||||
/* exec.c */
|
||||
|
||||
@@ -67,12 +67,6 @@ static inline bool cpu_physical_memory_all_dirty(ram_addr_t start,
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool cpu_physical_memory_get_dirty_flag(ram_addr_t addr,
|
||||
unsigned client)
|
||||
{
|
||||
return cpu_physical_memory_get_dirty(addr, 1, client);
|
||||
}
|
||||
|
||||
static inline bool cpu_physical_memory_is_clean(ram_addr_t addr)
|
||||
{
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user