diff options
author | Andrea Mondelli <Andrea.Mondelli@ucf.edu> | 2019-05-25 15:29:05 -0400 |
---|---|---|
committer | Andrea Mondelli <Andrea.Mondelli@ucf.edu> | 2019-05-29 14:38:46 +0000 |
commit | dc338b402f9711c284962a294ba0f6f2532bf410 (patch) | |
tree | 925811963495972cd81a5d4487e5090589521a1f /src/cpu/o3 | |
parent | 5cbd972689d3a8f92518593de26e8d89754e646d (diff) | |
download | gem5-dc338b402f9711c284962a294ba0f6f2532bf410.tar.xz |
cpu: Added correct return type for ROB::countInsts
- return size_t (unsigned) according to the .size() return type
- fixed typo in doc (source of warning with some compilers)
Change-Id: I48ee2e317cf41011a6fcb5ca45aef67e75329bfa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/18948
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/cpu/o3')
-rw-r--r-- | src/cpu/o3/rob.hh | 2 | ||||
-rw-r--r-- | src/cpu/o3/rob_impl.hh | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/cpu/o3/rob.hh b/src/cpu/o3/rob.hh index ad7a6d6e7..0289d2c76 100644 --- a/src/cpu/o3/rob.hh +++ b/src/cpu/o3/rob.hh @@ -258,7 +258,7 @@ class ROB * threadEntries to get the instructions in the ROB unless you are * double checking that variable. */ - int countInsts(ThreadID tid); + size_t countInsts(ThreadID tid); /** Registers statistics. */ void regStats(); diff --git a/src/cpu/o3/rob_impl.hh b/src/cpu/o3/rob_impl.hh index 5d5d821b8..432d43f9c 100644 --- a/src/cpu/o3/rob_impl.hh +++ b/src/cpu/o3/rob_impl.hh @@ -153,7 +153,7 @@ void ROB<Impl>::resetEntries() { if (robPolicy != SMTQueuePolicy::Dynamic || numThreads > 1) { - int active_threads = activeThreads->size(); + auto active_threads = activeThreads->size(); list<ThreadID>::iterator threads = activeThreads->begin(); list<ThreadID>::iterator end = activeThreads->end(); @@ -195,7 +195,7 @@ ROB<Impl>::countInsts() } template <class Impl> -int +size_t ROB<Impl>::countInsts(ThreadID tid) { return instList[tid].size(); |