[gem5-dev] Change in gem5/gem5[develop]: cpu: convert tage_base to new style stats

2020-09-01 Thread Emily Brickey (Gerrit) via gem5-dev
Emily Brickey has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33937 )



Change subject: cpu: convert tage_base to new style stats
..

cpu: convert tage_base to new style stats

Change-Id: If03102af545855125e87782c77ff5b43da8ac73b
---
M src/cpu/pred/tage_base.cc
M src/cpu/pred/tage_base.hh
2 files changed, 65 insertions(+), 88 deletions(-)



diff --git a/src/cpu/pred/tage_base.cc b/src/cpu/pred/tage_base.cc
index 3d06dc4..0535420 100644
--- a/src/cpu/pred/tage_base.cc
+++ b/src/cpu/pred/tage_base.cc
@@ -63,7 +63,8 @@
  noSkip(p->noSkip),
  speculativeHistUpdate(p->speculativeHistUpdate),
  instShiftAmt(p->instShiftAmt),
- initialized(false)
+ initialized(false),
+ stats(this)
 {
 if (noSkip.empty()) {
 // Set all the table to enabled by default
@@ -82,6 +83,11 @@
 if (initialized) {
return;
 }
+
+// Finish initializing stats
+stats.longestMatchProvider.init(nHistoryTables + 1);
+stats.altMatchProvider.init(nHistoryTables + 1);
+
 // Current method for periodically resetting the u counter bits only
 // works for 1 or 2 bits
 // Also make sure that it is not 0
@@ -656,26 +662,28 @@
 if (taken == bi->tagePred) {
 // correct prediction
 switch (bi->provider) {
-  case BIMODAL_ONLY: tageBimodalProviderCorrect++; break;
-  case TAGE_LONGEST_MATCH: tageLongestMatchProviderCorrect++;  
break;

-  case BIMODAL_ALT_MATCH: bimodalAltMatchProviderCorrect++; break;
-  case TAGE_ALT_MATCH: tageAltMatchProviderCorrect++; break;
+  case BIMODAL_ONLY: stats.bimodalProviderCorrect++; break;
+  case TAGE_LONGEST_MATCH: stats.longestMatchProviderCorrect++;  
break;

+  case BIMODAL_ALT_MATCH:
+stats.bimodalAltMatchProviderCorrect++;
+break;
+  case TAGE_ALT_MATCH: stats.altMatchProviderCorrect++; break;
 }
 } else {
 // wrong prediction
 switch (bi->provider) {
-  case BIMODAL_ONLY: tageBimodalProviderWrong++; break;
+  case BIMODAL_ONLY: stats.bimodalProviderWrong++; break;
   case TAGE_LONGEST_MATCH:
-tageLongestMatchProviderWrong++;
+stats.longestMatchProviderWrong++;
 if (bi->altTaken == taken) {
-tageAltMatchProviderWouldHaveHit++;
+stats.altMatchProviderWouldHaveHit++;
 }
 break;
   case BIMODAL_ALT_MATCH:
-bimodalAltMatchProviderWrong++;
+stats.bimodalAltMatchProviderWrong++;
 break;
   case TAGE_ALT_MATCH:
-tageAltMatchProviderWrong++;
+stats.altMatchProviderWrong++;
 break;
 }

@@ -683,7 +691,7 @@
   case BIMODAL_ALT_MATCH:
   case TAGE_ALT_MATCH:
 if (bi->longestMatchPred == taken) {
-tageLongestMatchProviderWouldHaveHit++;
+stats.longestMatchProviderWouldHaveHit++;
 }
 }
 }
@@ -691,8 +699,8 @@
 switch (bi->provider) {
   case TAGE_LONGEST_MATCH:
   case TAGE_ALT_MATCH:
-tageLongestMatchProvider[bi->hitBank]++;
-tageAltMatchProvider[bi->altBank]++;
+stats.longestMatchProvider[bi->hitBank]++;
+stats.altMatchProvider[bi->altBank]++;
 break;
 }
 }
@@ -712,68 +720,35 @@
 return val;
 }

-void
-TAGEBase::regStats()
+TAGEBase::TAGEBaseStats::TAGEBaseStats(Stats::Group *parent)
+: Stats::Group(parent),
+  ADD_STAT(longestMatchProviderCorrect, "Number of times TAGE Longest"
+  " Match is the provider and the prediction is correct"),
+  ADD_STAT(altMatchProviderCorrect, "Number of times TAGE Alt Match"
+  " is the provider and the prediction is correct"),
+  ADD_STAT(bimodalAltMatchProviderCorrect, "Number of times TAGE Alt"
+  " Match is the bimodal and it is the provider and the prediction"
+  " is correct"),
+  ADD_STAT(bimodalProviderCorrect, "Number of times there are no"
+  " hits on the TAGE tables and the bimodal prediction is  
correct"),

+  ADD_STAT(longestMatchProviderWrong, "Number of times TAGE Longest"
+  " Match is the provider and the prediction is wrong"),
+  ADD_STAT(altMatchProviderWrong, "Number of times TAGE Alt Match is"
+  " the provider and the prediction is wrong"),
+  ADD_STAT(bimodalAltMatchProviderWrong, "Number of times TAGE Alt  
Match"

+  " is the bimodal and it is the provider and the prediction is"
+  " wrong"),
+  ADD_STAT(bimodalProviderWrong, "Number of times there are no hits"
+  " on the TAGE tables and the bimodal prediction is wrong"),
+  ADD_STAT(altMatchProviderWouldHaveHit, "Number of times TAGE"
+  " Longest Match is the provider, the prediction is wrong and"
+  " Alt Match 

[gem5-dev] Build failed in Jenkins: Nightly #54

2020-09-01 Thread jenkins-no-reply--- via gem5-dev
See 

Changes:

[nathanael.premillieu] base: avoid recreating socket at each call to listen()

[eavivi] mem: convert base prefetcher and queued to new style stats

[matthew.poremba] misc: Use VPtr in hsa_driver.cc

[odanrc] mem-cache: Fix integer promotion of mask

[odanrc] mem-cache: Fix RepeatedQwords compressor

[odanrc] mem-cache: Upgrade BaseDictionaryCompressor's stats

[odanrc] mem-cache: Upgrade Compressor::Multi's stats

[odanrc] mem-cache: Allow inheriting from DitionaryCompressor's comp data

[odanrc] mem-cache: Standardize data parsing in compressors

[odanrc] mem-cache: Add encoding bits to the data of multi compressors

[odanrc] mem-cache: Store BDI's encoding in tags

[odanrc] mem-cache: Add an extra decomp lat to multi compressor

[odanrc] mem-cache: Handle zero sizes on compression

[odanrc] mem-cache: Add stats for failed compressions

[odanrc] mem-cache: Make compression size threshold a percentage

[odanrc] mem-cache: Explicitly define threshold of BDI's sub-compressors

[odanrc] mem-cache: Use cache's max CR on perfect compressor

[gabeblack] scons: Remove the AddLocalOption workaround.

[sampad.mohapatra] mem-ruby: Change request to response in MOESI_AMD_Base-dir.sm

[Jason Lowe-Power] python: Import reduce function in FileSystemConfig


--
[...truncated 78.26 KB...]
 [ CXX] NULL/mem/ruby/network/garnet2.0/GarnetNetwork.py.cc -> .o
 [EMBED PY] NULL/marshal, NULL/mem/ruby/structures/DirectoryMemory.py -> 
NULL/mem/ruby/structures/DirectoryMemory.py.cc
 [ CXX] NULL/mem/ruby/structures/DirectoryMemory.py.cc -> .o
 [EMBED PY] NULL/marshal, systemc/tlm_bridge/TlmBridge.py -> 
systemc/tlm_bridge/TlmBridge.py.cc
 [ CXX] NULL/systemc/tlm_bridge/TlmBridge.py.cc -> .o
 [EMBED PY] NULL/marshal, python/m5/debug.py -> python/m5/debug.py.cc
 [ CXX] NULL/python/m5/debug.py.cc -> .o
 [EMBED PY] NULL/marshal, python/m5/internal/params.py -> 
python/m5/internal/params.py.cc
 [ CXX] NULL/python/m5/internal/params.py.cc -> .o
 [EMBED PY] NULL/marshal, sim/PowerDomain.py -> sim/PowerDomain.py.cc
 [ CXX] NULL/sim/PowerDomain.py.cc -> .o
 [EMBED PY] NULL/marshal, sim/DVFSHandler.py -> sim/DVFSHandler.py.cc
 [ CXX] NULL/sim/DVFSHandler.py.cc -> .o
 [EMBED PY] NULL/marshal, NULL/mem/MemDelay.py -> NULL/mem/MemDelay.py.cc
 [ CXX] NULL/mem/MemDelay.py.cc -> .o
 [EMBED PY] NULL/marshal, systemc/python/tlm.py -> systemc/python/tlm.py.cc
 [ CXX] NULL/systemc/python/tlm.py.cc -> .o
 [EMBED PY] NULL/marshal, cpu/testers/rubytest/RubyTester.py -> 
cpu/testers/rubytest/RubyTester.py.cc
 [ CXX] NULL/cpu/testers/rubytest/RubyTester.py.cc -> .o
 [EMBED PY] NULL/marshal, python/m5/util/sorteddict.py -> 
python/m5/util/sorteddict.py.cc
 [ CXX] NULL/python/m5/util/sorteddict.py.cc -> .o
 [EMBED PY] NULL/marshal, learning_gem5/part2/SimpleCache.py -> 
learning_gem5/part2/SimpleCache.py.cc
 [ CXX] NULL/learning_gem5/part2/SimpleCache.py.cc -> .o
 [EMBED PY] NULL/marshal, sim/power/ThermalModel.py -> 
sim/power/ThermalModel.py.cc
 [ CXX] NULL/sim/power/ThermalModel.py.cc -> .o
 [EMBED PY] NULL/marshal, NULL/mem/ruby/network/garnet2.0/GarnetLink.py -> 
NULL/mem/ruby/network/garnet2.0/GarnetLink.py.cc
 [ CXX] NULL/mem/ruby/network/garnet2.0/GarnetLink.py.cc -> .o
 [EMBED PY] NULL/marshal, python/m5/event.py -> python/m5/event.py.cc
 [ CXX] NULL/python/m5/event.py.cc -> .o
 [EMBED PY] NULL/marshal, NULL/mem/MemChecker.py -> NULL/mem/MemChecker.py.cc
 [ CXX] NULL/mem/MemChecker.py.cc -> .o
 [EMBED PY] NULL/marshal, sim/PowerState.py -> sim/PowerState.py.cc
 [ CXX] NULL/sim/PowerState.py.cc -> .o
 [EMBED PY] NULL/marshal, NULL/mem/XBar.py -> NULL/mem/XBar.py.cc
 [ CXX] NULL/mem/XBar.py.cc -> .o
 [EMBED PY] NULL/marshal, python/m5/ticks.py -> python/m5/ticks.py.cc
 [EMBED PY] NULL/marshal, python/m5/__init__.py -> python/m5/__init__.py.cc
 [ CXX] NULL/python/m5/ticks.py.cc -> .o
 [ CXX] NULL/python/m5/__init__.py.cc -> .o
 [EMBED PY] NULL/marshal, NULL/mem/ruby/network/BasicRouter.py -> 
NULL/mem/ruby/network/BasicRouter.py.cc
 [ CXX] NULL/mem/ruby/network/BasicRouter.py.cc -> .o
 [EMBED PY] NULL/marshal, sim/ClockDomain.py -> sim/ClockDomain.py.cc
 [ CXX] NULL/sim/ClockDomain.py.cc -> .o
 [EMBED PY] NULL/marshal, dev/pci/CopyEngine.py -> dev/pci/CopyEngine.py.cc
 [EMBED PY] NULL/marshal, python/m5/util/__init__.py -> 
python/m5/util/__init__.py.cc
 [ CXX] NULL/dev/pci/CopyEngine.py.cc -> .o
 [ CXX] NULL/python/m5/util/__init__.py.cc -> .o
 [EMBED PY] NULL/marshal, NULL/mem/ruby/protocol/L1Cache_Controller.py -> 
NULL/mem/ruby/protocol/L1Cache_Controller.py.cc
 [ CXX] NULL/mem/ruby/protocol/L1Cache_Controller.py.cc -> .o
 [EMBED PY] NULL/marshal, NULL/mem/probes/BaseMemProbe.py -> 
NULL/mem/probes/BaseMemProbe.py.cc
 [ CXX] NULL/mem/probes/BaseMemProbe.py.cc -> .o
 [EMBED PY] NULL/marshal, sim/power/PowerModelState.py -> 

[gem5-dev] Change in gem5/gem5[develop]: mem-cache: Fix copy ellision on base compressor

2020-09-01 Thread Daniel Carvalho (Gerrit) via gem5-dev
Daniel Carvalho has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33835 )


Change subject: mem-cache: Fix copy ellision on base compressor
..

mem-cache: Fix copy ellision on base compressor

Newer compiler versions have a problem with this move as
it prevents copy elision.

Change-Id: I802703df12e171d6a377b673d0ad7e202456b516
Signed-off-by: Daniel R. Carvalho 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33835
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/mem/cache/compressors/base.cc
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/mem/cache/compressors/base.cc  
b/src/mem/cache/compressors/base.cc

index e12e36e..1408d2d 100644
--- a/src/mem/cache/compressors/base.cc
+++ b/src/mem/cache/compressors/base.cc
@@ -165,7 +165,7 @@
 "Compression latency: %llu, decompression latency: %llu\n",
 blkSize*8, comp_size_bits, comp_lat, decomp_lat);

