[gem5-dev] Re: simple simulator performance check?

2020-10-10 Thread Gabe Black via gem5-dev
I'm planning to give this a shot, but is there a simple command line for
this? It would take a lot of time to set up a system and all that, and it
would be much nicer to just fire off, for instance, a linux boot test if we
already have something lying around.

Gabe

On Wed, Oct 7, 2020 at 10:41 AM Jason Lowe-Power 
wrote:

> I think Linux boot is pretty reasonable. Or, Linux boot + some
> multithreaded tests (parsec is available for x86 in gem5-resources). If
> there isn't much performance impact there, I think that would be strong
> evidence for little performance impact, generally.
>
> Cheers,
> Jason
>
> On Mon, Oct 5, 2020 at 3:07 AM Gabe Black via gem5-dev 
> wrote:
>
>> Hey folks. I'm trying out using dynamically allocated arrays to track
>> source and destination register indices in static and dynamic instructions
>> rather than fixed size arrays and would like to check what the impact on
>> performance is. I used to use the twolf SPEC benchmark for that since it
>> was fairly quick and easy to run but still ran long enough to get
>> meaningful results, but do we have something like that now that's maybe
>> even easier to set up? Or is easier for other people to run?
>>
>> As far as the arrays, what I'm aiming at is to make it unnecessary to
>> measure the max number of indices needed and hence the minimum size of
>> those arrays since that centralized global value needs to reflect every
>> instruction in gem5, and it would be a bit of a pain to coordinate that
>> with multiple ISAs. Allocating those arrays statically as part of the
>> StaticInst or DynInst classes makes allocation cheaper since it just makes
>> the classes a little bigger, and making them dynamic will inevitably
>> involve secondary allocations to give the vectors (for instance) their
>> backing store. I'm hopeful it won't be that bad though, since StaticInsts
>> are usually reused from a cache and not reallocated, and dynamic
>> instructions are used in CPUs which already have lots of other, more
>> substantial overhead.
>>
>> 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
>
>
___
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] Jenkins build is back to normal : Nightly #93

2020-10-10 Thread jenkins-no-reply--- via gem5-dev
See 
___
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-o3: Organize circular queues and iterators in LSQUnit

2020-10-10 Thread Daniel Carvalho (Gerrit) via gem5-dev
Daniel Carvalho has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/35796 )



Change subject: cpu-o3: Organize circular queues and iterators in LSQUnit
..

cpu-o3: Organize circular queues and iterators in LSQUnit

There were many aliases to circular queues and iterators. In
addition, some iterators had misleading names.

Change-Id: Idf419a4750a0e802087a456501ecb74b29ae8024
Signed-off-by: Daniel R. Carvalho 
---
M src/cpu/o3/lsq_unit.hh
M src/cpu/o3/lsq_unit_impl.hh
2 files changed, 35 insertions(+), 39 deletions(-)



diff --git a/src/cpu/o3/lsq_unit.hh b/src/cpu/o3/lsq_unit.hh
index 3d6e3f0..9cf58db 100644
--- a/src/cpu/o3/lsq_unit.hh
+++ b/src/cpu/o3/lsq_unit.hh
@@ -51,6 +51,7 @@
 #include "arch/generic/debugfaults.hh"
 #include "arch/generic/vec_reg.hh"
 #include "arch/locked_mem.hh"
+#include "base/circular_queue.hh"
 #include "config/the_isa.hh"
 #include "cpu/inst_seq.hh"
 #include "cpu/timebuf.hh"
@@ -60,7 +61,6 @@
 #include "mem/port.hh"

 struct DerivO3CPUParams;
-#include "base/circular_queue.hh"

 /**
  * Class that implements the actual LQ and SQ for each specific
@@ -217,8 +217,9 @@
   public:
 using LoadQueue = CircularQueue;
 using StoreQueue = CircularQueue;
+using LQIterator = typename LoadQueue::iterator;
+using SQIterator = typename StoreQueue::iterator;

-  public:
 /** Constructs an LSQ unit. init() must be called prior to use. */
 LSQUnit(uint32_t lqEntries, uint32_t sqEntries);

