Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global instruction counter #1087

Open
studyztp opened this issue Apr 30, 2024 Discussed in #1086 · 1 comment
Open

global instruction counter #1087

studyztp opened this issue Apr 30, 2024 Discussed in #1086 · 1 comment

Comments

@studyztp
Copy link
Contributor

Currently, if we want to schedule an exit event after a certain number of instructions have been executed, we need to use either BaseCPU::scheduleInstStopAnyThread or this. Both methods require scheduling the exit event in advance. However, the current method has two major disadvantages:

  1. It is difficult to achieve a precise global instruction count-based exit for multi-core simulations because we can only schedule these events per core. As a result, the instruction counting is not done as a whole. related mailing list thread
  2. The checkpoint might capture the future exit event and cause an incorrect exit event when restoring the checkpoint. Related mailing list thread. related mailing list thread

Therefore, I believe it is necessary to have a global instruction counter that can trigger an exit event based on actual instruction counting, and the counting should be across multiple cores. This is easily achievable with the probing feature in gem5. I can create a pull request for it, but I still want to discuss about if it is needed since there could also be risks associated with continually adding features.

@powerjg
Copy link
Contributor

powerjg commented May 9, 2024

If you do this with an optional probe, I think it's a great idea. Please open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants