configs: Fix x86-gapbs-benchmarks.py example

With https://gem5-review.googlesource.com/c/public/gem5/+/64791 we
updated the configs/example/gem5_library to utilize the `m5.simulate`
module. The GAPBS benchmark example uses the "WORKBEGIN" and "WORKEND"
exit events to specify the ROI. The patch incorrectly assumed an "EXIT"
exit event were used.

As such, the
"test-gem5-library-example-x86-gapbs-benchmarks-ALL-x86_64-opt-MESI_Two_Level"
test was not properly running, causing the Nightly test to fail:
https://jenkins.gem5.org/job/nightly/444. This patch fixes this error.

Change-Id: I207fe3563c8d9c59bcb79428fe62d2d2bbccd013
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66512
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Bobby R. Bruce
2022-12-06 10:39:18 -08:00
committed by Bobby Bruce
parent 00a893ad4e
commit a23641e01f

View File

@@ -211,7 +211,7 @@ board.set_kernel_disk_workload(
)
def handle_exit():
def handle_workbegin():
print("Done booting Linux")
print("Resetting stats at the start of ROI!")
m5.stats.reset()
@@ -219,6 +219,9 @@ def handle_exit():
start_tick = m5.curTick()
processor.switch()
yield False # E.g., continue the simulation.
def handle_workend():
print("Dump stats at the end of the ROI!")
m5.stats.dump()
yield True # Stop the simulation. We're done.
@@ -227,7 +230,8 @@ def handle_exit():
simulator = Simulator(
board=board,
on_exit_event={
ExitEvent.EXIT: handle_exit(),
ExitEvent.WORKBEGIN: handle_workbegin(),
ExitEvent.WORKEND: handle_workend(),
},
)