aboutsummaryrefslogtreecommitdiff
path: root/riscv/execute.cc
diff options
context:
space:
mode:
Diffstat (limited to 'riscv/execute.cc')
-rw-r--r--riscv/execute.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/riscv/execute.cc b/riscv/execute.cc
index 822d934..9183f68 100644
--- a/riscv/execute.cc
+++ b/riscv/execute.cc
@@ -77,7 +77,9 @@ static reg_t execute_insn(processor_t* p, reg_t pc, insn_fetch_t fetch)
commit_log_stash_privilege(p);
reg_t npc = fetch.func(p, fetch.insn, pc);
if (npc != PC_SERIALIZE_BEFORE) {
- commit_log_print_insn(p->get_state(), pc, fetch.insn);
+ if (p->get_log_commits()) {
+ commit_log_print_insn(p->get_state(), pc, fetch.insn);
+ }
p->update_histogram(pc);
}
return npc;