diff options
-rw-r--r-- | riscv/execute.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/riscv/execute.cc b/riscv/execute.cc index cd6ae1a..844f2b8 100644 --- a/riscv/execute.cc +++ b/riscv/execute.cc @@ -152,7 +152,8 @@ static void commit_log_print_insn(processor_t *p, reg_t pc, insn_t insn) inline void processor_t::update_histogram(reg_t UNUSED pc) { - pc_histogram[pc]++; + if (histogram_enabled) + pc_histogram[pc]++; } // These two functions are expected to be inlined by the compiler separately in |