-return std::move(comp_data);
+return comp_data;
 }

 Cycles

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33835
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I802703df12e171d6a377b673d0ad7e202456b516
Gerrit-Change-Number: 33835
Gerrit-PatchSet: 2
Gerrit-Owner: Daniel Carvalho 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: base: Expose the ObjectFile class to python.

2020-09-01 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33899 )



Change subject: base: Expose the ObjectFile class to python.
..

base: Expose the ObjectFile class to python.

This will make it possible to inspect a binary and determine, for
example, what architecture or operating system it was compiled for.

Change-Id: Ib40f1e1c02448dc5bf084bb0dd98d3767f463fef
---
M src/base/loader/SConscript
M src/base/loader/object_file.cc
M src/base/loader/object_file.hh
A src/base/loader/python.cc
4 files changed, 116 insertions(+), 0 deletions(-)



diff --git a/src/base/loader/SConscript b/src/base/loader/SConscript
index d17875f..d40fa42 100644
--- a/src/base/loader/SConscript
+++ b/src/base/loader/SConscript
@@ -35,3 +35,6 @@
 Source('memory_image.cc')
 Source('object_file.cc')
 Source('symtab.cc')
+
+if env['USE_PYTHON']:
+Source('python.cc')
diff --git a/src/base/loader/object_file.cc b/src/base/loader/object_file.cc
index 12e5606..6fdf228 100644
--- a/src/base/loader/object_file.cc
+++ b/src/base/loader/object_file.cc
@@ -38,6 +38,60 @@

 ObjectFile::ObjectFile(ImageFileDataPtr ifd) : ImageFile(ifd) {}

+const char *
+archToString(Arch arch)
+{
+switch (arch) {
+  case UnknownArch:
+return "unknown";
+  case SPARC64:
+return "sparc64";
+  case SPARC32:
+return "sparc32";
+  case Mips:
+return "mips";
+  case X86_64:
+return "x86_64";
+  case I386:
+return "i386";
+  case Arm64:
+return "arm64";
+  case Arm:
+return "arm";
+  case Thumb:
+return "thumb";
+  case Power:
+return "power";
+  case Riscv64:
+return "riscv64";
+  case Riscv32:
+return "riscv32";
+  default:
+panic("Unrecognized arch %d.", arch);
+}
+}
+
+const char *
+opSysToString(OpSys op_sys)
+{
+switch (op_sys) {
+  case UnknownOpSys:
+return "unknown";
+  case Tru64:
+return "tru64";
+  case Linux:
+return "linux";
+  case Solaris:
+return "solaris";
+  case LinuxArmOABI:
+return "linux_arm_OABI";
+  case FreeBSD:
+return "freebsd";
+  default:
+panic("Unrecognized operating system %d.", op_sys);
+}
+}
+
 namespace
 {

diff --git a/src/base/loader/object_file.hh b/src/base/loader/object_file.hh
index 9ff9997..0bfd918 100644
--- a/src/base/loader/object_file.hh
+++ b/src/base/loader/object_file.hh
@@ -56,6 +56,8 @@
 Riscv32
 };

+const char *archToString(Arch arch);
+
 enum OpSys {
 UnknownOpSys,
 Tru64,
@@ -65,6 +67,8 @@
 FreeBSD
 };

+const char *opSysToString(OpSys op_sys);
+
 class SymbolTable;

 class ObjectFile : public ImageFile
