Browse Source

Add core id to lines generated by --log-commits (#556)

* Add core id to lines generated by --log-commits

* Fixing the format specifier for cpuid in log-commits

Co-authored-by: Shajid Thiruvathodi <sthiruva@valtrix.in>
pull/559/head
sthiruva 6 years ago
committed by GitHub
parent
commit
e7cdd75724
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      riscv/execute.cc

4
riscv/execute.cc

@ -70,6 +70,10 @@ static void commit_log_print_insn(processor_t *p, reg_t pc, insn_t insn)
int xlen = p->get_state()->last_inst_xlen;
int flen = p->get_state()->last_inst_flen;
// print core id on all lines so it is easy to grep
uint64_t id = p->get_csr(CSR_MHARTID);
fprintf(log_file, "core%4" PRId64 ": ", id);
fprintf(log_file, "%1d ", priv);
commit_log_print_value(log_file, xlen, pc);
fprintf(log_file, " (");

Loading…
Cancel
Save