diff options
author | Gabe Black <gabeblack@google.com> | 2019-10-13 22:02:35 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-10-25 22:42:31 +0000 |
commit | c73c19effd8f7f9b6e2ec470f04b8f1f43ce7354 (patch) | |
tree | 9869a1a8c09c03a3354ef5efee23dd0e9d03fdd4 /src/base | |
parent | fea2af5b9c4599637866d0ce2dfc598296c19a5b (diff) | |
download | gem5-c73c19effd8f7f9b6e2ec470f04b8f1f43ce7354.tar.xz |
cpu: Make accesses to comInstEventQueue indirect through methods.
This lets us move the event queue itself around, or change how those
services are provided.
Change-Id: Ie36665b353cf9788968f253cf281a854a6eff4f4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22107
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/remote_gdb.cc | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc index 3dde235f0..b45ef1037 100644 --- a/src/base/remote_gdb.cc +++ b/src/base/remote_gdb.cc @@ -317,12 +317,6 @@ break_type(char c) std::map<Addr, HardBreakpoint *> hardBreakMap; -EventQueue * -getComInstEventQueue(ThreadContext *tc) -{ - return tc->getCpuPtr()->comInstEventQueue[tc->threadId()]; -} - } BaseRemoteGDB::BaseRemoteGDB(System *_system, ThreadContext *c, int _port) : @@ -759,17 +753,18 @@ BaseRemoteGDB::setTempBreakpoint(Addr bkpt) void BaseRemoteGDB::scheduleInstCommitEvent(Event *ev, int delta) { - EventQueue *eq = getComInstEventQueue(tc); + auto *cpu = tc->getCpuPtr(); // Here "ticks" aren't simulator ticks which measure time, they're // instructions committed by the CPU. - eq->schedule(ev, eq->getCurTick() + delta); + cpu->scheduleInstCountEvent(tc->threadId(), ev, + cpu->getCurrentInstCount(tc->threadId()) + delta); } void BaseRemoteGDB::descheduleInstCommitEvent(Event *ev) { if (ev->scheduled()) - getComInstEventQueue(tc)->deschedule(ev); + tc->getCpuPtr()->descheduleInstCountEvent(tc->threadId(), ev); } std::map<char, BaseRemoteGDB::GdbCommand> BaseRemoteGDB::command_map = { |