diff --git a/src/base/loader/python.cc b/src/base/loader/python.cc
new file mode 100644
index 000..0cdb4b3
--- /dev/null
+++ b/src/base/loader/python.cc
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2020 Google, Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "base/loader/object_file.hh"
+#include "python/pybind11/pybind.hh"
+#include "sim/init.hh"
+
+namespace
+{
+
+void
+objectfile_pybind(pybind11::module _internal)
+{
+pybind11::module m = m_internal.def_submodule("object_file");
+
+pybind11::class_(m, "ObjectFile")
+.def("get_arch", [](const Loader::ObjectFile ) {
+return Loader::archToString(obj.getArch());
+}, 

[gem5-dev] Change in gem5/gem5[develop]: base: Create a SConscript for the loader subdirectory.

2020-09-01 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33898 )



Change subject: base: Create a SConscript for the loader subdirectory.
..

base: Create a SConscript for the loader subdirectory.

These files had been handled in base/SConscript, but there are enough of
them that they deserve their own.

Change-Id: I0c4166d8ff3c761c25940d2af5d7f0a9a6c874fa
---
M src/base/SConscript
A src/base/loader/SConscript
2 files changed, 37 insertions(+), 9 deletions(-)



diff --git a/src/base/SConscript b/src/base/SConscript
index bd18429..6514de0 100644
--- a/src/base/SConscript
+++ b/src/base/SConscript
@@ -74,15 +74,6 @@
 Source('types.cc')
 GTest('types.test', 'types.test.cc', 'types.cc')

-Source('loader/dtb_file.cc')
-Source('loader/elf_object.cc')
-Source('loader/image_file_data.cc')
-GTest('loader/image_file_data.test', 'loader/image_file_data.test.cc',
-'loader/image_file_data.cc')
-Source('loader/memory_image.cc')
-Source('loader/object_file.cc')
-Source('loader/symtab.cc')
-
 Source('stats/group.cc')
 Source('stats/text.cc')
 if env['USE_HDF5']:
diff --git a/src/base/loader/SConscript b/src/base/loader/SConscript
new file mode 100644
index 000..d17875f
--- /dev/null
+++ b/src/base/loader/SConscript
@@ -0,0 +1,37 @@
+# -*- mode:python -*-
+
+# Copyright (c) 2006 The Regents of The University of Michigan
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Import('*')
+
+Source('dtb_file.cc')
+Source('elf_object.cc')
+Source('image_file_data.cc')
+GTest('image_file_data.test', 'image_file_data.test.cc', 'image_file_data.cc')
+Source('memory_image.cc')
+Source('object_file.cc')
+Source('symtab.cc')

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33898
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I0c4166d8ff3c761c25940d2af5d7f0a9a6c874fa
Gerrit-Change-Number: 33898
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: x86: Create an SEWorkload for x86 linux.

2020-09-01 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33902 )



Change subject: x86: Create an SEWorkload for x86 linux.
..

x86: Create an SEWorkload for x86 linux.

This doesn't do anything interesting yet, but soon it will take over
system call duties from the x86 linux processes.

Change-Id: Ic126fc80def0b458de51d3a9c96120c58e5a75ad
---
M src/arch/x86/SConscript
A src/arch/x86/X86SeWorkload.py
A src/arch/x86/linux/se_workload.cc
A src/arch/x86/linux/se_workload.hh
4 files changed, 148 insertions(+), 0 deletions(-)



diff --git a/src/arch/x86/SConscript b/src/arch/x86/SConscript
index 1be41ed..6bb6097 100644
--- a/src/arch/x86/SConscript
+++ b/src/arch/x86/SConscript
@@ -56,6 +56,7 @@
 Source('insts/static_inst.cc')
 Source('interrupts.cc')
 Source('isa.cc')
+Source('linux/se_workload.cc')
 Source('linux/fs_workload.cc')
 Source('linux/linux.cc')
 Source('linux/process.cc')
@@ -69,6 +70,7 @@
 Source('types.cc')
 Source('utility.cc')

+SimObject('X86SeWorkload.py')
 SimObject('X86FsWorkload.py')
 SimObject('X86ISA.py')
 SimObject('X86LocalApic.py')
diff --git a/src/arch/x86/X86SeWorkload.py b/src/arch/x86/X86SeWorkload.py
new file mode 100644
index 000..ada1eae
--- /dev/null
+++ b/src/arch/x86/X86SeWorkload.py
@@ -0,0 +1,38 @@
+# Copyright 2020 Google Inc.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+from m5.params import *
+
+from m5.objects.Workload import SEWorkload
+
+class X86EmuLinux(SEWorkload):
+type = 'X86EmuLinux'
+cxx_header = "arch/x86/linux/se_workload.hh"
+cxx_class = 'X86ISA::EmuLinux'
+
+@classmethod
+def _is_compatible_with(cls, obj):
+return obj.get_arch() in ('x86_64', 'i386') and \
+obj.get_op_sys() == 'linux'
diff --git a/src/arch/x86/linux/se_workload.cc  
b/src/arch/x86/linux/se_workload.cc

new file mode 100644
index 000..e9c5e20
--- /dev/null
+++ b/src/arch/x86/linux/se_workload.cc
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2020 Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * 

[gem5-dev] Change in gem5/gem5[develop]: sim: Add a mechanism for finding an compatible SE workload.

2020-09-01 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33900 )



Change subject: sim: Add a mechanism for finding an compatible SE workload.
..

sim: Add a mechanism for finding an compatible SE workload.

This makes it possible to pick an SEWorkload generically at the config
level and not in C++ after the structure of the simulation has already
been set.

Change-Id: I7e52beb5a4d45aa43192e1ba4de6c5aab8b43d84
---
M src/sim/Workload.py
1 file changed, 43 insertions(+), 1 deletion(-)



diff --git a/src/sim/Workload.py b/src/sim/Workload.py
index f1974bb..0b141d8 100644
--- a/src/sim/Workload.py
+++ b/src/sim/Workload.py
@@ -28,6 +28,8 @@

 from m5.objects.SimpleMemory import *

+from six import with_metaclass
+
 class Workload(SimObject):
 type = 'Workload'
 cxx_header = "sim/workload.hh"
@@ -51,6 +53,46 @@

 command_line = Param.String("a", "boot flags to pass to the kernel")

-class SEWorkload(Workload):
+class SEWorkloadMeta(type(Workload)):
+all_se_workload_classes = []
+def __new__(mcls, name, bases, dct):
+cls = super(SEWorkloadMeta, mcls).__new__(mcls, name, bases, dct)
+SEWorkloadMeta.all_se_workload_classes.append(cls)
+return cls
+
+class SEWorkload(Workload, metaclass=SEWorkloadMeta):
 type = 'SEWorkload'
 cxx_header = "sim/se_workload.hh"
+cxx_class = 'SEWorkload'
+
+@classmethod
+def _is_compatible_with(cls, obj):
+return False
+
+@classmethod
+def find_compatible(cls, path):
+'''List the SE workloads compatible with the binary at path'''
+
+from _m5 import object_file
+obj = object_file.create(path)
+options = list(filter(lambda wld: wld._is_compatible_with(obj),
+  SEWorkloadMeta.all_se_workload_classes))
+
+return options
+
+@classmethod
+def init_compatible(cls, path, *args, **kwargs):
+'''Construct the only SE workload compatible with the binary at  
path'''

+
+options = SEWorkload.find_compatible(path)
+
+if len(options) > 1:
+raise ValueError("More than one SE workload is compatible  
with %s")

+elif len(options) < 1:
+# For now, fall back to the base class if there are no matches.
+# After we've had a chance to implement everything, this  
default
+# can be removed since this should always find exactly one  
match.

+return SEWorkload(*args, **kwargs)
+raise ValueError("No SE workload is compatible with %s", path)
+
+return options[0](*args, **kwargs)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33900
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I7e52beb5a4d45aa43192e1ba4de6c5aab8b43d84
Gerrit-Change-Number: 33900
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: x86: Delegate process loading to the EmuLinux workload.

2020-09-01 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33904 )



Change subject: x86: Delegate process loading to the EmuLinux workload.
..

x86: Delegate process loading to the EmuLinux workload.

This is still triggered by the generic mechanism that tries out all
paths to go from an object file to a process. That's not entirely
necessary since the only loader that should be used when using the
X86ISA::EmuLinux workload is the one it provides, but the rest of gem5
isn't ready for that change yet.

This removes the last lingering reason to keep around the
arch/x86/linux/process.(hh|cc) files, so they have been deleted.

Change-Id: I425b95c9c730f31291790d63bc842e2c0092960d
---
M src/arch/x86/SConscript
D src/arch/x86/linux/process.cc
D src/arch/x86/linux/process.hh
M src/arch/x86/linux/se_workload.cc
M src/arch/x86/linux/se_workload.hh
5 files changed, 29 insertions(+), 147 deletions(-)



diff --git a/src/arch/x86/SConscript b/src/arch/x86/SConscript
index 6bb6097..e361b0a 100644
--- a/src/arch/x86/SConscript
+++ b/src/arch/x86/SConscript
@@ -59,7 +59,6 @@
 Source('linux/se_workload.cc')
 Source('linux/fs_workload.cc')
 Source('linux/linux.cc')
-Source('linux/process.cc')
 Source('nativetrace.cc')
 Source('pagetable.cc')
 Source('pagetable_walker.cc')
diff --git a/src/arch/x86/linux/process.cc b/src/arch/x86/linux/process.cc
deleted file mode 100644
index 2576269..000
--- a/src/arch/x86/linux/process.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2007 The Hewlett-Packard Development Company
- * All rights reserved.
- *
- * The license below extends only to copyright in the software and shall
- * not be construed as granting a license to any other intellectual
- * property including but not limited to intellectual property relating
- * to a hardware implementation of the functionality of the software
- * licensed hereunder.  You may use the software subject to the license
- * terms below provided that you ensure that this notice is replicated
- * unmodified and in its entirety in all distributions of the software,
- * modified or unmodified, in source code or in binary form.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "arch/x86/linux/process.hh"
-
-#include "base/loader/object_file.hh"
-#include "sim/process.hh"
-
-using namespace std;
-
-namespace
-{
-
-class X86LinuxObjectFileLoader : public Process::Loader
-{
-  public:
-Process *
-load(ProcessParams *params, ::Loader::ObjectFile *obj_file) override
-{
-auto arch = obj_file->getArch();
-auto opsys = obj_file->getOpSys();
-
-if (arch != ::Loader::X86_64 && arch != ::Loader::I386)
-return nullptr;
-
-if (opsys == ::Loader::UnknownOpSys) {
-warn("Unknown operating system; assuming Linux.");
-opsys = ::Loader::Linux;
-}
-
-if (opsys != ::Loader::Linux)
-return nullptr;
-
-if (arch == ::Loader::X86_64)
-return new X86ISA::X86_64LinuxProcess(params, obj_file);
-else
-return new X86ISA::I386LinuxProcess(params, obj_file);
-}
-};
-
-X86LinuxObjectFileLoader loader;
-
-} // anonymous namespace
diff --git a/src/arch/x86/linux/process.hh b/src/arch/x86/linux/process.hh
deleted file mode 100644
index 4aa6e11..000
--- a/src/arch/x86/linux/process.hh
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 

