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

cpu-minor: Integrate Minor's executeStats with int/fp/vec ALU Accesses #1108

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/cpu/minor/execute.cc
Original file line number Diff line number Diff line change
Expand Up @@ -876,6 +876,15 @@ Execute::doInstCommitAccounting(MinorDynInstPtr inst)
cpu.commitStats[inst->id.threadId]->numOps++;
cpu.commitStats[inst->id.threadId]
->committedInstType[inst->staticInst->opClass()]++;
if (inst->isInst()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need to check isInst()? How could that be false?

Copy link
Author

@poal023 poal023 May 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I initially put that in the issue logic (in the issue function), since doing inst->staticInst->isInteger() would segfault without it. Otherwise, I'll take it out.

Only question I have about adding additional stats from base.cc of the base CPU is, does Minor have an equivalent execcontext? I noticed that within BaseExecContext, there are specific stats that are updated (such as numCallsReturns, which I assume I'd have to do something similar and create an exec context to access the thread's info, although there could be a better approach?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@poal023, you still need to address Jason's question. Please do so, so we can move this PR closer to being merged. Thank you.

if (inst->staticInst->isVector()) {
cpu.executeStats[inst->id.threadId]->numVecAluAccesses++;
} else if (inst->staticInst->isFloating()) {
cpu.executeStats[inst->id.threadId]->numFpAluAccesses++;
} else if (inst->staticInst->isInteger()) {
cpu.executeStats[inst->id.threadId]->numIntAluAccesses++;
}
}

/* Set the CP SeqNum to the numOps commit number */
if (inst->traceData)
Expand Down