diff options
author | Korey Sewell <ksewell@umich.edu> | 2010-01-31 18:28:51 -0500 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2010-01-31 18:28:51 -0500 |
commit | ffa9ecb1fa71f1fe89a65975b2c558e312bbfbc8 (patch) | |
tree | adbae9144a62e3a25720954b48feb4de8c46f259 /src/cpu/inorder/first_stage.cc | |
parent | 4d749472e3cb97ff0421fbf5cbc53d9c89ecfa45 (diff) | |
download | gem5-ffa9ecb1fa71f1fe89a65975b2c558e312bbfbc8.tar.xz |
inorder: pipeline stage stats
add idle/run/utilization stats for each pipeline stage
Diffstat (limited to 'src/cpu/inorder/first_stage.cc')
-rw-r--r-- | src/cpu/inorder/first_stage.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/cpu/inorder/first_stage.cc b/src/cpu/inorder/first_stage.cc index 27831469e..c653d152b 100644 --- a/src/cpu/inorder/first_stage.cc +++ b/src/cpu/inorder/first_stage.cc @@ -118,9 +118,9 @@ FirstStage::processStage(bool &status_change) status_change = checkSignalsAndUpdate(tid) || status_change; } - for (int threadFetched = 0; threadFetched < numFetchingThreads; - threadFetched++) { - + for (int insts_fetched = 0; + insts_fetched < stageWidth && canSendInstToStage(1); + insts_fetched++) { ThreadID tid = getFetchingThread(fetchPolicy); if (tid >= 0) { @@ -130,6 +130,13 @@ FirstStage::processStage(bool &status_change) DPRINTF(InOrderStage, "No more threads to fetch from.\n"); } } + + if (instsProcessed > 0) { + ++runCycles; + } else { + ++idleCycles; + } + } //@TODO: Note in documentation, that when you make a pipeline stage change, @@ -197,7 +204,6 @@ FirstStage::processInsts(ThreadID tid) } sendInstToNextStage(inst); - //++stageProcessedInsts; } // Record that stage has written to the time buffer for activity |