These disabled logs could be transformed to trace events needed at at later date. Just delete them for now.
Signed-off-by: Richard Henderson <[email protected]> --- accel/tcg/cputlb.c | 48 ++-------------------------------------------- 1 file changed, 2 insertions(+), 46 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index dc83f3bad8..efb8fb1f57 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -55,31 +55,15 @@ #include "backend-ldst.h" -/* DEBUG defines, enable DEBUG_TLB_LOG to log to the CPU_LOG_MMU target */ -/* #define DEBUG_TLB */ -/* #define DEBUG_TLB_LOG */ +/* DEBUG defines */ +#define DEBUG_TLB #ifdef DEBUG_TLB # define DEBUG_TLB_GATE 1 -# ifdef DEBUG_TLB_LOG -# define DEBUG_TLB_LOG_GATE 1 -# else -# define DEBUG_TLB_LOG_GATE 0 -# endif #else # define DEBUG_TLB_GATE 0 -# define DEBUG_TLB_LOG_GATE 0 #endif -#define tlb_debug(fmt, ...) do { \ - if (DEBUG_TLB_LOG_GATE) { \ - qemu_log_mask(CPU_LOG_MMU, "%s: " fmt, __func__, \ - ## __VA_ARGS__); \ - } else if (DEBUG_TLB_GATE) { \ - fprintf(stderr, "%s: " fmt, __func__, ## __VA_ARGS__); \ - } \ -} while (0) - #define assert_cpu_is_self(cpu) do { \ if (DEBUG_TLB_GATE) { \ g_assert(!(cpu)->created || qemu_cpu_is_self(cpu)); \ @@ -375,8 +359,6 @@ static void tlb_flush_by_mmuidx_async_work(CPUState *cpu, run_on_cpu_data data) assert_cpu_is_self(cpu); - tlb_debug("mmu_idx:0x%04" PRIx16 "\n", asked); - qemu_spin_lock(&cpu->neg.tlb.c.lock); all_dirty = cpu->neg.tlb.c.dirty; @@ -409,8 +391,6 @@ static void tlb_flush_by_mmuidx_async_work(CPUState *cpu, run_on_cpu_data data) void tlb_flush_by_mmuidx(CPUState *cpu, MMUIdxMap idxmap) { - tlb_debug("mmu_idx: 0x%" PRIx16 "\n", idxmap); - assert_cpu_is_self(cpu); tlb_flush_by_mmuidx_async_work(cpu, RUN_ON_CPU_HOST_INT(idxmap)); @@ -425,8 +405,6 @@ void tlb_flush_by_mmuidx_all_cpus_synced(CPUState *src_cpu, MMUIdxMap idxmap) { const run_on_cpu_func fn = tlb_flush_by_mmuidx_async_work; - tlb_debug("mmu_idx: 0x%"PRIx16"\n", idxmap); - flush_all_helper(src_cpu, fn, RUN_ON_CPU_HOST_INT(idxmap)); async_safe_run_on_cpu(src_cpu, fn, RUN_ON_CPU_HOST_INT(idxmap)); } @@ -507,9 +485,6 @@ static void tlb_flush_page_locked(CPUState *cpu, int midx, vaddr page) /* Check if we need to flush due to large pages. */ if ((page & lp_mask) == lp_addr) { - tlb_debug("forcing full flush midx %d (%016" - VADDR_PRIx "/%016" VADDR_PRIx ")\n", - midx, lp_addr, lp_mask); tlb_flush_one_mmuidx_locked(cpu, midx, get_clock_realtime()); } else { if (tlb_flush_entry_locked(tlb_entry(cpu, midx, page), page)) { @@ -536,8 +511,6 @@ static void tlb_flush_page_by_mmuidx_async_0(CPUState *cpu, assert_cpu_is_self(cpu); - tlb_debug("page addr: %016" VADDR_PRIx " mmu_map:0x%x\n", addr, idxmap); - qemu_spin_lock(&cpu->neg.tlb.c.lock); for (mmu_idx = 0; mmu_idx < NB_MMU_MODES; mmu_idx++) { if ((idxmap >> mmu_idx) & 1) { @@ -600,8 +573,6 @@ static void tlb_flush_page_by_mmuidx_async_2(CPUState *cpu, void tlb_flush_page_by_mmuidx(CPUState *cpu, vaddr addr, MMUIdxMap idxmap) { - tlb_debug("addr: %016" VADDR_PRIx " mmu_idx:%" PRIx16 "\n", addr, idxmap); - assert_cpu_is_self(cpu); /* This should already be page aligned */ @@ -619,8 +590,6 @@ void tlb_flush_page_by_mmuidx_all_cpus_synced(CPUState *src_cpu, vaddr addr, MMUIdxMap idxmap) { - tlb_debug("addr: %016" VADDR_PRIx " mmu_idx:%"PRIx16"\n", addr, idxmap); - /* This should already be page aligned */ addr &= TARGET_PAGE_MASK; @@ -680,9 +649,6 @@ static void tlb_flush_range_locked(CPUState *cpu, int midx, * test all of the entries in the TLB than it will to flush it all. */ if (mask < f->mask || len > f->mask) { - tlb_debug("forcing full flush midx %d (" - "%016" VADDR_PRIx "/%016" VADDR_PRIx "+%016" VADDR_PRIx ")\n", - midx, addr, mask, len); tlb_flush_one_mmuidx_locked(cpu, midx, get_clock_realtime()); return; } @@ -693,9 +659,6 @@ static void tlb_flush_range_locked(CPUState *cpu, int midx, * we only need to test the end of the range. */ if (((addr + len - 1) & d->large_page_mask) == d->large_page_addr) { - tlb_debug("forcing full flush midx %d (" - "%016" VADDR_PRIx "/%016" VADDR_PRIx ")\n", - midx, d->large_page_addr, d->large_page_mask); tlb_flush_one_mmuidx_locked(cpu, midx, get_clock_realtime()); return; } @@ -725,9 +688,6 @@ static void tlb_flush_range_by_mmuidx_async_0(CPUState *cpu, assert_cpu_is_self(cpu); - tlb_debug("range: %016" VADDR_PRIx "/%u+%016" VADDR_PRIx " mmu_map:0x%x\n", - d.addr, d.bits, d.len, d.idxmap); - qemu_spin_lock(&cpu->neg.tlb.c.lock); for (mmu_idx = 0; mmu_idx < NB_MMU_MODES; mmu_idx++) { if ((d.idxmap >> mmu_idx) & 1) { @@ -1053,10 +1013,6 @@ void tlb_set_page_full(CPUState *cpu, int mmu_idx, &xlat, &sz, full->attrs, &prot); assert(sz >= TARGET_PAGE_SIZE); - tlb_debug("vaddr=%016" VADDR_PRIx " paddr=0x" HWADDR_FMT_plx - " prot=%x idx=%d\n", - addr, full->phys_addr, prot, mmu_idx); - read_flags = full->tlb_fill_flags; if (full->lg_page_size < TARGET_PAGE_BITS) { /* Repeat the MMU check and TLB fill on every access. */ -- 2.53.0
