summaryrefslogtreecommitdiff
path: root/src/cpu/base.cc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-10-09 22:29:36 -0700
committerGabe Black <gabeblack@google.com>2019-10-17 22:00:16 +0000
commite86ad367b7cd7ef863542f3848d9233133fbddd9 (patch)
treead96604f540ffc6830c0bca17f197ce80fa3c328 /src/cpu/base.cc
parente04e976e22be76e13eacd45b33f71eb85cefd81e (diff)
downloadgem5-e86ad367b7cd7ef863542f3848d9233133fbddd9.tar.xz
cpu: Get rid of load count based events.
This was initially added in 2003 and only supported in the simple CPUs. It's oddly specific since there are no other similar event queues for, for instance, stores, branches, system calls, etc. Given that this seems like a historical oddity which is only partially supported and would be very hard to support on more diverse CPU types like KVM or fast model which don't generally have hooks for counts of specific instruction types. Change-Id: I29209b7ffcf896cf424b71545c9c7546f439e2b9 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21780 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/cpu/base.cc')
-rw-r--r--src/cpu/base.cc33
1 files changed, 0 insertions, 33 deletions
diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index 5bc3fe7c7..7e0e79e96 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -195,32 +195,9 @@ BaseCPU::BaseCPU(Params *p, bool is_checker)
}
}
- // allocate per-thread load-based event queues
- comLoadEventQueue = new EventQueue *[numThreads];
- for (ThreadID tid = 0; tid < numThreads; ++tid)
- comLoadEventQueue[tid] = new EventQueue("load-based event queue");
-
//
// set up instruction-count-based termination events, if any
//
- if (p->max_loads_any_thread != 0) {
- const char *cause = "a thread reached the max load count";
- for (ThreadID tid = 0; tid < numThreads; ++tid)
- scheduleLoadStop(tid, p->max_loads_any_thread, cause);
- }
-
- if (p->max_loads_all_threads != 0) {
- const char *cause = "all threads reached the max load count";
- // allocate & initialize shared downcounter: each event will
- // decrement this when triggered; simulation will terminate
- // when counter reaches 0
- int *counter = new int;
- *counter = numThreads;
- for (ThreadID tid = 0; tid < numThreads; ++tid) {
- Event *event = new CountedExitEvent(cause, *counter);
- comLoadEventQueue[tid]->schedule(event, p->max_loads_all_threads);
- }
- }
functionTracingEnabled = false;
if (p->function_trace) {
@@ -273,7 +250,6 @@ BaseCPU::enableFunctionTrace()
BaseCPU::~BaseCPU()
{
delete profileEvent;
- delete[] comLoadEventQueue;
delete[] comInstEventQueue;
}
@@ -781,15 +757,6 @@ bool AddressMonitor::doMonitor(PacketPtr pkt) {
return false;
}
-void
-BaseCPU::scheduleLoadStop(ThreadID tid, Counter loads, const char *cause)
-{
- const Tick now(comLoadEventQueue[tid]->getCurTick());
- Event *event(new LocalSimLoopExitEvent(cause, 0));
-
- comLoadEventQueue[tid]->schedule(event, now + loads);
-}
-
void
BaseCPU::traceFunctionsInternal(Addr pc)