@@ -257,11 +258,11 @@
 /** Check for ordering violations in the LSQ. For a store squash if we
  * ever find a conflicting load. For a load, only squash if we
  * an external snoop invalidate has been seen for that load address
- * @param load_idx index to start checking at
+ *
+ * @param load_it Iterator to start checking at
  * @param inst the instruction to check
  */
-Fault checkViolations(typename LoadQueue::iterator& loadIt,
-const DynInstPtr& inst);
+Fault checkViolations(LQIterator& load_it, const DynInstPtr& inst);

 /** Check if an incoming invalidate hits in the lsq on a load
  * that might have issued out of order wrt another load beacuse
@@ -381,8 +382,8 @@
 /** Try to finish a previously blocked write back attempt */
 void writebackBlockedStore();

-/** Completes the store at the specified index. */
-void completeStore(typename StoreQueue::iterator store_idx);
+/** Completes the store at the specified iterator. */
+void completeStore(SQIterator store_it);

 /** Handles completing the send of a store to memory. */
 void storePostSend();
@@ -421,11 +422,11 @@
 {
 using LSQSenderState::alive;
   public:
-LQSenderState(typename LoadQueue::iterator idx_)
-: LSQSenderState(idx_->request(), true), idx(idx_) { }
+LQSenderState(LQIterator iterator)
+: LSQSenderState(iterator->request(), true), it(iterator) { }

-/** The LQ index of the instruction. */
-typename LoadQueue::iterator idx;
+/** The LQ iterator of the instruction. */
+LQIterator it;
 //virtual LSQRequest* request() { return idx->request(); }
 virtual void
 complete()
@@ -440,10 +441,10 @@
 {
 using LSQSenderState::alive;
   public:
-SQSenderState(typename StoreQueue::iterator idx_)
-: LSQSenderState(idx_->request(), false), idx(idx_) { }
-/** The SQ index of the instruction. */
-typename StoreQueue::iterator idx;
+SQSenderState(SQIterator iterator)
+: LSQSenderState(iterator->request(), false), it(iterator) { }
+/** The SQ iterator of the instruction. */
+SQIterator it;
 //virtual LSQRequest* request() { return idx->request(); }
 virtual void
 complete()
@@ -490,9 +491,10 @@
   private:
 /** The LSQUnit thread id. */
 ThreadID lsqID;
+
   public:
 /** The store queue. */
-CircularQueue storeQueue;
+StoreQueue storeQueue;

 /** The load queue. */
 LoadQueue loadQueue;
@@ -520,10 +522,10 @@
 // sanity checks and debugging
 uint64_t lastRetiredHtmUid;

-/** The index of the first instruction that may be ready to be
+/** The iterator to the first instruction that may be ready to be
  * written back, and has not yet been written back.
  */
-typename StoreQueue::iterator storeWBIt;
+SQIterator storeWBIt;

 /** Address Mask for a cache block (e.g. ~(cache_block_size-1)) */
 Addr cacheBlockMask;
@@ -624,11 +626,6 @@

 /** Returns whether or not the LSQ unit is stalled. */
 bool isStalled()  { return stalled; }
-  public:
-typedef typename CircularQueue::iterator LQIterator;
-typedef typename CircularQueue::iterator SQIterator;
-typedef CircularQueue LQueue;
-typedef CircularQueue SQueue;
 };

 template 
diff --git 

[gem5-dev] Change in gem5/gem5[develop]: util: Add a copyright to gem5img.py.

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



Change subject: util: Add a copyright to gem5img.py.
..

util: Add a copyright to gem5img.py.

This script was ported to python from a bash script by me back in 2011.
The original file didn't have a copyright, but since I made significant
modifications to it (porting it to python, improving its features), at
least those modifications should have become copyright Google.

Change-Id: Ia70bb1e6be5b188537bcf6899ba5884b359dbe18
---
M util/gem5img.py
1 file changed, 26 insertions(+), 0 deletions(-)



diff --git a/util/gem5img.py b/util/gem5img.py
index 51a5487..7e9e544 100755
--- a/util/gem5img.py
+++ b/util/gem5img.py
@@ -1,5 +1,31 @@
 #!/usr/bin/python2.7
 #
+# 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.
+
+#
 # gem5img.py
 # Script for managing a gem5 disk image.
 #

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/35875
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: Ia70bb1e6be5b188537bcf6899ba5884b359dbe18
Gerrit-Change-Number: 35875
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]: fastmodel: Update to c++14, and add some missing consts.

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



