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/+/66511
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby Bruce <bbruce@ucdavis.edu>
This commit is contained in:
Bobby R. Bruce
2022-12-05 15:28:00 -08:00
committed by Bobby Bruce
parent e200ea1510
commit 1e73beb620
4 changed files with 1 additions and 18 deletions

View File

@@ -259,7 +259,7 @@ def scheduleTickExitAbsolute(
"""
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():

View File

@@ -109,8 +109,6 @@ pybind_init_event(py::module_ &m_native)
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(); },

View File

@@ -263,11 +263,6 @@ Tick get_max_tick()
return simulate_limit_event->when();
}
void schedule_tick_exit(Tick tick, std::string exit_string)
{
new GlobalSimLoopExitEvent(tick, exit_string, 0);
}
void
terminateEventQueueThreads()
{

View File

@@ -67,16 +67,6 @@ void set_max_tick(Tick tick);
*/
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.
*