arch-arm: Add support to exit the simloop on PMU interrupt
Add an option `exitOnPMUInterrupt` to ArmPMU. The PMU is often used to identify and demark regions of interest in a workload intended for sampled simulation (e.g. fast-forward, warm-up, detailed simulation). Often the PMU is enabled and disabled to demark these regions, but for some workloads PMU interrupts are used to count committed instructions directly. This patch adds the option to exit the simulation loop when a PMU interrupt is triggered so additional simulation control can be effected (e.g. stats dump/reset, CPU switch, etc). Change-Id: Ife02fe8e467dec91a2d4fda3f7dc9540a092f1ec Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69958 Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
@@ -52,6 +52,7 @@ class ExitEvent(Enum):
|
||||
PERF_COUNTER_ENABLE = "performance counter enabled"
|
||||
PERF_COUNTER_DISABLE = "performance counter disabled"
|
||||
PERF_COUNTER_RESET = "performance counter reset"
|
||||
PERF_COUNTER_INTERRUPT = "performance counter interrupt"
|
||||
|
||||
@classmethod
|
||||
def translate_exit_status(cls, exit_string: str) -> "ExitEvent":
|
||||
@@ -99,6 +100,8 @@ class ExitEvent(Enum):
|
||||
return ExitEvent.PERF_COUNTER_DISABLE
|
||||
elif exit_string == "performance counter reset":
|
||||
return ExitEvent.PERF_COUNTER_RESET
|
||||
elif exit_string == "performance counter interrupt":
|
||||
return ExitEvent.PERF_COUNTER_INTERRUPT
|
||||
elif exit_string.endswith("will terminate the simulation.\n"):
|
||||
# This is for the traffic generator exit event
|
||||
return ExitEvent.EXIT
|
||||
|
||||
Reference in New Issue
Block a user