[gem5-dev] Change in gem5/gem5[develop]: configs,tests: Update configs to use compatible SE workloads.

2020-09-01 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33901 )



Change subject: configs,tests: Update configs to use compatible SE  
workloads.

..

configs,tests: Update configs to use compatible SE workloads.

If there's no more compatible workload than the base SEWorkload class it
will fall back to that for now.

Change-Id: Id27172c3074a7976823a891878ab9eecf6246c47
---
M configs/example/apu_se.py
M configs/example/arm/starter_se.py
M configs/example/hmc_hello.py
M configs/example/se.py
M configs/learning_gem5/part1/simple.py
M configs/learning_gem5/part1/two_level.py
M configs/learning_gem5/part2/simple_cache.py
M configs/learning_gem5/part2/simple_memobj.py
M configs/learning_gem5/part3/simple_ruby.py
M configs/splash2/cluster.py
M configs/splash2/run.py
M tests/gem5/cpu_tests/run.py
M tests/gem5/m5threads_test_atomic/atomic_system.py
13 files changed, 21 insertions(+), 18 deletions(-)



diff --git a/configs/example/apu_se.py b/configs/example/apu_se.py
index 077ce4c..61dcd9e 100644
--- a/configs/example/apu_se.py
+++ b/configs/example/apu_se.py
@@ -501,7 +501,7 @@
 mem_ranges = [AddrRange(options.mem_size)],
 cache_line_size = options.cacheline_size,
 mem_mode = mem_mode,
-workload = SEWorkload())
+workload = SEWorkload.init_compatible(executable))
 if fast_forward:
 system.future_cpu = future_cpu_list
 system.voltage_domain = VoltageDomain(voltage = options.sys_voltage)
diff --git a/configs/example/arm/starter_se.py  
b/configs/example/arm/starter_se.py

index d342420..8b1dbd2 100644
--- a/configs/example/arm/starter_se.py
+++ b/configs/example/arm/starter_se.py
@@ -171,7 +171,7 @@
   (len(processes), args.num_cores))
 sys.exit(1)

-system.workload = SEWorkload()
+system.workload = SEWorkload.init_compatible(processes[0].executable)

 # Assign one workload to each CPU
 for cpu, workload in zip(system.cpu_cluster.cpus, processes):
diff --git a/configs/example/hmc_hello.py b/configs/example/hmc_hello.py
index 706fc2b..4e46235 100644
--- a/configs/example/hmc_hello.py
+++ b/configs/example/hmc_hello.py
@@ -50,7 +50,6 @@
 options = parser.parse_args()
 # create the system we are going to simulate
 system = System()
-system.workload = SEWorkload()
 # use timing mode for the interaction between master-slave ports
 system.mem_mode = 'timing'
 # set the clock fequency of the system
@@ -77,6 +76,8 @@
 process = Process()
 # cmd is a list which begins with the executable (like argv)
 process.cmd = [binary]
+# set the system workload
+system.workload = SEWorkload.init_compatible(binary)
 # set the cpu workload
 system.cpu.workload = process
 # create thread contexts
diff --git a/configs/example/se.py b/configs/example/se.py
index f3fea61..d30679f 100644
--- a/configs/example/se.py
+++ b/configs/example/se.py
@@ -169,11 +169,12 @@
 fatal("You cannot use SMT with multiple CPUs!")

 np = options.num_cpus
+mp0_path = multiprocesses[0].executable
 system = System(cpu = [CPUClass(cpu_id=i) for i in range(np)],
 mem_mode = test_mem_mode,
 mem_ranges = [AddrRange(options.mem_size)],
 cache_line_size = options.cacheline_size,
-workload = SEWorkload())
+workload = SEWorkload.init_compatible(mp0_path))

 if numThreads > 1:
 system.multi_thread = True
diff --git a/configs/learning_gem5/part1/simple.py  
b/configs/learning_gem5/part1/simple.py

index 191ba3b..5948e82 100644
--- a/configs/learning_gem5/part1/simple.py
+++ b/configs/learning_gem5/part1/simple.py
@@ -93,7 +93,7 @@
 binary = os.path.join(thispath, '../../../',
   'tests/test-progs/hello/bin/', isa, 'linux/hello')

-system.workload = SEWorkload()
+system.workload = SEWorkload.init_compatible(binary)

 # Create a process for a simple "Hello World" application
 process = Process()
diff --git a/configs/learning_gem5/part1/two_level.py  
b/configs/learning_gem5/part1/two_level.py

index f07dc20..b172dd8 100644
--- a/configs/learning_gem5/part1/two_level.py
+++ b/configs/learning_gem5/part1/two_level.py
@@ -136,7 +136,7 @@
 system.mem_ctrl.range = system.mem_ranges[0]
 system.mem_ctrl.port = system.membus.master

-system.workload = SEWorkload()
+system.workload = SEWorkload.init_compatible(binary)

 # Create a process for a simple "Hello World" application
 process = Process()
diff --git a/configs/learning_gem5/part2/simple_cache.py  
b/configs/learning_gem5/part2/simple_cache.py

index 083750d..48d2662 100644
--- a/configs/learning_gem5/part2/simple_cache.py
+++ b/configs/learning_gem5/part2/simple_cache.py
@@ -83,8 +83,6 @@
 # Connect the system up to the membus
 system.system_port = system.membus.slave

-system.workload = SEWorkload()
-
 # Create a process for a simple "Hello World" application
 process = Process()
 # 

[gem5-dev] Change in gem5/gem5[develop]: scons: Avoid the unsupported option -Wno-c99-designator in MacOS

2020-09-01 Thread Nikos Nikoleris (Gerrit) via gem5-dev
Nikos Nikoleris has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33775 )


Change subject: scons: Avoid the unsupported option -Wno-c99-designator in  
MacOS

..

scons: Avoid the unsupported option -Wno-c99-designator in MacOS

Change-Id: I4d95c75915b17531bdd6d9161eb266bb91cd7bef
Signed-off-by: Nikos Nikoleris 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33775
Reviewed-by: Gabe Black 
Reviewed-by: Jason Lowe-Power 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M SConstruct
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Gabe Black: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/SConstruct b/SConstruct
index d229ab8..4e47bda 100755
--- a/SConstruct
+++ b/SConstruct
@@ -440,7 +440,8 @@
  # interchangeably.
  '-Wno-mismatched-tags',
  ])
-if compareVersions(clang_version, "10.0") >= 0:
+if sys.platform != "darwin" and \
+   compareVersions(clang_version, "10.0") >= 0:
 main.Append(CCFLAGS=['-Wno-c99-designator'])

 if compareVersions(clang_version, "8.0") >= 0:

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33775
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I4d95c75915b17531bdd6d9161eb266bb91cd7bef
Gerrit-Change-Number: 33775
Gerrit-PatchSet: 2
Gerrit-Owner: Nikos Nikoleris 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: arch: Remove unused variable pcbb from ThreadInfo

2020-09-01 Thread Nikos Nikoleris (Gerrit) via gem5-dev
Nikos Nikoleris has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33776 )


Change subject: arch: Remove unused variable pcbb from ThreadInfo
..

arch: Remove unused variable pcbb from ThreadInfo

Change-Id: Ib9e46934f1613c98758662cba26a46fcc2a76146
Signed-off-by: Nikos Nikoleris 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33776
Reviewed-by: Gabe Black 
Reviewed-by: Jason Lowe-Power 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M src/arch/generic/linux/threadinfo.hh
1 file changed, 2 insertions(+), 3 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Gabe Black: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/arch/generic/linux/threadinfo.hh  
b/src/arch/generic/linux/threadinfo.hh

index 0127105..e5ba7e2 100644
--- a/src/arch/generic/linux/threadinfo.hh
+++ b/src/arch/generic/linux/threadinfo.hh
@@ -39,7 +39,6 @@
   private:
 ThreadContext *tc;
 System *sys;
-Addr pcbb;

 ByteOrder byteOrder;

@@ -62,8 +61,8 @@
 }

   public:
-ThreadInfo(ThreadContext *_tc, Addr _pcbb = 0)
-: tc(_tc), sys(tc->getSystemPtr()), pcbb(_pcbb),
+ThreadInfo(ThreadContext *_tc)
+: tc(_tc), sys(tc->getSystemPtr()),
 byteOrder(tc->getSystemPtr()->getGuestByteOrder())
 {


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33776
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ib9e46934f1613c98758662cba26a46fcc2a76146
Gerrit-Change-Number: 33776
Gerrit-PatchSet: 2
Gerrit-Owner: Nikos Nikoleris 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: sim: Add missing overrides in the *Fault classes

2020-09-01 Thread Jason Lowe-Power (Gerrit) via gem5-dev
Jason Lowe-Power has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33777 )


Change subject: sim: Add missing overrides in the *Fault classes
..

sim: Add missing overrides in the *Fault classes

Change-Id: I7a74df78f0f85ccf7fd896f98b301c1f998c1497
Signed-off-by: Nikos Nikoleris 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33777
Reviewed-by: Gabe Black 
Reviewed-by: Jason Lowe-Power 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M src/sim/faults.hh
1 file changed, 9 insertions(+), 5 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Gabe Black: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/sim/faults.hh b/src/sim/faults.hh
index e9a57c6..4b5c1a5 100644
--- a/src/sim/faults.hh
+++ b/src/sim/faults.hh
@@ -55,7 +55,11 @@
   public:
 UnimpFault(std::string _str) : panicStr(_str) {}

