Bobby Bruce has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/66451?usp=email )
Change subject: python: Remove 'scheduleTickExit' in favor of 'exitSimLoop'
......................................................................
python: Remove 'scheduleTickExit' in favor of 'exitSimLoop'
The commit https://gem5-review.googlesource.com/c/public/gem5/+/66231
added an API to m5 for scheduling to-tick exit events. This added the
function `schedule_tick_exit`. It was later pointed out that this
`schedule_tick_exit` event is redundant given the existance of
`exitSimLoop`. This patch therefore removes `schedule_tick_exit` in
favor of `exitSimLoop`.
Change-Id: Ibecf00b98256a5da2868427d766bdc93f03c3f97
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/66451
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
Reviewed-by: Andreas Sandberg <andreas.sandb...@arm.com>
Tested-by: kokoro <noreply+kok...@google.com>
Maintainer: Andreas Sandberg <andreas.sandb...@arm.com>
---
M src/python/m5/simulate.py
M src/python/pybind11/event.cc
M src/sim/simulate.cc
M src/sim/simulate.hh
4 files changed, 23 insertions(+), 18 deletions(-)
Approvals:
Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
Jason Lowe-Power: Looks good to me, but someone else must approve; Looks
good to me, approved
kokoro: Regressions pass
diff --git a/src/python/m5/simulate.py b/src/python/m5/simulate.py
index 744d95f..18fb1d6 100644
--- a/src/python/m5/simulate.py
+++ b/src/python/m5/simulate.py
@@ -259,7 +259,7 @@
"""
if tick <= curTick():
warn("Tick exit scheduled for the past. This will not be
triggered.")
- _m5.event.scheduleTickExit(tick=tick, exit_string=exit_string)
+ _m5.event.exitSimLoop(exit_string, 0, tick, 0, False)
def drain():
diff --git a/src/python/pybind11/event.cc b/src/python/pybind11/event.cc
index 827768f..95e6ddb 100644
--- a/src/python/pybind11/event.cc
+++ b/src/python/pybind11/event.cc
@@ -109,8 +109,6 @@
py::arg("ticks") = MaxTick);
m.def("setMaxTick", &set_max_tick, py::arg("tick"));
m.def("getMaxTick", &get_max_tick, py::return_value_policy::copy);
- m.def("scheduleTickExit", &schedule_tick_exit, py::arg("tick"),
- py::arg("exit_string"));
m.def("terminateEventQueueThreads", &terminateEventQueueThreads);
m.def("exitSimLoop", &exitSimLoop);
m.def("getEventQueue", []() { return curEventQueue(); },
diff --git a/src/sim/simulate.cc b/src/sim/simulate.cc
index f147b3e..86d516d 100644
--- a/src/sim/simulate.cc
+++ b/src/sim/simulate.cc
@@ -266,11 +266,6 @@
return simulate_limit_event->when();
}
-void schedule_tick_exit(Tick tick, std::string exit_string)
-{
- new GlobalSimLoopExitEvent(tick, exit_string, 0);
-}
-
void
terminateEventQueueThreads()
{
diff --git a/src/sim/simulate.hh b/src/sim/simulate.hh
index e7c4fa6..eacf67c 100644
--- a/src/sim/simulate.hh
+++ b/src/sim/simulate.hh
@@ -68,16 +68,6 @@
Tick get_max_tick();
/**
- * @brief Schedule an exit event at a particular tick.
- *
- * Schedule a tick with a particular exit string.
- *
- * @param tick The tick at which the simulation loop should exit.
- * @param exit_string The exit string explaining the exit.
- */
-void schedule_tick_exit(Tick tick, std::string exit_string);
-
-/**
* Terminate helper threads when running in parallel mode.
*
* @pre Simulator must have returned from simulate() to service a
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/66451?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ibecf00b98256a5da2868427d766bdc93f03c3f97
Gerrit-Change-Number: 66451
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-Reviewer: Bobby Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org