Don't issue extra FENCE+FENCE.i for the current hart. (#439)
The original OpenOCD code issued FENCE & FENCE.i twice for the current hart (which is harmless, but takes time). Avoiding this extra FENCE is a slight performance improvement. Per my rough measurements, this improves performance of certain debugger actions (single-stepping) by approx. 20% in single-hart systems.vector2
parent
8b8db033ee
commit
fcea4f79ba
|
@ -2010,6 +2010,10 @@ static int execute_fence(struct target *target)
|
|||
if (!riscv_hart_enabled(target, i))
|
||||
continue;
|
||||
|
||||
if (i == old_hartid)
|
||||
/* Fence already executed for this hart */
|
||||
continue;
|
||||
|
||||
riscv_set_current_hartid(target, i);
|
||||
|
||||
struct riscv_program program;
|
||||
|
|
Loading…
Reference in New Issue