Stall and Flush Counter (Initial Iteration) #203
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As per #174, I am opening a PR for adding a stall and flush counter.
However, note this PR is probably not quite mergeable yet. In particular, there are two "bugs", so we'd need to discuss how to fix these. In particular:
An instruction is considered and counted as stalled or flushed when it reaches WB, rather than when it leaves WB. This diverges from the behaviour of instructionsRetired, which counts an instruction as retired upon leaving WB.
The dual-issue processor currently considers only only one way for counting stalls and flushes. I suspect we might need a way to generically query a processor for which stages contain instructions that are about to be retired. Right now I'm using
proc->stageInfo(proc->stageCount() - 1)
to gather information about these instructions, which only works for the singlecycleissue processors.Once both these issues are resolved, we should be able to refactor instructionsRetired to be implemented in a manner similar to the stall and flush counter.
(Also, the diff for processortab.ui is quite messy... I hope this is not an issue)