From 4a435b982b94cfb885e621d7536da6529fca62aa Mon Sep 17 00:00:00 2001 From: jiemingyin Date: Wed, 21 Oct 2020 19:43:05 -0400 Subject: [PATCH 1/5] mem-garnet: Fix garnet network interface stats Fixing a bug in garnet network interface where flit source delay is computed using both tick and cycle. Change-Id: If21a985f371a818611d13e9cd5ce344dbcf5fb2b Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/36416 Reviewed-by: Srikant Bharadwaj Maintainer: Matthew Poremba Tested-by: kokoro Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37115 Maintainer: Bobby R. Bruce Reviewed-by: Daniel Carvalho Reviewed-by: Jieming Yin --- src/mem/ruby/network/garnet/NetworkInterface.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mem/ruby/network/garnet/NetworkInterface.cc b/src/mem/ruby/network/garnet/NetworkInterface.cc index 6dbe0d9998..bd5390fc00 100644 --- a/src/mem/ruby/network/garnet/NetworkInterface.cc +++ b/src/mem/ruby/network/garnet/NetworkInterface.cc @@ -435,7 +435,7 @@ NetworkInterface::flitisizeMessage(MsgPtr msg_ptr, int vnet) net_msg_ptr->getMessageSize()), oPort->bitWidth(), curTick()); - fl->set_src_delay(curTick() - ticksToCycles(msg_ptr->getTime())); + fl->set_src_delay(curTick() - msg_ptr->getTime()); niOutVcs[vc].insert(fl); } From a265891e87833187e70d254a9ed09721cfce982c Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Thu, 5 Nov 2020 14:38:25 -0800 Subject: [PATCH 2/5] misc: Updated the RELEASE-NOTES and version number Updated the RELEASE-NOTES.md and version number for the v20.1.0.1 hot-fix. Change-Id: I51f7ba6f1178a2d8e80488ed2184b8735c2234a2 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37116 Maintainer: Bobby R. Bruce Reviewed-by: Daniel Carvalho Tested-by: kokoro --- RELEASE-NOTES.md | 6 ++++++ src/Doxyfile | 2 +- src/base/version.cc | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 492bb962a2..46c8795709 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,3 +1,9 @@ +# Version 20.1.0.1 + +**[HOTFIX]** A patch was applied to fix the Garnet network interface stats. +Previously, the flit source delay was computed using both tick and cycles. +This bug affected the overall behavior of the Garnet Network Model. + # Version 20.1.0.0 Thank you to everyone that made this release possible! diff --git a/src/Doxyfile b/src/Doxyfile index d029a66850..83770d5f93 100644 --- a/src/Doxyfile +++ b/src/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = gem5 # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = v20.1.0.0 +PROJECT_NUMBER = v20.1.0.1 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/src/base/version.cc b/src/base/version.cc index 8edb8c6ff9..3ad07fa6d5 100644 --- a/src/base/version.cc +++ b/src/base/version.cc @@ -29,4 +29,4 @@ /** * @ingroup api_base_utils */ -const char *gem5Version = "20.1.0.0"; +const char *gem5Version = "20.1.0.1"; From 8728c26c7fe41baa12f64a5f56ee1f32f836ee7b Mon Sep 17 00:00:00 2001 From: "Daniel R. Carvalho" Date: Sun, 8 Nov 2020 15:38:04 +0100 Subject: [PATCH 3/5] configs: Fix MemorySize division The memory size is expected to be an integer. Jira: https://gem5.atlassian.net/browse/GEM5-806 Change-Id: I44b2d423a3478d2598950779222151f09970cbd8 Signed-off-by: Daniel R. Carvalho Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37255 Maintainer: Bobby R. Bruce Tested-by: kokoro Reviewed-by: Srikant Bharadwaj --- configs/topologies/MeshDirCorners_XY.py | 2 +- configs/topologies/Mesh_XY.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configs/topologies/MeshDirCorners_XY.py b/configs/topologies/MeshDirCorners_XY.py index 7d065de5b9..e0aea5212c 100644 --- a/configs/topologies/MeshDirCorners_XY.py +++ b/configs/topologies/MeshDirCorners_XY.py @@ -218,6 +218,6 @@ class MeshDirCorners_XY(SimpleTopology): for n in numa_nodes: if n: FileSystemConfig.register_node(n, - MemorySize(options.mem_size) / num_numa_nodes, i) + MemorySize(options.mem_size) // num_numa_nodes, i) i += 1 diff --git a/configs/topologies/Mesh_XY.py b/configs/topologies/Mesh_XY.py index 64a8506160..faec1e3c3b 100644 --- a/configs/topologies/Mesh_XY.py +++ b/configs/topologies/Mesh_XY.py @@ -178,4 +178,4 @@ class Mesh_XY(SimpleTopology): def registerTopology(self, options): for i in range(options.num_cpus): FileSystemConfig.register_node([i], - MemorySize(options.mem_size) / options.num_cpus, i) + MemorySize(options.mem_size) // options.num_cpus, i) From 14045cb39548cc44ecff2da18815129fe1c01a30 Mon Sep 17 00:00:00 2001 From: Hoa Nguyen Date: Sat, 17 Oct 2020 03:48:22 -0700 Subject: [PATCH 4/5] cpu,stats: Fix incorrect stat names of ThreadStateStats Previously, ThreadStateStats uses ThreadState::threadId() to determine the name of the stats. However, in the ThreadState constructor, ThreadStateStats is initialized before ThreadState is intialized. As a result, the name of ThreadStateStats has a wrong ThreadID. This commit uses ThreadID instead of ThreadState to determine the name of the stats. This causes a name collision between ThreadStateStats and ExecContextStats as both have the name of "thread_[tid]". Ideally, those stats should be merged to the BaseSimpleCPU. However, both ThreadStateStats and ExecContextStats have a stat named numInsts. So, for now, ExecContextStats will have a name of "exec_context.thread_[tid]", while ThreadStateStats keeps its name. Change-Id: If9a21549f98bd6e3ce6dc29bdf183e8fd5f51a67 Signed-off-by: Hoa Nguyen Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37455 Reviewed-by: Bobby R. Bruce Maintainer: Bobby R. Bruce Tested-by: kokoro --- src/cpu/thread_state.cc | 6 +++--- src/cpu/thread_state.hh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cpu/thread_state.cc b/src/cpu/thread_state.cc index a142f5741c..5e59eb258a 100644 --- a/src/cpu/thread_state.cc +++ b/src/cpu/thread_state.cc @@ -39,7 +39,7 @@ #include "sim/system.hh" ThreadState::ThreadState(BaseCPU *cpu, ThreadID _tid, Process *_process) - : numInst(0), numOp(0), threadStats(cpu, this), + : numInst(0), numOp(0), threadStats(cpu, _tid), numLoad(0), startNumLoad(0), _status(ThreadContext::Halted), baseCpu(cpu), _contextId(0), _threadId(_tid), lastActivate(0), lastSuspend(0), @@ -119,8 +119,8 @@ ThreadState::getVirtProxy() } ThreadState::ThreadStateStats::ThreadStateStats(BaseCPU *cpu, - ThreadState *thread) - : Stats::Group(cpu, csprintf("thread%i", thread->threadId()).c_str()), + const ThreadID& tid) + : Stats::Group(cpu, csprintf("thread_%i", tid).c_str()), ADD_STAT(numInsts, "Number of Instructions committed"), ADD_STAT(numOps, "Number of Ops committed"), ADD_STAT(numMemRefs, "Number of Memory References") diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh index 3ac473dce7..53817c8401 100644 --- a/src/cpu/thread_state.hh +++ b/src/cpu/thread_state.hh @@ -111,7 +111,7 @@ struct ThreadState : public Serializable { // Defining the stat group struct ThreadStateStats : public Stats::Group { - ThreadStateStats(BaseCPU *cpu, ThreadState *thread); + ThreadStateStats(BaseCPU *cpu, const ThreadID& thread); /** Stat for number instructions committed. */ Stats::Scalar numInsts; /** Stat for number ops (including micro ops) committed. */ From 0d703041fcd5d119012b62287695723a2955b408 Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Wed, 11 Nov 2020 13:34:23 -0800 Subject: [PATCH 5/5] misc: Updated the RELEASE-NOTES and version number Updated the RELEASE-NOTES.md and version number for the v20.1.0.2 hotfix release. Change-Id: Ibb6b62a36bd1f9084f7d8311ff1f94b8564dbe9b Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/37435 Reviewed-by: Bobby R. Bruce Maintainer: Bobby R. Bruce Tested-by: kokoro --- RELEASE-NOTES.md | 7 +++++++ src/Doxyfile | 2 +- src/base/version.cc | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 46c8795709..71934a7328 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,3 +1,10 @@ +# Version 20.1.0.2 + +**[HOTFIX]** This hotfix release fixes known two bugs: + +* A "ValueError: invalid literal for int() with base..." error was being thrown in certain circumstances due to a non-integer being passed to "MemorySize" via a division operation. This has been rectified. +* An assertion in Stats could be triggered due to a name collision between two ThreadStateStats objects, due to both erroneously sharing the same ThreadID. This has been fixed. + # Version 20.1.0.1 **[HOTFIX]** A patch was applied to fix the Garnet network interface stats. diff --git a/src/Doxyfile b/src/Doxyfile index 83770d5f93..b9346390ca 100644 --- a/src/Doxyfile +++ b/src/Doxyfile @@ -31,7 +31,7 @@ PROJECT_NAME = gem5 # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = v20.1.0.1 +PROJECT_NUMBER = v20.1.0.2 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/src/base/version.cc b/src/base/version.cc index 3ad07fa6d5..304ccc19c5 100644 --- a/src/base/version.cc +++ b/src/base/version.cc @@ -29,4 +29,4 @@ /** * @ingroup api_base_utils */ -const char *gem5Version = "20.1.0.1"; +const char *gem5Version = "20.1.0.2";