On 1/11/22 3:47 AM, Idan Horowitz wrote:
+    /*
+     * If the length is larger than the jump cache size, then it will take
+     * longer to clear each entry individually than it will to clear it all.
+     */
+    if (d.len >= (TARGET_PAGE_SIZE * TB_JMP_CACHE_SIZE)) {
+        cpu_tb_jmp_cache_clear(cpu);
+        return;
+    }
+
      for (target_ulong i = 0; i < d.len; i += TARGET_PAGE_SIZE) {
          tb_flush_jmp_cache(cpu, d.addr + i);
      }


Hmm. Valid. It looks like we could reasonably rewrite tb_flush_jmp_cache to be more efficient, by passing down len. But this is a decent intermediate step.

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

Queued to tcg-next.

r~

Reply via email to