Change subject: fastmodel: Update to c++14, and add some missing consts.
..

fastmodel: Update to c++14, and add some missing consts.

During the review for the CortexR52 model, a comment pointed out where
two consts can be added. Also we switched gem5 over to c++14, but the
project files for these other wrappers were still set to c++11.

Change-Id: I5fecdc896b0290deadcd0f55ea1dfe3806a98177
---
M src/arch/arm/fastmodel/CortexA76/cortex_a76.hh
M src/arch/arm/fastmodel/CortexA76/x1/x1.sgproj
M src/arch/arm/fastmodel/CortexA76/x2/x2.sgproj
M src/arch/arm/fastmodel/CortexA76/x3/x3.sgproj
M src/arch/arm/fastmodel/CortexA76/x4/x4.sgproj
M src/arch/arm/fastmodel/GIC/GIC.sgproj
6 files changed, 7 insertions(+), 7 deletions(-)



diff --git a/src/arch/arm/fastmodel/CortexA76/cortex_a76.hh  
b/src/arch/arm/fastmodel/CortexA76/cortex_a76.hh

index acbae89..6088b0a 100644
--- a/src/arch/arm/fastmodel/CortexA76/cortex_a76.hh
+++ b/src/arch/arm/fastmodel/CortexA76/cortex_a76.hh
@@ -107,8 +107,8 @@
 scx::scx_set_parameter(evs->name() + std::string(".") + n, val);
 }

-CortexA76 *getCore(int num) { return cores.at(num); }
-sc_core::sc_module *getEvs() { return evs; }
+CortexA76 *getCore(int num) const { return cores.at(num); }
+sc_core::sc_module *getEvs() const { return evs; }

 CortexA76Cluster(Params );
 const Params () { return _params; }
diff --git a/src/arch/arm/fastmodel/CortexA76/x1/x1.sgproj  
b/src/arch/arm/fastmodel/CortexA76/x1/x1.sgproj

