cpu: add more instruction mix statistics
[gem5.git] / src / cpu / o3 / commit_impl.hh
index 35d21d0715925f21e820a41d4a31fc6a22c1dac0..333687c848280a6191a1c940c5d672eab438e312 100644 (file)
@@ -273,6 +273,14 @@ DefaultCommit<Impl>::regStats()
         .flags(total)
         ;
 
+    statCommittedInstType
+        .init(numThreads,Enums::Num_OpClass)
+        .name(name() + ".op_class")
+        .desc("Class of committed instruction")
+        .flags(total | pdf | dist)
+        ;
+    statCommittedInstType.ysubnames(Enums::OpClassStrings);
+
     commitEligible
         .init(cpu->numThreads)
         .name(name() + ".bw_limited")
@@ -1032,6 +1040,7 @@ DefaultCommit<Impl>::commitInsts()
 
             if (commit_success) {
                 ++num_committed;
+                statCommittedInstType[tid][head_inst->opClass()]++;
                 ppCommit->notify(head_inst);
 
                 changedROBNumEntries[tid] = true;