Skip to content

Commit

Permalink
FIX: use delta compressed timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
iansseijelly committed Oct 7, 2024
1 parent dac6f34 commit 8a60abc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions riscv/trace_encoder_n.cc
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void trace_encoder_n::set_direct_branch_packet(trace_encoder_n_packet_t* packet)
packet->tcode = TCODE_DBR;
packet->src = this->src;
packet->icnt = this->icnt - this->packet_0.ilastsize;
packet->tstamp = this->packet_1.i_timestamp;
packet->tstamp = this->packet_1.i_timestamp ^ this->prev_timestamp;
this->prev_timestamp = this->packet_1.i_timestamp;
}

Expand All @@ -127,7 +127,7 @@ void trace_encoder_n::set_indirect_branch_packet(trace_encoder_n_packet_t* packe
uint64_t e_addr = this->packet_0.i_addr >> 1;
packet->u_addr = e_addr ^ this->prev_addr;
this->prev_addr = e_addr;
packet->tstamp = this->packet_1.i_timestamp;
packet->tstamp = this->packet_1.i_timestamp ^ this->prev_timestamp;
this->prev_timestamp = this->packet_1.i_timestamp;
}

Expand All @@ -136,7 +136,7 @@ void trace_encoder_n::set_program_trace_corr_packet(trace_encoder_n_packet_t* pa
packet->src = this->src;
packet->icnt = this->icnt;
packet->evcode = EVCODE_DISA;
packet->tstamp = this->packet_1.i_timestamp;
packet->tstamp = this->packet_1.i_timestamp ^ this->prev_timestamp;
this->prev_timestamp = this->packet_1.i_timestamp;
}

Expand Down

0 comments on commit 8a60abc

Please sign in to comment.