Skip to content

Commit

Permalink
cpu: Discriminate between fetch frags and other frags (#176)
Browse files Browse the repository at this point in the history
Change-Id: Iffcbbad27035b9940e7234d415333f6c95cabe57

Co-authored-by: Lingrui98 <[email protected]>
  • Loading branch information
eastonman and Lingrui98 authored Oct 8, 2024
1 parent 546142b commit f9dc472
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/cpu/o3/comm.hh
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ enum StallReason {
BpStall, // BS, bad speculation: Frontend is squashed
IntStall, // F
TrapStall, // F
FragStall, // F
FetchFragStall, // F
OtherFragStall,
SquashStall, // BS
FetchBufferInvalid, // Never used
InstMisPred, // BS
Expand Down
2 changes: 1 addition & 1 deletion src/cpu/o3/fetch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1868,7 +1868,7 @@ Fetch::fetch(bool &status_change)
stallReason[i] = StallReason::NoStall;
else {
if (numInst > 0) {
stallReason[i] = StallReason::FragStall;
stallReason[i] = StallReason::FetchFragStall;
} else if (stall != StallReason::NoStall) {
stallReason[i] = stall;
} else if (stalls[tid].decode && fetchQueue[tid].size() >= fetchQueueSize) {
Expand Down
5 changes: 3 additions & 2 deletions src/cpu/o3/iew.cc
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,8 @@ IEW::IEWStats::IEWStats(CPU *cpu)
{StallReason::BpStall, "BpStall"},
{StallReason::IntStall, "IntStall"},
{StallReason::TrapStall, "TrapStall"},
{StallReason::FragStall, "FragStall"},
{StallReason::FetchFragStall, "FetchFragStall"},
{StallReason::OtherFragStall, "OtherFragStall"},
{StallReason::SquashStall, "SquashStall"},
{StallReason::FetchBufferInvalid, "FetchBufferInvalid"},
{StallReason::InstMisPred, "InstMisPred"},
Expand Down Expand Up @@ -1140,7 +1141,7 @@ IEW::classifyInstToDispQue(ThreadID tid)
} else if (breakDispatch != StallReason::NoStall) {
dispatchStalls.at(i) = breakDispatch;
} else if (i >= dispatched) {
dispatchStalls.at(i) = StallReason::FragStall;
dispatchStalls.at(i) = StallReason::OtherFragStall;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/cpu/o3/rename.cc
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ Rename::renameInsts(ThreadID tid)
} else if (breakRename != StallReason::NoStall) {
renameStalls.at(i) = breakRename;
} else if (instsAvailable < renameWidth && instsAvailable > 0) {
renameStalls.at(i) = StallReason::FragStall;
renameStalls.at(i) = StallReason::OtherFragStall;
} else if (instsAvailable == 0) {
renameStalls.at(i) = stall;
}else {
Expand Down

0 comments on commit f9dc472

Please sign in to comment.