Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unneeded read in trace_parser #189

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions gpu-simulator/trace-parser/trace_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,22 @@ bool inst_trace_t::parse_from_string(std::string trace,
unsigned long long base_address = 0;
std::vector<long long> deltas;
// read addresses as base address and deltas
// remember that the first active processor doesn't have a delta - it
// corresponds to the base address
bool first_bit1_found = false;
ss >> std::hex >> base_address;
for (int s = 0; s < WARP_SIZE; s++) {
if (mask_bits.test(s)) {
long long delta = 0;
ss >> std::dec >> delta;
deltas.push_back(delta);
if(!first_bit1_found) {
first_bit1_found = true;
continue;
} else {
long long delta = 0;
ss >> std::dec >> delta;
deltas.push_back(delta);
}
}
}
memadd_info->base_delta_decompress(base_address, deltas, mask_bits);
}
}
// Finish Parsing
Expand Down