-FaultName name() const { return "Unimplemented simulator feature"; }
+FaultName
+name() const override
+{
+return "Unimplemented simulator feature";
+}
 void invoke(ThreadContext *tc, const StaticInstPtr  =
 StaticInst::nullStaticInstPtr) override;
 };
@@ -63,7 +67,7 @@
 class ReExec : public FaultBase
 {
   public:
-virtual FaultName name() const { return "Re-execution fault"; }
+virtual FaultName name() const override { return "Re-execution fault";  
}

 void invoke(ThreadContext *tc, const StaticInstPtr =
 StaticInst::nullStaticInstPtr) override;
 };
@@ -78,7 +82,7 @@
 class SyscallRetryFault : public FaultBase
 {
   public:
-virtual FaultName name() const { return "System call retry fault"; }
+FaultName name() const override { return "System call retry fault"; }
 SyscallRetryFault() {}
 void invoke(ThreadContext *tc, const StaticInstPtr =
 StaticInst::nullStaticInstPtr) override;
@@ -89,7 +93,7 @@
   private:
 Addr vaddr;
   public:
-FaultName name() const { return "Generic page table fault"; }
+FaultName name() const override { return "Generic page table fault"; }
 GenericPageTableFault(Addr va) : vaddr(va) {}
 void invoke(ThreadContext *tc, const StaticInstPtr =
 StaticInst::nullStaticInstPtr) override;
@@ -101,7 +105,7 @@
   private:
 Addr vaddr;
   public:
-FaultName name() const { return "Generic alignment fault"; }
+FaultName name() const override { return "Generic alignment fault"; }
 GenericAlignmentFault(Addr va) : vaddr(va) {}
 void invoke(ThreadContext *tc, const StaticInstPtr =
 StaticInst::nullStaticInstPtr) override;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33777
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I7a74df78f0f85ccf7fd896f98b301c1f998c1497
Gerrit-Change-Number: 33777
Gerrit-PatchSet: 2
Gerrit-Owner: Nikos Nikoleris 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Bobby R. Bruce 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: misc: Remove the "fault" parameter from syscall functions.

2020-09-01 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33277 )


Change subject: misc: Remove the "fault" parameter from syscall functions.
..

misc: Remove the "fault" parameter from syscall functions.

This parameter was never set or used, just plumbed everywhere,
occasionally with a dummy value. This change removes all of that
plumbing.

Change-Id: I9bc31ffd1fbc4952c5d3096f7f21eab30102300b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33277
Tested-by: kokoro 
Reviewed-by: Andreas Sandberg 
Maintainer: Andreas Sandberg 
---
M src/arch/arm/fastmodel/iris/thread_context.hh
M src/arch/arm/faults.cc
M src/arch/arm/freebsd/process.cc
M src/arch/arm/freebsd/process.hh
M src/arch/arm/linux/process.cc
M src/arch/arm/linux/process.hh
M src/arch/mips/isa/decoder.isa
M src/arch/mips/linux/process.cc
M src/arch/mips/linux/process.hh
M src/arch/power/isa/decoder.isa
M src/arch/power/linux/process.cc
M src/arch/power/linux/process.hh
M src/arch/riscv/faults.cc
M src/arch/riscv/linux/process.cc
M src/arch/riscv/linux/process.hh
M src/arch/sparc/faults.cc
M src/arch/sparc/linux/process.cc
M src/arch/sparc/linux/process.hh
M src/arch/sparc/process.cc
M src/arch/sparc/process.hh
M src/arch/sparc/solaris/process.cc
M src/arch/sparc/solaris/process.hh
M src/arch/x86/isa/decoder/one_byte_opcodes.isa
M src/arch/x86/isa/decoder/two_byte_opcodes.isa
M src/arch/x86/linux/process.cc
M src/arch/x86/linux/process.hh
M src/cpu/checker/cpu.hh
M src/cpu/checker/thread_context.hh
M src/cpu/exec_context.hh
M src/cpu/minor/exec_context.hh
M src/cpu/o3/cpu.cc
M src/cpu/o3/cpu.hh
M src/cpu/o3/dyn_inst.hh
M src/cpu/o3/dyn_inst_impl.hh
M src/cpu/o3/thread_context.hh
M src/cpu/o3/thread_state.hh
M src/cpu/simple/exec_context.hh
M src/cpu/simple_thread.hh
M src/cpu/thread_context.hh
M src/sim/process.hh
M src/sim/pseudo_inst.cc
M src/sim/syscall_desc.cc
M src/sim/syscall_desc.hh
43 files changed, 91 insertions(+), 114 deletions(-)

Approvals:
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/arch/arm/fastmodel/iris/thread_context.hh  
b/src/arch/arm/fastmodel/iris/thread_context.hh

index 363e1d7..dc53969 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.hh
+++ b/src/arch/arm/fastmodel/iris/thread_context.hh
@@ -445,7 +445,7 @@
 }

 void
-syscall(Fault *fault) override
+syscall() override
 {
 panic("%s not implemented.", __FUNCTION__);
 }
diff --git a/src/arch/arm/faults.cc b/src/arch/arm/faults.cc
index 5b865ec..56e1814 100644
--- a/src/arch/arm/faults.cc
+++ b/src/arch/arm/faults.cc
@@ -865,8 +865,7 @@

 // As of now, there isn't a 32 bit thumb version of this instruction.
 assert(!machInst.bigThumb);
-Fault fault;
-tc->syscall();
+tc->syscall();

 // Advance the PC since that won't happen automatically.
 PCState pc = tc->pcState();
diff --git a/src/arch/arm/freebsd/process.cc  
b/src/arch/arm/freebsd/process.cc

index d8a7d68..4bf6bcc 100644
--- a/src/arch/arm/freebsd/process.cc
+++ b/src/arch/arm/freebsd/process.cc
@@ -175,15 +175,15 @@
 }

 void
-ArmFreebsdProcess32::syscall(ThreadContext *tc, Fault *fault)
+ArmFreebsdProcess32::syscall(ThreadContext *tc)
 {
-ArmProcess32::syscall(tc, fault);
-syscallDescs32.get(tc->readIntReg(INTREG_R7))->doSyscall(tc, fault);
+ArmProcess32::syscall(tc);
+syscallDescs32.get(tc->readIntReg(INTREG_R7))->doSyscall(tc);
 }

 void
-ArmFreebsdProcess64::syscall(ThreadContext *tc, Fault *fault)
+ArmFreebsdProcess64::syscall(ThreadContext *tc)
 {
-ArmProcess64::syscall(tc, fault);
-syscallDescs64.get(tc->readIntReg(INTREG_X8))->doSyscall(tc, fault);
+ArmProcess64::syscall(tc);
+syscallDescs64.get(tc->readIntReg(INTREG_X8))->doSyscall(tc);
 }
diff --git a/src/arch/arm/freebsd/process.hh  
b/src/arch/arm/freebsd/process.hh

index d52512a..b64a3a0 100644
--- a/src/arch/arm/freebsd/process.hh
+++ b/src/arch/arm/freebsd/process.hh
@@ -82,7 +82,7 @@

 void initState() override;

-void syscall(ThreadContext *tc, Fault *fault) override;
+void syscall(ThreadContext *tc) override;

 /// A page to hold "kernel" provided functions. The name might be  
wrong.

 static const Addr commPage;
@@ -100,7 +100,7 @@
 ::Loader::Arch _arch);

 void initState() override;
-void syscall(ThreadContext *tc, Fault *fault) override;
+void syscall(ThreadContext *tc) override;

 struct SyscallABI : public ArmProcess64::SyscallABI,
 public ArmFreebsdProcessBits::SyscallABI
diff --git a/src/arch/arm/linux/process.cc b/src/arch/arm/linux/process.cc
index 65f1cd1..c190167 100644
--- a/src/arch/arm/linux/process.cc
+++ b/src/arch/arm/linux/process.cc
@@ -912,9 +912,9 @@
 }

 void
-ArmLinuxProcess32::syscall(ThreadContext *tc, Fault *fault)

[gem5-dev] Change in gem5/gem5[develop]: tests,arch-arm: Pass gem5_root as an arg in run.py

2020-09-01 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33955 )



Change subject: tests,arch-arm: Pass gem5_root as an arg in run.py
..

tests,arch-arm: Pass gem5_root as an arg in run.py

Previously `tests/gem5/fs/linux/arm/run.py` contained an ugly,
hard-coded `gem5_root` variable. In this commit we pass `gem5_root`
as an argument from `tests/gem5/fs/linux/arm/test.py`, utilizing
`config.base_dir`.

Change-Id: I2b1e3369b1078cce9375fadb7c39fa4292648658
---
M tests/gem5/fs/linux/arm/run.py
M tests/gem5/fs/linux/arm/test.py
2 files changed, 5 insertions(+), 3 deletions(-)



diff --git a/tests/gem5/fs/linux/arm/run.py b/tests/gem5/fs/linux/arm/run.py
index f0ba9bd..a0d782b 100644
--- a/tests/gem5/fs/linux/arm/run.py
+++ b/tests/gem5/fs/linux/arm/run.py
@@ -57,9 +57,9 @@

 config = sys.argv[1]
 os.environ['M5_PATH'] = sys.argv[2]