index 214653f..ff83968 100644
--- a/src/arch/arm/fastmodel/CortexA76/x1/x1.sgproj
+++ b/src/arch/arm/fastmodel/CortexA76/x1/x1.sgproj
@@ -5,7 +5,7 @@
 ACTIVE_CONFIG_WINDOWS  = "Win64-Release-VC2015";
 config "gcc"
 {
-ADDITIONAL_COMPILER_SETTINGS = "-O3 -Wall -std=c++11 -Wno-deprecated  
-Wno-unused-function";
+ADDITIONAL_COMPILER_SETTINGS = "-O3 -Wall -std=c++14 -Wno-deprecated  
-Wno-unused-function";

 ADDITIONAL_LINKER_SETTINGS = "-Wl,--no-undefined";
 BUILD_DIR = "./gcc";
 COMPILER = "gcc-6.4";
diff --git a/src/arch/arm/fastmodel/CortexA76/x2/x2.sgproj  
b/src/arch/arm/fastmodel/CortexA76/x2/x2.sgproj

index 92eeb4d..8ecb76f 100644
--- a/src/arch/arm/fastmodel/CortexA76/x2/x2.sgproj
+++ b/src/arch/arm/fastmodel/CortexA76/x2/x2.sgproj
@@ -5,7 +5,7 @@
 ACTIVE_CONFIG_WINDOWS  = "Win64-Release-VC2015";
 config "gcc"
 {
-ADDITIONAL_COMPILER_SETTINGS = "-march=core2 -O3 -Wall -std=c++11  
-Wno-deprecated -Wno-unused-function";
+ADDITIONAL_COMPILER_SETTINGS = "-march=core2 -O3 -Wall -std=c++14  
-Wno-deprecated -Wno-unused-function";

 ADDITIONAL_LINKER_SETTINGS = "-Wl,--no-undefined";
 BUILD_DIR = "./gcc";
 COMPILER = "gcc-6.4";
diff --git a/src/arch/arm/fastmodel/CortexA76/x3/x3.sgproj  
b/src/arch/arm/fastmodel/CortexA76/x3/x3.sgproj

index e661c4f..36cfec7 100644
--- a/src/arch/arm/fastmodel/CortexA76/x3/x3.sgproj
+++ b/src/arch/arm/fastmodel/CortexA76/x3/x3.sgproj
@@ -5,7 +5,7 @@
 ACTIVE_CONFIG_WINDOWS  = "Win64-Release-VC2015";
 config "gcc"
 {
-ADDITIONAL_COMPILER_SETTINGS = "-march=core2 -O3 -Wall -std=c++11  
-Wno-deprecated -Wno-unused-function";
+ADDITIONAL_COMPILER_SETTINGS = "-march=core2 -O3 -Wall -std=c++14  
-Wno-deprecated -Wno-unused-function";

 ADDITIONAL_LINKER_SETTINGS = "-Wl,--no-undefined";
 BUILD_DIR = "./gcc";
 COMPILER = "gcc-6.4";
diff --git a/src/arch/arm/fastmodel/CortexA76/x4/x4.sgproj  
b/src/arch/arm/fastmodel/CortexA76/x4/x4.sgproj

index 5b7f315..291256b 100644
--- a/src/arch/arm/fastmodel/CortexA76/x4/x4.sgproj
+++ b/src/arch/arm/fastmodel/CortexA76/x4/x4.sgproj
@@ -5,7 +5,7 @@
 ACTIVE_CONFIG_WINDOWS  = "Win64-Release-VC2015";
 config "gcc"
 {
-ADDITIONAL_COMPILER_SETTINGS = "-march=core2 -O3 -Wall -std=c++11  
-Wno-deprecated -Wno-unused-function";
+ADDITIONAL_COMPILER_SETTINGS = "-march=core2 -O3 -Wall -std=c++14  
-Wno-deprecated -Wno-unused-function";

 ADDITIONAL_LINKER_SETTINGS = "-Wl,--no-undefined";
 BUILD_DIR = "./gcc";
 COMPILER = "gcc-6.4";
diff --git a/src/arch/arm/fastmodel/GIC/GIC.sgproj  
b/src/arch/arm/fastmodel/GIC/GIC.sgproj

index c016705..c835356 100644
--- a/src/arch/arm/fastmodel/GIC/GIC.sgproj
+++ b/src/arch/arm/fastmodel/GIC/GIC.sgproj
@@ -5,7 +5,7 @@
 ACTIVE_CONFIG_WINDOWS  = "Win64-Release-VC2015";
 config "gcc"
 {
-ADDITIONAL_COMPILER_SETTINGS = "-O3 -Wall -std=c++11 -Wno-deprecated  
-Wno-unused-function -I../../../../../";
+ADDITIONAL_COMPILER_SETTINGS = "-O3 -Wall -std=c++14 -Wno-deprecated  
-Wno-unused-function -I../../../../../";

 ADDITIONAL_LINKER_SETTINGS = "-Wl,--no-undefined";
 BUILD_DIR = "./gcc";
 COMPILER = "gcc-6.4";

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