diff options
author | Anthony Gutierrez <atgutier@umich.edu> | 2012-02-12 16:07:39 -0600 |
---|---|---|
committer | Anthony Gutierrez <atgutier@umich.edu> | 2012-02-12 16:07:39 -0600 |
commit | 542d0ceebca1d24bfb433ce9fe916b0586f8d029 (patch) | |
tree | 45afbefa2ec6a79de564d2c4505667a4d974e1f5 /src/cpu/inorder/cpu.hh | |
parent | 230540e655efd09ad057e7fde2ac257f355c06d1 (diff) | |
download | gem5-542d0ceebca1d24bfb433ce9fe916b0586f8d029.tar.xz |
cpu: add separate stats for insts/ops both globally and per cpu model
Diffstat (limited to 'src/cpu/inorder/cpu.hh')
-rw-r--r-- | src/cpu/inorder/cpu.hh | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/cpu/inorder/cpu.hh b/src/cpu/inorder/cpu.hh index 4abcb05b4..5e336fd5a 100644 --- a/src/cpu/inorder/cpu.hh +++ b/src/cpu/inorder/cpu.hh @@ -765,7 +765,7 @@ class InOrderCPU : public BaseCPU } /** Count the Total Instructions Committed in the CPU. */ - virtual Counter totalInstructions() const + virtual Counter totalInsts() const { Counter total(0); @@ -775,6 +775,17 @@ class InOrderCPU : public BaseCPU return total; } + /** Count the Total Ops Committed in the CPU. */ + virtual Counter totalOps() const + { + Counter total(0); + + for (ThreadID tid = 0; tid < (ThreadID)thread.size(); tid++) + total += thread[tid]->numOp; + + return total; + } + /** Pointer to the system. */ System *system; @@ -855,6 +866,9 @@ class InOrderCPU : public BaseCPU /** Stat for the number of committed instructions per thread. */ Stats::Vector committedInsts; + /** Stat for the number of committed ops per thread. */ + Stats::Vector committedOps; + /** Stat for the number of committed instructions per thread. */ Stats::Vector smtCommittedInsts; |