+gem5_root = sys.argv[3]

 # path setup
-gem5_root =  
joinpath(os.path.dirname(__file__), '..', '..', '..', '..', '..')

 sys.path.append(joinpath(gem5_root, 'configs'))
 tests_root = joinpath(gem5_root, 'tests')
 sys.path.append(joinpath(tests_root, 'gem5', 'configs'))
diff --git a/tests/gem5/fs/linux/arm/test.py  
b/tests/gem5/fs/linux/arm/test.py

index 337145d..3e77489 100644
--- a/tests/gem5/fs/linux/arm/test.py
+++ b/tests/gem5/fs/linux/arm/test.py
@@ -99,7 +99,8 @@
 for name in arm_fs_quick_tests:
 args = [
 joinpath(config.base_dir, 'tests', 'gem5', 'configs', name  
+ '.py'),

-path
+path,
+config.base_dir
 ]
 gem5_verify_config(
 name=name,
@@ -114,7 +115,8 @@
 for name in arm_fs_long_tests:
 args = [
 joinpath(config.base_dir, 'tests', 'gem5', 'configs', name  
+ '.py'),

-path
+path,
+config.base_dir
 ]
 gem5_verify_config(
 name=name,

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33955
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I2b1e3369b1078cce9375fadb7c39fa4292648658
Gerrit-Change-Number: 33955
Gerrit-PatchSet: 1
Gerrit-Owner: Bobby R. Bruce 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: mem,ext: Fixed DRAMSim2 Integration

2020-09-01 Thread Mahyar Samani (Gerrit) via gem5-dev
Mahyar Samani has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33938 )



Change subject: mem,ext: Fixed DRAMSim2 Integration
..

mem,ext: Fixed DRAMSim2 Integration

Fixed the way callbacks were used due to changes in
src/sim/callback.hh. Removed author line in SConsript.

Change-Id: I2c2b8dbe13e4f58680806126cd9cf209748e788a
---
M ext/dramsim2/SConscript
M src/mem/dramsim2.cc
2 files changed, 1 insertion(+), 2 deletions(-)



diff --git a/ext/dramsim2/SConscript b/ext/dramsim2/SConscript
index 869d220..b4355fa 100644
--- a/ext/dramsim2/SConscript
+++ b/ext/dramsim2/SConscript
@@ -35,7 +35,6 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
-# Authors: Andreas Hansson

 import os

diff --git a/src/mem/dramsim2.cc b/src/mem/dramsim2.cc
index aeafad0..553d2cc 100644
--- a/src/mem/dramsim2.cc
+++ b/src/mem/dramsim2.cc
@@ -68,7 +68,7 @@

 // Register a callback to compensate for the destructor not
 // being called. The callback prints the DRAMSim2 stats.
-registerExitCallback([]() { wrapper->printStats(); });
+registerExitCallback([this]() { wrapper->printStats(); });
 }

 void

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33938
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I2c2b8dbe13e4f58680806126cd9cf209748e788a
Gerrit-Change-Number: 33938
Gerrit-PatchSet: 1
Gerrit-Owner: Mahyar Samani 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: cpu: convert statistical_corrector to new style stats

2020-09-01 Thread Emily Brickey (Gerrit) via gem5-dev
Emily Brickey has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33936 )



Change subject: cpu: convert statistical_corrector to new style stats
..

cpu: convert statistical_corrector to new style stats

Change-Id: Id9e075fb45babeeafe65105679c8bf2135823d41
---
M src/cpu/pred/statistical_corrector.cc
M src/cpu/pred/statistical_corrector.hh
2 files changed, 17 insertions(+), 18 deletions(-)



diff --git a/src/cpu/pred/statistical_corrector.cc  
b/src/cpu/pred/statistical_corrector.cc

index 8ddae9b..8e1066a 100644
--- a/src/cpu/pred/statistical_corrector.cc
+++ b/src/cpu/pred/statistical_corrector.cc
@@ -65,7 +65,8 @@
 extraWeightsWidth(p->extraWeightsWidth),
 scCountersWidth(p->scCountersWidth),
 firstH(0),
-secondH(0)
+secondH(0),
+stats(this)
 {
 wb.resize(1 << logSizeUps, 4);

@@ -376,9 +377,9 @@
 StatisticalCorrector::updateStats(bool taken, BranchInfo *bi)
 {
 if (taken == bi->scPred) {
-scPredictorCorrect++;
+stats.correct++;
 } else {
-scPredictorWrong++;
+stats.wrong++;
 }
 }

@@ -396,16 +397,12 @@
 return 0;
 }

-void
-StatisticalCorrector::regStats()
+StatisticalCorrector::StatisticalCorrectorStats::
+StatisticalCorrectorStats(Stats::Group *parent)
+: Stats::Group(parent),
+  ADD_STAT(correct, "Number of time the SC predictor is the"
+  " provider and the prediction is correct"),
+  ADD_STAT(wrong, "Number of time the SC predictor is the"
+  " provider and the prediction is wrong")
 {
-scPredictorCorrect
-.name(name() + ".scPredictorCorrect")
-.desc("Number of time the SC predictor is the provider and "
-  "the prediction is correct");
-
-scPredictorWrong
-.name(name() + ".scPredictorWrong")
-.desc("Number of time the SC predictor is the provider and "
-  "the prediction is wrong");
 }
diff --git a/src/cpu/pred/statistical_corrector.hh  
b/src/cpu/pred/statistical_corrector.hh

index 2e8e502..b61f0d8 100644
--- a/src/cpu/pred/statistical_corrector.hh
+++ b/src/cpu/pred/statistical_corrector.hh
@@ -182,9 +182,12 @@
 int8_t firstH;
 int8_t secondH;

-// stats
-Stats::Scalar scPredictorCorrect;
-Stats::Scalar scPredictorWrong;
+struct StatisticalCorrectorStats : public Stats::Group {
+StatisticalCorrectorStats(Stats::Group *parent);
+Stats::Scalar correct;
+Stats::Scalar wrong;
+} stats;
+
   public:
 struct BranchInfo
 {
@@ -260,7 +263,6 @@
 int64_t phist) = 0;

 void init() override;
-void regStats() override;
 void updateStats(bool taken, BranchInfo *bi);

 virtual void condBranchUpdate(ThreadID tid, Addr branch_pc, bool taken,

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33936
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Id9e075fb45babeeafe65105679c8bf2135823d41
Gerrit-Change-Number: 33936
Gerrit-PatchSet: 1
Gerrit-Owner: Emily Brickey 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: test: Fix unittest cprintftime's build.

2020-09-01 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33897 )


Change subject: test: Fix unittest cprintftime's build.
..

test: Fix unittest cprintftime's build.

This test, which measures the performance of cprintf vs. sprintf, was
missing a couple of includes which were needed for the alarm() and
signal() functions, as well as the SIGALRM constant.

Also, it was using %#x to print the value of a pointer which gcc
complained about when compiling sprintf. This is fixed by changing that
format specifier to %p, the specifier to use when printing pointers.
Apparently either the implicit conversion to an integer value (which %#x
expects) or the size of the type it was converted to weren't good enough
for gcc any more.

Change-Id: I8eca3479bef2c2fa79f8ef4881bb3ff35d7c54ca
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33897
Reviewed-by: Nikos Nikoleris 
Reviewed-by: Daniel Carvalho 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/unittest/cprintftime.cc
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Nikos Nikoleris: Looks good to me, approved
  Daniel Carvalho: Looks good to me, approved
  Jason Lowe-Power: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/unittest/cprintftime.cc b/src/unittest/cprintftime.cc
index 4ad347d..f8f1492 100644
--- a/src/unittest/cprintftime.cc
+++ b/src/unittest/cprintftime.cc
@@ -26,6 +26,9 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */

+#include 
+
+#include 
 #include 
 #include 
 #include 
@@ -62,7 +65,7 @@
 while (!stop) {
 stringstream result;
 ccprintf(result,
- "this is a %s of %d iterations %3.2f %#x\n",
+ "this is a %s of %d iterations %3.2f %p\n",
  "test", iterations, 51.934, );

 iterations += 1;
@@ -75,7 +78,7 @@
 while (!stop) {
 char result[1024];
 sprintf(result,
- "this is a %s of %d iterations %3.2f %#x\n",
+ "this is a %s of %d iterations %3.2f %p\n",
  "test", iterations, 51.934, );

 iterations += 1;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33897
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I8eca3479bef2c2fa79f8ef4881bb3ff35d7c54ca
Gerrit-Change-Number: 33897
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: test: Remove refcnttest from the unittest SConscript.

2020-09-01 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33896 )


Change subject: test: Remove refcnttest from the unittest SConscript.
..

test: Remove refcnttest from the unittest SConscript.

The test itself was removed, but it was left in the SConscript. If you
tell scons to build everything in that directory, it will try to build
that test and fail.

Change-Id: I1e3923b0de12e891f53dab6f4e6e3e2b6975dc45
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33896
Reviewed-by: Nikos Nikoleris 
Reviewed-by: Daniel Carvalho 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/unittest/SConscript
1 file changed, 0 insertions(+), 1 deletion(-)

Approvals:
  Nikos Nikoleris: Looks good to me, approved
  Daniel Carvalho: Looks good to me, approved
  Jason Lowe-Power: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/unittest/SConscript b/src/unittest/SConscript
index 3922e9e..19b2542 100644
--- a/src/unittest/SConscript
+++ b/src/unittest/SConscript
@@ -32,7 +32,6 @@

 UnitTest('cprintftime', 'cprintftime.cc')
 UnitTest('nmtest', 'nmtest.cc')
-UnitTest('refcnttest', 'refcnttest.cc')

 stattest_py = PySource('m5', 'stattestmain.py', tags='stattest')
 UnitTest('stattest', 'stattest.cc', with_tag('stattest'), main=True)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33896
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I1e3923b0de12e891f53dab6f4e6e3e2b6975dc45
Gerrit-Change-Number: 33896
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: base: Make the Value stat's functor method accept lambdas.

2020-09-01 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/32901 )


Change subject: base: Make the Value stat's functor method accept lambdas.
..

base: Make the Value stat's functor method accept lambdas.

This class can already accept a proxy variable and a "functor" which is
a pointer to either a function or an instance of a class with the ()
operator overloaded.

This change adds a FunctorProxy partial specialization which accepts
anything that can be used to construct a std::function. The
constructor argument is copied and stored in the proxy which makes it
possible to define a lambda inline without having to keep a copy of it
around for the proxy to point to.

Also, the ValueBase stat's functor method now has a second version which
accepts a const reference rather than just a reference to its argument.
We need both because when accepting a reference to a lambda it needs to
be a const reference, but when accepting a pointer to a functor object,
we don't want it to be const because that would force the () operator to
also be const.

Change-Id: Icb1b3682d51b721f6e16614490ed0fe289cee094
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32901
Tested-by: kokoro 
Reviewed-by: Andreas Sandberg 
Maintainer: Andreas Sandberg 
---
M src/base/statistics.hh
M src/unittest/stattest.cc
2 files changed, 50 insertions(+), 13 deletions(-)

Approvals:
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/base/statistics.hh b/src/base/statistics.hh
index 96cd43f..c664540 100644
--- a/src/base/statistics.hh
+++ b/src/base/statistics.hh
@@ -791,7 +791,7 @@
 Result total() const { return *scalar; }
 };

-template 
+template 
 class FunctorProxy : public ProxyInfo
 {
   private:
@@ -805,6 +805,27 @@
 };

 /**
+ * Template specialization for type std::function which holds a  
copy
+ * of its target instead of a pointer to it. This makes it possible to use  
a

+ * lambda or other type inline without having to keep track of an instance
+ * somewhere else.
+ */
+template 
+class FunctorProxy,
+const T &>::value>::type> : public ProxyInfo
+{
+  private:
+std::function functor;
+
+  public:
+FunctorProxy(const T ) : functor(func) {}
+Counter value() const { return functor(); }
+Result result() const { return functor(); }
+Result total() const { return functor(); }
+};
+
+/**
  * A proxy similar to the FunctorProxy, but allows calling a method of a  
bound

  * object, instead of a global free-standing function.
  */
@@ -849,6 +870,15 @@

 template 
 Derived &
+functor(const T )
+{
+proxy = new FunctorProxy(func);
+this->setInit();
+return this->self();
+}
+
+template 
+Derived &
 functor(T )
 {
 proxy = new FunctorProxy(func);
diff --git a/src/unittest/stattest.cc b/src/unittest/stattest.cc
index 883185a..4030735 100644
--- a/src/unittest/stattest.cc
+++ b/src/unittest/stattest.cc
@@ -88,6 +88,7 @@
 Vector2d s16;
 Value s17;
 Value s18;
+Value s19;
 Histogram h01;
 Histogram h02;
 Histogram h03;
@@ -102,8 +103,8 @@
 Histogram h12;
 SparseHistogram sh1;

-Vector s19;
 Vector s20;
+Vector s21;

 Formula f1;
 Formula f2;
@@ -254,6 +255,12 @@
 .desc("this is stat 18")
 ;

+s19
+.functor([]() { return 0; })
+.name("Stat19")
+.desc("this is stat 19")
+;
+
 h01
 .init(11)
 .name("Histogram01")
@@ -361,18 +368,18 @@
 .desc("this is formula 4")
 ;

-s19
-.init(2)
-.name("Stat19")
-.desc("this is statistic 19 for vector op testing")
-.flags(total | nozero | nonan)
-;
 s20
 .init(2)
 .name("Stat20")
 .desc("this is statistic 20 for vector op testing")
 .flags(total | nozero | nonan)
 ;
+s21
+.init(2)
+.name("Stat21")
+.desc("this is statistic 21 for vector op testing")
+.flags(total | nozero | nonan)
+;

 f6
 .name("vector_op_test_formula")
@@ -386,7 +393,7 @@
 f4 += constant(10.0);
 f4 += s5[3];
 f5 = constant(1);
-f6 = s19/s20;
+f6 = s20/s21;
 }

 void
@@ -663,10 +670,10 @@
 sh1.sample(random() % 1);
 }

-s19[0] = 1;
-s19[1] = 10;
-s20[0] = 10;
-s20[1] = 1;
+s20[0] = 1;
+s20[1] = 10;
+s21[0] = 10;
+s21[1] = 1;

 }


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32901
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Icb1b3682d51b721f6e16614490ed0fe289cee094
Gerrit-Change-Number: 32901
Gerrit-PatchSet: 4
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas 

[gem5-dev] Change in gem5/gem5[develop]: scons: Make scons aware of changes to cxx_type in param types.

2020-09-01 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33695 )


Change subject: scons: Make scons aware of changes to cxx_type in param  
types.

..

scons: Make scons aware of changes to cxx_type in param types.

If the cxx_type value changes, then the way the parameter is declared
in the param struct will also change, and the header needs to be
updated. scons would miss this sort of change before because it was only
checking the module the SimObject's source came from. The python names
and types of the parameters could stay the same, but the C++
representation might have changed because of edits somewhere else.

This CL assumes that cxx_type is the only thing that will change and
transparently affect the params struct. I tried making scons sensitive
to the entire ptype which would capture other parameters, but that
didn't work for some reason. This should be pretty safe in general, but
not 100% safe

Issue-on: https://gem5.atlassian.net/browse/GEM5-753
Change-Id: I06774889e60b987f727799f55d7ea2a775b6a319
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33695
Reviewed-by: Daniel Carvalho 
Reviewed-by: Nikos Nikoleris 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M src/SConscript
1 file changed, 8 insertions(+), 0 deletions(-)

Approvals:
  Nikos Nikoleris: Looks good to me, approved
  Daniel Carvalho: Looks good to me, but someone else must approve
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/SConscript b/src/SConscript
index 66db2f7..d9cde28 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -922,9 +922,17 @@
 # Generate all of the SimObject param C++ struct header files
 params_hh_files = []
 for name,simobj in sorted(sim_objects.items()):
+# If this simobject's source changes, we need to regenerate the header.
 py_source = PySource.modules[simobj.__module__]
 extra_deps = [ py_source.tnode ]

+# Get the params for just this SimObject, excluding base classes.
+params = simobj._params.local.values()
+# Extract the parameters' c++ types.
+types = sorted(map(lambda p: p.ptype.cxx_type, params))
+# If any of these types have changed, we need to regenerate the header.
+extra_deps.append(Value(types))
+
 hh_file = File('params/%s.hh' % name)
 params_hh_files.append(hh_file)
 env.Command(hh_file, Value(name),

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33695
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I06774889e60b987f727799f55d7ea2a775b6a319
Gerrit-Change-Number: 33695
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-Reviewer: kokoro 
Gerrit-Reviewer: mike upton 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Scons minimum version breaks GCN-gpu dockerfile build

2020-09-01 Thread Daniel Gerzhoy via gem5-dev
Hey all,

Pulled latest updates and the minimum version requirement for scons breaks
the GCN-gpu dockerfile.

My fix involved installing the latest scons via pip (after installing pip)
but there is probably a better way to do it (apt-get) but it looks like the
Ubuntu16.04 base for the DockerFile automatically points to 2.4 not 3.0 and
I haven't figured out how to get it to install 3.0 instead yet.

I can open up a Jira ticket as well if that's desirable. (Also if I should
have just done that instead of sending this email please let me know, still
learning protocol).

Thanks,

Dan
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Re: ARM build failures

2020-09-01 Thread Andreas Sandberg via gem5-dev

+ Ciro, Richard

Hi Everyone,

Thanks for pointing this out and submitting a fix.

Richard/Ciro/Giacomo: Could one of you review this so we can merge the fix?

Thanks,
Andreas

On 31/08/2020 05:41, Bobby Bruce wrote:
Hey Gabe,

Iru Cai made a fix for this a week or so ago: 
https://gem5-review.googlesource.com/c/public/gem5/+/33154. Not sure if this 
addresses all concerns, but their change is mostly basic reduction due to `imm` 
and `ecount` being unsigned. I also find if you take on board these 
observations, there's at least one unreachable branch, and one condition that's 
always true (see my comments in the Gerrit PatchSet).

Kind regards,
Bobby
--
Dr. Bobby R. Bruce
Room 2235,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net


On Sun, Aug 30, 2020 at 3:52 AM Gabe Black via gem5-dev 
mailto:gem5-dev@gem5.org>> wrote:
Hi folks. I'm seeing a few build failures for ARM with gcc version 10.2. Since 
these look like they may be real bugs and I don't want to make a mess fixing 
them or do a bunch of research, I'll mention them here so we can collectively 
find the right fix. There are a lot of instances of these two:

build/ARM/arch/arm/generated/exec-ns.cc.inc:278501:40: error: comparison of 
unsigned express
ion in '>= 0' is always true [-Werror=type-limits]
278501 | bool posCount = ((count * imm) >= 0);


build/ARM/arch/arm/generated/exec-ns.cc.inc:278970:40: error: comparison of 
unsigned express
ion in '< 0' is always false [-Werror=type-limits]
278970 | bool negCount = ((count * imm) < 0);

I'm not sure what's going on with these. Maybe applying the same template with 
both signed and unsigned imm and count fields? As far as I can tell with a 
little digging around, imm is usually unsigned. I'm not sure where count comes 
from, but I'm guessing also unsigned?

build/ARM/arch/arm/generated/exec-ns.cc.inc:169243:29: error: 
'destReg.ArmISAInst::VqdmulhsQ
<_Element>::execute::RegVect::regs[0]' may be used uninitialized 
in this functi
on [-Werror=maybe-uninitialized]
169243 | FpDestP0 = letoh(destReg.regs[0]);

I haven't looked into these at all.

build/ARM/arch/arm/generated/exec-ns.cc.inc:169491:17: error: comparison of 
unsigned express
ion in '< 0' is always false [-Werror=type-limits]
169491 | if (imm < 0 && imm >= eCount) {

This one looks really fishy. How would imm be both less than 0 and also greater 
than eCount? Is eCount negative? Is it ok for it to be just a little negative? 
Is this supposed to be an ||? Apparently imm is unsigned anyway, so comparing 
it with 0 is pointless.

Gabe
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to 
gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s


IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Re: Scons minimum version breaks GCN-gpu dockerfile build

2020-09-01 Thread Jason Lowe-Power via gem5-dev
Hi Dan,

:facepalm: At least this is on develop and not the stable branch!

I think we need to get input from Kyle on this since he developed that
docker image. TBH, I think pip isn't a bad solution given that 16.04 is
more than four years old and we're stuck with that to support the older
version of the ROCM stack.

Creating a jira issue would be appreciated. Please tag Kyle in it, if you
do that.

Cheers,
Jason

On Tue, Sep 1, 2020 at 11:19 AM Daniel Gerzhoy via gem5-dev <
gem5-dev@gem5.org> wrote:

> Hey all,
>
> Pulled latest updates and the minimum version requirement for scons breaks
> the GCN-gpu dockerfile.
>
> My fix involved installing the latest scons via pip (after installing pip)
> but there is probably a better way to do it (apt-get) but it looks like the
> Ubuntu16.04 base for the DockerFile automatically points to 2.4 not 3.0 and
> I haven't figured out how to get it to install 3.0 instead yet.
>
> I can open up a Jira ticket as well if that's desirable. (Also if I should
> have just done that instead of sending this email please let me know, still
> learning protocol).
>
> Thanks,
>
> Dan
> ___
> gem5-dev mailing list -- gem5-dev@gem5.org
> To unsubscribe send an email to gem5-dev-le...@gem5.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] MessageBuffer double counting delay between arrival and dequeue ticks?

2020-09-01 Thread Gambord, Ryan via gem5-dev
I noticed that MessageBuffer calls UpdateDelayedTicks in both enqueue and
dequeue methods. Since dequeue does not setLastEnqueueTime of the message
to the time it was dequeued at, when enqueue calls UpdateDelayed Ticks,
doesn't it add the dequeue delay to the delayed ticks a second time?

Below is a table of the timeline. X and Y are the starting values for
LastEnqueueTime and DelayedTicks when the first message buffer receives the
message. When the message is dequeued from MB1, DelayedTicks gets C-B added
to it. When it is then enqueued in MB2, it gets D-B added, which double
counts the C-B interval.

curTime() FunctionCall m_LastEnqueueTime m_DelayedTicks


X Y
A enqueue() B = A + Delta Y + (A-X)
B wakeup() " "
C dequeue() " Y + (A-X) + (C-B)
D enqueue() E = D + Delta
Y + (A-X) + (C-B) + (D-B) = Y + (A-X) + (C-B) + (D-C) + (C-B)


Ryan Gambord

___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: arch-gcn3: Added missing header to hsa_driver.cc

2020-09-01 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33816 )


Change subject: arch-gcn3: Added missing header to hsa_driver.cc
..

arch-gcn3: Added missing header to hsa_driver.cc

`TypedBufferArg`, used in `src/dev/hsa/hsa_driver.cc` is defined in
`src/sim/syscall_emul_buf.hh` yet was not included. This commit adds
this missing header.

Change-Id: I3239a097eb71b6ebdad045eab6525a888a970f08
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33816
Reviewed-by: Matt Sinclair 
Maintainer: Matt Sinclair 
Tested-by: kokoro 
---
M src/dev/hsa/hsa_driver.cc
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Matt Sinclair: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/dev/hsa/hsa_driver.cc b/src/dev/hsa/hsa_driver.cc
index 3b27149..b165af4 100644
--- a/src/dev/hsa/hsa_driver.cc
+++ b/src/dev/hsa/hsa_driver.cc
@@ -43,6 +43,7 @@
 #include "params/HSADriver.hh"
 #include "sim/process.hh"
 #include "sim/proxy_ptr.hh"
+#include "sim/syscall_emul_buf.hh"

 HSADriver::HSADriver(HSADriverParams *p)
 : EmulatedDriver(p), device(p->device), queueId(0)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33816
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I3239a097eb71b6ebdad045eab6525a888a970f08
Gerrit-Change-Number: 33816
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Alexandru Duțu 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Matt Sinclair 
Gerrit-Reviewer: Matthew Poremba 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Anthony Gutierrez 
Gerrit-CC: Bradford Beckmann 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: cpu: convert loop_predictor to new style stats

2020-09-01 Thread Emily Brickey (Gerrit) via gem5-dev
Emily Brickey has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33935 )



Change subject: cpu: convert loop_predictor to new style stats
..

cpu: convert loop_predictor to new style stats

Change-Id: Ib0383fc6d5f884fd6c020bcd938eee2f802ad412
---
M src/cpu/pred/loop_predictor.cc
M src/cpu/pred/loop_predictor.hh
2 files changed, 15 insertions(+), 22 deletions(-)



diff --git a/src/cpu/pred/loop_predictor.cc b/src/cpu/pred/loop_predictor.cc
index 4b23fd1..5dad797 100644
--- a/src/cpu/pred/loop_predictor.cc
+++ b/src/cpu/pred/loop_predictor.cc
@@ -57,7 +57,8 @@
 restrictAllocation(p->restrictAllocation),
 initialLoopIter(p->initialLoopIter),
 initialLoopAge(p->initialLoopAge),
-optionalAgeReset(p->optionalAgeReset)
+optionalAgeReset(p->optionalAgeReset),
+stats(this)
 {
 assert(initialLoopAge <= ((1 << loopTableAgeBits) - 1));
 }
@@ -314,9 +315,9 @@
 LoopPredictor::updateStats(bool taken, BranchInfo* bi)
 {
 if (taken == bi->loopPred) {
-loopPredictorCorrect++;
+stats.correct++;
 } else {
-loopPredictorWrong++;
+stats.wrong++;
 }
 }

@@ -344,18 +345,13 @@
 loopUpdate(branch_pc, taken, bi, tage_pred);
 }

-void
-LoopPredictor::regStats()
+LoopPredictor::LoopPredictorStats::LoopPredictorStats(Stats::Group *parent)
+: Stats::Group(parent),
+  ADD_STAT(correct, "Number of times the loop predictor is"
+  " the provider and the prediction is correct"),
+  ADD_STAT(wrong, "Number of times the loop predictor is the"
+  " provider and the prediction is wrong")
 {
-loopPredictorCorrect
-.name(name() + ".loopPredictorCorrect")
-.desc("Number of times the loop predictor is the provider and "
-  "the prediction is correct");
-
-loopPredictorWrong
-.name(name() + ".loopPredictorWrong")
-.desc("Number of times the loop predictor is the provider and "
-  "the prediction is wrong");
 }

 size_t
diff --git a/src/cpu/pred/loop_predictor.hh b/src/cpu/pred/loop_predictor.hh
index e6af53d..b26bc71 100644
--- a/src/cpu/pred/loop_predictor.hh
+++ b/src/cpu/pred/loop_predictor.hh
@@ -83,9 +83,11 @@
 const unsigned initialLoopAge;
 const bool optionalAgeReset;

-// stats
-Stats::Scalar loopPredictorCorrect;
-Stats::Scalar loopPredictorWrong;
+struct LoopPredictorStats : public Stats::Group {
+LoopPredictorStats(Stats::Group *parent);
+Stats::Scalar correct;
+Stats::Scalar wrong;
+} stats;

 /**
  * Updates an unsigned counter based on up/down parameter
@@ -250,11 +252,6 @@
  */
 void init() override;

-/**
- * Register stats for this object
- */
-void regStats() override;
-
 LoopPredictor(LoopPredictorParams *p);

 size_t getSizeInBits() const;

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33935
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ib0383fc6d5f884fd6c020bcd938eee2f802ad412
Gerrit-Change-Number: 33935
Gerrit-PatchSet: 1
Gerrit-Owner: Emily Brickey 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s