cpu: Add instruction opclass histogram to minor
This commit is contained in:
parent
774350b750
commit
85dadcd381
3 changed files with 12 additions and 0 deletions
|
@ -849,6 +849,8 @@ Execute::doInstCommitAccounting(MinorDynInstPtr inst)
|
||||||
thread->numOp++;
|
thread->numOp++;
|
||||||
thread->numOps++;
|
thread->numOps++;
|
||||||
cpu.stats.numOps++;
|
cpu.stats.numOps++;
|
||||||
|
cpu.stats.committedInstType[inst->id.threadId]
|
||||||
|
[inst->staticInst->opClass()]++;
|
||||||
|
|
||||||
/* Set the CP SeqNum to the numOps commit number */
|
/* Set the CP SeqNum to the numOps commit number */
|
||||||
if (inst->traceData)
|
if (inst->traceData)
|
||||||
|
|
|
@ -82,6 +82,13 @@ MinorStats::regStats(const std::string &name, BaseCPU &baseCpu)
|
||||||
.desc("IPC: instructions per cycle")
|
.desc("IPC: instructions per cycle")
|
||||||
.precision(6);
|
.precision(6);
|
||||||
ipc = numInsts / baseCpu.numCycles;
|
ipc = numInsts / baseCpu.numCycles;
|
||||||
|
|
||||||
|
committedInstType
|
||||||
|
.init(baseCpu.numThreads, Enums::Num_OpClass)
|
||||||
|
.name(name + ".op_class")
|
||||||
|
.desc("Class of committed instruction")
|
||||||
|
.flags(Stats::total | Stats::pdf | Stats::dist);
|
||||||
|
committedInstType.ysubnames(Enums::OpClassStrings);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -76,6 +76,9 @@ class MinorStats
|
||||||
Stats::Formula cpi;
|
Stats::Formula cpi;
|
||||||
Stats::Formula ipc;
|
Stats::Formula ipc;
|
||||||
|
|
||||||
|
/** Number of instructions by type (OpClass) */
|
||||||
|
Stats::Vector2d committedInstType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MinorStats();
|
MinorStats();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue