Browse Source

Only clear logging structures if logging is enabled

This speeds up histogramming when logging is disabled, with almost
no slowdown for the logging case.
pull/1191/head
Andrew Waterman 4 years ago
parent
commit
7831b3e5f2
  1. 7
      riscv/execute.cc

7
riscv/execute.cc

@ -162,8 +162,11 @@ static inline reg_t execute_insn_fast(processor_t* p, reg_t pc, insn_fetch_t fet
}
static inline reg_t execute_insn_logged(processor_t* p, reg_t pc, insn_fetch_t fetch)
{
commit_log_reset(p);
commit_log_stash_privilege(p);
if (p->get_log_commits_enabled()) {
commit_log_reset(p);
commit_log_stash_privilege(p);
}
reg_t npc;
try {

Loading…
Cancel
Save