stdlib: change default exit event for SIMPOINT_BEGIN #1085
Merged
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.
The SIMPOINT_BEGIN should do nothing by default since it might be used in various cases.
In [https://www.mail-archive.com/gem5-users@gem5.org/msg22383.html](mailing list), a user discovered a bug with the current
simpoints-se-restore.py
example.The bug is caused by the default behavior of the SIMPOINT_BEGIN exit event.
When taking a checkpoint with
simpoints-se-checkpoint.py
, it stores the future exit event scheduled at the beginning of the simulation. I did not notice this when I wrote and tested the example script due to the long print out log and my custom handler of the SIMPOINT_BEGIN exit event.In the restoring, the SIMPOINT_BEGIN exit event was triggered right before the region end, so it resets the stats before the final stats dump. Therefore, the simulation time is 0 as the user discovered.
This patch should fix this bug.
Change-Id: I800dfbd28d7b2c842864a1ab7d84b8f8e17b9b3c