[gem5-dev] Change in gem5/gem5[develop]: scons: Introduce a version of reverseBits for 8 bit types.

2021-02-17 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/41593 )



Change subject: scons: Introduce a version of reverseBits for 8 bit types.
..

scons: Introduce a version of reverseBits for 8 bit types.

These types shouldn't be shifted by 8, since shifting a type by its
width is technically undefined behavior. We never actually use the
result from this shift, but it still upsets certain versions of clang.

Change-Id: I425431473fa44a6e0de2edf780c265ff4e3f440e
---
M src/base/bitfield.hh
1 file changed, 9 insertions(+), 1 deletion(-)



diff --git a/src/base/bitfield.hh b/src/base/bitfield.hh
index 1ec684f..470941a 100644
--- a/src/base/bitfield.hh
+++ b/src/base/bitfield.hh
@@ -209,7 +209,7 @@
  * @ingroup api_bitfield
  */
 template 
-std::enable_if_t::value, T>
+std::enable_if_t::value && sizeof(T) != 1, T>
 reverseBits(T val, size_t size=sizeof(T))
 {
 assert(size <= sizeof(T));
@@ -223,6 +223,14 @@
 return output;
 }

+template 
+std::enable_if_t::value && sizeof(T) == 1, T>
+reverseBits(T val, size_t size=sizeof(T))
+{
+assert(size == 1);
+return reverseBitsLookUpTable[val];
+}
+
 /**
  * Returns the bit position of the MSB that is set in the input
  *

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41593
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: I425431473fa44a6e0de2edf780c265ff4e3f440e
Gerrit-Change-Number: 41593
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] minor bug in bitfield.hh

2021-02-17 Thread Gabe Black via gem5-dev
Hey folks. I just found out that certain versions of clang get upset with
the new version of reverseBits I just checked in when reversing the bits in
an 8 bit data type. It doesn't like shifting an 8 bit value by 8, since
that's technically undefined behavior, even though we'll never use the
resulting value. I have a fix which I'll upload shortly, but if anybody
runs into that, a fix is on the way.

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] Change in gem5/gem5[develop]: scons: Enable LTO for opt, perf and prof builds.

2021-02-17 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/40815 )


Change subject: scons: Enable LTO for opt, perf and prof builds.
..

scons: Enable LTO for opt, perf and prof builds.

The name of the build is opt, so it should be fully optomized. Also, the
fast build, the only one with LTO historically, is dangerous to use
since it disables many error checks. I personally run gem5 many times
while developing, iterating and trying to fix bugs, and so want it to
run quickly then too, not just the final time when collecting results.

Also, since they mirror the opt build, the perf and prof builds also
have LTO options added.

This has the nice side effect of speeding up the build time of build/X86
significantly (6:20 -> 4:27) due to parallelization of the link, and
reduces the size of the build/X86 directory (with debug compression
enabled) from 3.4GB to 2.8GB.

The size of build/X86/python/_m5 is still 1.6GB, so still more than half
of the total size of build/X86.

Change-Id: I8feabf99454693fdd100d9e1a64fdeae53362f75
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40815
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
Reviewed-by: Earl Ou 
---
M SConstruct
M src/SConscript
2 files changed, 3 insertions(+), 7 deletions(-)

Approvals:
  Earl Ou: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/SConstruct b/SConstruct
index e9dfae5..e1814c3 100755
--- a/SConstruct
+++ b/SConstruct
@@ -358,8 +358,7 @@
 main['GCC_VERSION'] = gcc_version

 # Add the appropriate Link-Time Optimization (LTO) flags
-# unless LTO is explicitly turned off. Note that these flags
-# are only used by the fast target.
+# unless LTO is explicitly turned off.
 if not GetOption('no_lto'):
 # Pass the LTO flag when compiling to produce GIMPLE
 # output, we merely create the flags here and only append
diff --git a/src/SConscript b/src/SConscript
index aeb7038..5fe0ab2 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -1341,11 +1341,8 @@
 # the optimization to the ldflags as LTO defers the optimization
 # to link time
 for target in ['opt', 'fast', 'prof', 'perf']:
-ccflags[target] += ['-O3']
-ldflags[target] += ['-O3']
-
-ccflags['fast'] += env['LTO_CCFLAGS']
-ldflags['fast'] += env['LTO_LDFLAGS']
+ccflags[target] += ['-O3'] + env['LTO_CCFLAGS']
+ldflags[target] += ['-O3'] + env['LTO_LDFLAGS']
 elif env['CLANG']:
 ccflags['debug'] += ['-g', '-O0']
 # opt, fast, prof and perf all share the same cc flags

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/40815
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: I8feabf99454693fdd100d9e1a64fdeae53362f75
Gerrit-Change-Number: 40815
Gerrit-PatchSet: 10
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Earl Ou 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Andreas Sandberg 
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]: gpu-compute: Fix accidental execution when stopped at barrier

2021-02-17 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/41573 )



Change subject: gpu-compute: Fix accidental execution when stopped at  
barrier

..

gpu-compute: Fix accidental execution when stopped at barrier

Due the compute unit pipeline being executed in reverse order, there
exists a scenario where a compute unit will execute an extra
instruction when it's supposed to be stopped at a barrier. It occurs
as follows:

* The ScheduleStage sets a barrier instruction ready to execute.

* The ScoreboardCheckStage adds another instruction to the readyList.
This is where the barrier is checked, but because the barrier isn't
executing yet, the instruction can be passed along to ScheduleStage

* The barrier executes, and stalls

* The ScheduleStage sees that there's a new instruction and schedules
it to be executed.

* Only now will the ScoreboardCheckStage realize a barrier is active
and stall accordingly

* The subsequent instruction executes

This patch checks for barrier status in the ScheduleStage to prevent
an instruction from being scheduled when there is a barrier active.

Change-Id: Ib683e2c68f361d7ee60a3beaf53b4b6c888c9f8d
---
M src/gpu-compute/schedule_stage.cc
1 file changed, 15 insertions(+), 0 deletions(-)



diff --git a/src/gpu-compute/schedule_stage.cc  
b/src/gpu-compute/schedule_stage.cc

index 8a2ea18..5c51e76 100644
--- a/src/gpu-compute/schedule_stage.cc
+++ b/src/gpu-compute/schedule_stage.cc
@@ -106,6 +106,21 @@
 wIt++;
 }
 }
+/**
+ * Remove any wave that's at a barrier. Due to backwards execution
+ * of the pipeline, the ScoreboardCheckStage can mark an  
instruction

+ * as ready immediately before a barrier executes, which would then
+ * be executed when the barrier is active without this check.
+ **/
+for (auto wIt = fromScoreboardCheck.readyWFs(j).begin();
+ wIt != fromScoreboardCheck.readyWFs(j).end();) {
+if ((*wIt)->getStatus() == Wavefront::S_BARRIER) {
+*wIt = nullptr;
+wIt = fromScoreboardCheck.readyWFs(j).erase(wIt);
+} else {
+wIt++;
+}
+}
 }

 // Attempt to add another wave for each EXE type to schList queues

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41573
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: Ib683e2c68f361d7ee60a3beaf53b4b6c888c9f8d
Gerrit-Change-Number: 41573
Gerrit-PatchSet: 1
Gerrit-Owner: Kyle Roarty 
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]: base: Add some operators to the BitUnion types.

2021-02-17 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/41515 )


Change subject: base: Add some operators to the BitUnion types.
..

base: Add some operators to the BitUnion types.

The operators it seems to need are ones which modify the BitUnion being
operated on, vs ones which just use it to produce a new value. The later
kind can be handled by converting the BitUnion into its underlying type
and then applying the built in operators.

Change-Id: I8aa08bf74d8ad88f4dfbb0031610c52ad412d03b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41515
Reviewed-by: Gabe Black 
Reviewed-by: Daniel Carvalho 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M src/base/bitunion.hh
1 file changed, 102 insertions(+), 11 deletions(-)

Approvals:
  Daniel Carvalho: Looks good to me, approved
  Gabe Black: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/base/bitunion.hh b/src/base/bitunion.hh
index aef6f6e..3b6ca16 100644
--- a/src/base/bitunion.hh
+++ b/src/base/bitunion.hh
@@ -260,35 +260,126 @@

 BitUnionOperators() {}

+//Conversion operators.
 operator const typename Base::__StorageType () const
 {
 return Base::__storage;
 }

-typename Base::__StorageType
+//Basic assignment operators.
+BitUnionOperators &
 operator=(typename Base::__StorageType const )
 {
 Base::__storage = val;
-return val;
+return *this;
 }

-typename Base::__StorageType
+BitUnionOperators &
 operator=(BitUnionOperators const )
 {
-Base::__storage = other;
-return Base::__storage;
+return operator=(other.__storage);
 }

-bool
-operator<(Base const ) const
+//Increment and decrement operators.
+BitUnionOperators &
+operator++()
 {
-return Base::__storage < base.__storage;
+Base::__storage++;
+return *this;
 }

-bool
-operator==(Base const ) const
+BitUnionOperators
+operator++(int)
 {
-return Base::__storage == base.__storage;
+BitUnionOperators ret = *this;
+operator++();
+return ret;
+}
+
+BitUnionOperators &
+operator--()
+{
+Base::__storage--;
+return *this;
+}
+
+BitUnionOperators
+operator--(int)
+{
+BitUnionOperators ret = *this;
+operator--();
+return ret;
+}
+
+//Operation and assignment operators
+BitUnionOperators &
+operator+=(typename Base::__StorageType const )
+{
+Base::__storage += val;
+return *this;
+}
+
+BitUnionOperators &
+operator-=(typename Base::__StorageType const )
+{
+Base::__storage -= val;
+return *this;
+}
+
+BitUnionOperators &
+operator*=(typename Base::__StorageType const )
+{
+Base::__storage *= val;
+return *this;
+}
+
+BitUnionOperators &
+operator/=(typename Base::__StorageType const )
+{
+Base::__storage /= val;
+return *this;
+}
+
+BitUnionOperators &
+operator%=(typename Base::__StorageType const )
+{
+Base::__storage %= val;
+return *this;
+}
+
+BitUnionOperators &
+operator&=(typename Base::__StorageType const )
+{
+Base::__storage &= val;
+return *this;
+}
+
+BitUnionOperators &
+operator|=(typename Base::__StorageType const )
+{
+Base::__storage |= val;
+return *this;
+}
+
+BitUnionOperators &
+operator^=(typename Base::__StorageType const )
+{
+Base::__storage ^= val;
+return *this;
+}
+
+BitUnionOperators &
+operator<<=(typename Base::__StorageType const )
+{
+Base::__storage <<= val;
+return *this;
+}
+
+BitUnionOperators &
+operator>>=(typename Base::__StorageType const )
+{
+Base::__storage >>= val;
+return *this;
 }
 };
 }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41515
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: I8aa08bf74d8ad88f4dfbb0031610c52ad412d03b
Gerrit-Change-Number: 41515
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 

[gem5-dev] Change in gem5/gem5[develop]: base: Clean up style in bitfield.(hh|cc|test.cc).

2021-02-17 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/41434 )


Change subject: base: Clean up style in bitfield.(hh|cc|test.cc).
..

base: Clean up style in bitfield.(hh|cc|test.cc).

Fix pure style issues, convert bit indices to unsigned, and add
constexpr to most functions. constexpr will allow these functions to be
used to calculate constants at compile time like template parameters or
fixed constants.

Change-Id: Ic98a8ff451ca13f0872411ba5b8b27fc42de8093
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41434
Reviewed-by: Gabe Black 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M src/base/bitfield.cc
M src/base/bitfield.hh
M src/base/bitfield.test.cc
3 files changed, 125 insertions(+), 90 deletions(-)

Approvals:
  Gabe Black: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/base/bitfield.cc b/src/base/bitfield.cc
index 4e51b12..47055df 100644
--- a/src/base/bitfield.cc
+++ b/src/base/bitfield.cc
@@ -38,7 +38,7 @@
 #include "base/bitfield.hh"

 /** Lookup table used for High Speed bit reversing */
-const uint8_t reverseLookUpTable[] =
+const uint8_t reverseBitsLookUpTable[] =
 {
 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0,
 0x30, 0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8,
diff --git a/src/base/bitfield.hh b/src/base/bitfield.hh
index 98a93d4..1ec684f 100644
--- a/src/base/bitfield.hh
+++ b/src/base/bitfield.hh
@@ -41,13 +41,12 @@
 #ifndef __BASE_BITFIELD_HH__
 #define __BASE_BITFIELD_HH__

-#include 
 #include 
 #include 
+#include 
 #include 

-/** Lookup table used for High Speed bit reversing */
-extern const uint8_t reverseLookUpTable[];
+extern const uint8_t reverseBitsLookUpTable[];

 /**
  * Generate a 64-bit mask of 'nbits' 1s, right justified. If a number of  
bits

@@ -57,8 +56,8 @@
  *
  * @ingroup api_bitfield
  */
-inline uint64_t
-mask(int nbits)
+constexpr inline uint64_t
+mask(unsigned nbits)
 {
 return (nbits >= 64) ? (uint64_t)-1LL : (1ULL << nbits) - 1;
 }
@@ -70,12 +69,11 @@
  * @ingroup api_bitfield
  */
 template 
-inline
-T
-bits(T val, int first, int last)
+constexpr inline T
+bits(T val, unsigned first, unsigned last)
 {
+assert(first >= last);
 int nbits = first - last + 1;
-assert((first - last) >= 0);
 return (val >> last) & mask(nbits);
 }

@@ -85,9 +83,8 @@
  * @ingroup api_bitfield
  */
 template 
-inline
-T
-bits(T val, int bit)
+constexpr inline T
+bits(T val, unsigned bit)
 {
 return bits(val, bit, bit);
 }
@@ -99,18 +96,17 @@
  * @ingroup api_bitfield
  */
 template 
-inline
-T
-mbits(T val, int first, int last)
+constexpr inline T
+mbits(T val, unsigned first, unsigned last)
 {
-return val & (mask(first+1) & ~mask(last));
+return val & (mask(first + 1) & ~mask(last));
 }

 /**
  * @ingroup api_bitfield
  */
-inline uint64_t
-mask(int first, int last)
+constexpr inline uint64_t
+mask(unsigned first, unsigned last)
 {
 return mbits((uint64_t)-1LL, first, last);
 }
@@ -121,12 +117,13 @@
  * @ingroup api_bitfield
  */
 template 
-inline
-uint64_t
+constexpr inline uint64_t
 sext(uint64_t val)
 {
-int sign_bit = bits(val, N-1, N-1);
-return sign_bit ? (val | ~mask(N)) : val;
+bool sign_bit = bits(val, N - 1);
+if (sign_bit)
+val |= ~mask(N);
+return val;
 }

 /**
@@ -142,14 +139,14 @@
  * @ingroup api_bitfield
  */
 template 
-inline
-T
-insertBits(T val, int first, int last, B bit_val)
+constexpr inline T
+insertBits(T val, unsigned first, unsigned last, B bit_val)
 {
-T t_bit_val = bit_val;
-assert((first - last) >= 0);
-T bmask = mask(first - last + 1) << last;
-return ((t_bit_val << last) & bmask) | (val & ~bmask);
+assert(first >= last);
+T bmask = mask(first, last);
+val &= ~bmask;
+val |= ((T)bit_val << last) & bmask;
+return val;
 }

 /**
@@ -158,9 +155,8 @@
  * @ingroup api_bitfield
  */
 template 
-inline
-T
-insertBits(T val, int bit, B bit_val)
+constexpr inline T
+insertBits(T val, unsigned bit, B bit_val)
 {
 return insertBits(val, bit, bit, bit_val);
 }
@@ -174,9 +170,8 @@
  * @ingroup api_bitfield
  */
 template 
-inline
-void
-replaceBits(T& val, int first, int last, B bit_val)
+constexpr inline void
+replaceBits(T& val, unsigned first, unsigned last, B bit_val)
 {
 val = insertBits(val, first, last, bit_val);
 }
@@ -187,38 +182,42 @@
  * @ingroup api_bitfield
  */
 template 
-inline
-void
-replaceBits(T& val, int bit, B bit_val)
+constexpr inline void
+replaceBits(T& val, unsigned bit, B bit_val)
 {
 val = insertBits(val, bit, bit, bit_val);
 }

 /**
- * Takes a variable lenght word and returns the mirrored version
- * (Bit by bit, LSB=>MSB).
+ * Takes a value and returns the bit reversed version.
  *
- * algorithm from
- * http://graphics.stanford.edu/~seander/bithacks.html
- * #ReverseBitsByLookupTable
+ * 

[gem5-dev] Change in gem5/gem5[develop]: util: Delete the build_cross_gcc utility.

2021-02-17 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/41454 )


Change subject: util: Delete the build_cross_gcc utility.
..

util: Delete the build_cross_gcc utility.

Now that crosstool-ng can be used for any of the supported ISAs, the
build_cross_gcc tool is no longer needed.

Change-Id: Ie72d84197662eb0bea03ec27830b3ad4dbaa3084
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41454
Reviewed-by: Ciro Santilli 
Reviewed-by: Bobby R. Bruce 
Maintainer: Gabe Black 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
D util/build_cross_gcc/build_cross_gcc.py
D util/build_cross_gcc/settings.aarch64
D util/build_cross_gcc/settings.arm
D util/build_cross_gcc/settings.mips
D util/build_cross_gcc/settings.power
D util/build_cross_gcc/settings.riscv
D util/build_cross_gcc/settings.sparc
7 files changed, 0 insertions(+), 843 deletions(-)

Approvals:
  Ciro Santilli: Looks good to me, but someone else must approve
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/util/build_cross_gcc/build_cross_gcc.py  
b/util/build_cross_gcc/build_cross_gcc.py

deleted file mode 100755
index 3afd4bf..000
--- a/util/build_cross_gcc/build_cross_gcc.py
+++ /dev/null
@@ -1,831 +0,0 @@
-#! /usr/bin/env python
-# 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.
-
-import abc
-import argparse
-import glob
-import multiprocessing
-import os
-import os.path
-import pickle
-import shutil
-import subprocess
-import textwrap
-
-SETTINGS_FILE = '.build_cross_gcc.settings'
-LOG_FILE = 'build_cross_gcc.log'
-
-all_settings = {}
-all_steps = {}
-
-description_paragraphs = [
-'''
-This script helps automate building a gcc based cross compiler.
-The process is broken down into a series of steps which can be
-executed one at a time or in arbtitrary sequences. It's assumed  
that

-you've already downloaded the following sources into the current
-directory:''',
-'',
-'''1. binutils''',
-'''2. gcc''',
-'''3. glibc''',
-'''4. linux kernel''',
-'''5. gdb''',
-'',
-'''
-The entire process can be configured with a series of settings
-which are stored in a config file called {settings_file}. These
-settings can generally also be set from the command line, and at  
run

-time using step 0 of the process. Many will set themselves to
-reasonable defaults if no value was loaded from a previous
-configuration or a saved settings file.''',
-'',
-'''
-Prebaked config options can be loaded in from an external file to
-make it easier to build particular cross compilers without having  
to

-mess with a lot of options.'''
-'',
-'''
-When settings are listed, any setting which has a value which has
-failed validation or which hasn't been set and doesn't have a
-reasonable default will be marked with a X in the far left hand
-column. Settings will generally refuse to be set to invalid values,
-unless they were like that by default and the user refused to  
correct

-them.''',
-'',
-'''This script is based on the excellent how-to here:''',
-'''https://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/''',
-   

[gem5-dev] Change in gem5/gem5[develop]: util: Add a crosstool-ng defconfig for RISCV.

2021-02-17 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/41453 )


Change subject: util: Add a crosstool-ng defconfig for RISCV.
..

util: Add a crosstool-ng defconfig for RISCV.

This may have been available before as well, but it was hidden behind an
"experimental" flag which needed to be enabled before riscv was
selectable.

Change-Id: I76239d826163e54d0b8a48c3492930bb787bea02
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41453
Tested-by: kokoro 
Maintainer: Gabe Black 
Maintainer: Bobby R. Bruce 
Reviewed-by: Bobby R. Bruce 
---
A util/crosstool-ng/riscv-linux-gnu.defconfig
1 file changed, 12 insertions(+), 0 deletions(-)

Approvals:
  Bobby R. Bruce: Looks good to me, approved; Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/util/crosstool-ng/riscv-linux-gnu.defconfig  
b/util/crosstool-ng/riscv-linux-gnu.defconfig

new file mode 100644
index 000..f458630
--- /dev/null
+++ b/util/crosstool-ng/riscv-linux-gnu.defconfig
@@ -0,0 +1,12 @@
+CT_CONFIG_VERSION="3"
+CT_EXPERIMENTAL=y
+CT_ARCH_RISCV=y
+CT_OMIT_TARGET_VENDOR=y
+CT_ARCH_USE_MMU=y
+CT_ARCH_64=y
+CT_KERNEL_LINUX=y
+CT_BINUTILS_PLUGINS=y
+CT_CC_LANG_CXX=y
+CT_DEBUG_GDB=y
+# CT_GDB_CROSS_PYTHON is not set
+# CT_GDB_GDBSERVER is not set

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41453
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: I76239d826163e54d0b8a48c3492930bb787bea02
Gerrit-Change-Number: 41453
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Boris Shingarov 
Gerrit-Reviewer: Ciro Santilli 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
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]: mem-ruby: add TBEStorage structure

2021-02-17 Thread Gerrit
Tiago Mück has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/41157 )


Change subject: mem-ruby: add TBEStorage structure
..

mem-ruby: add TBEStorage structure

The TBEStorage is used to track the resources consumed by the TBETable,
i.e. the number of available TBE slots.

structure(TBEStorage, external ="yes") {
int size();
int capacity();
int reserved();
int slotsAvailable();
bool areNSlotsAvailable(int n);
void incrementReserved();
void decrementReserved();
int addEntryToNewSlot();
void addEntryToSlot(int slot);
void removeEntryFromSlot(int slot);
}

TBEStorage resource tracking has two main differences from TBETable:

1) Allows slot reservation. This is useful to implement protocols that
employ retry/credit messages instead of stall when the controller runs
out of TBEs to accept new request.

2) Can also assign multiple entries to the same slot. This is useful to
more easily model cases where multiple transactions share the same TBE
resource (i.e. the slot).
E.g: a request that triggers a replacement in a system without
dedicated WB/Eviction buffer; both transactions can can have separate
logical TBEs associated to the same slot.

The motivation for having a separate structures for tracking TBEs
availability are twofold:

- Keeps TBETable simple and without the additional overhead for
protocols that do not need these additional features.

- Having two separate transactions sharing the same TBE resource using
the current TBETable would be cumbersome since the TBETable is indexed
by the transaction address.

Change-Id: I64106d50068320bc925243732ef8ff9ef0b6c4bf
Signed-off-by: Tiago Mück 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41157
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/mem/ruby/SConscript
M src/mem/ruby/structures/SConscript
A src/mem/ruby/structures/TBEStorage.cc
A src/mem/ruby/structures/TBEStorage.hh
4 files changed, 243 insertions(+), 0 deletions(-)

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



diff --git a/src/mem/ruby/SConscript b/src/mem/ruby/SConscript
index aab0355..bde71c0 100644
--- a/src/mem/ruby/SConscript
+++ b/src/mem/ruby/SConscript
@@ -125,6 +125,7 @@
 MakeInclude('structures/PerfectCacheMemory.hh')
 MakeInclude('structures/PersistentTable.hh')
 MakeInclude('structures/RubyPrefetcher.hh')
+MakeInclude('structures/TBEStorage.hh')
 MakeInclude('structures/TBETable.hh')
 MakeInclude('structures/TimerTable.hh')
 MakeInclude('structures/WireBuffer.hh')
diff --git a/src/mem/ruby/structures/SConscript  
b/src/mem/ruby/structures/SConscript

index 0cf0559..546326b 100644
--- a/src/mem/ruby/structures/SConscript
+++ b/src/mem/ruby/structures/SConscript
@@ -43,3 +43,4 @@
 Source('RubyPrefetcher.cc')
 Source('TimerTable.cc')
 Source('BankedArray.cc')
+Source('TBEStorage.cc')
diff --git a/src/mem/ruby/structures/TBEStorage.cc  
b/src/mem/ruby/structures/TBEStorage.cc

new file mode 100644
index 000..11a1230
--- /dev/null
+++ b/src/mem/ruby/structures/TBEStorage.cc
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2021 ARM Limited
+ * 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 

[gem5-dev] Re: gem5 21.0 Release blockers

2021-02-17 Thread Bobby Bruce via gem5-dev
Sure Giacomo, I'll add these to our 21.0 list.
--
Dr. Bobby R. Bruce
Room 2235,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net


On Wed, Feb 17, 2021 at 5:37 AM Giacomo Travaglini <
giacomo.travagl...@arm.com> wrote:

> Hi Bobby,
>
> It would be nice if we could get this in as well:
>
> https://gem5-review.googlesource.com/c/public/gem5/+/39898/2
>
> Kind Regards
>
> Giacomo
>
> > -Original Message-
> > From: Bobby Bruce via gem5-dev 
> > Sent: 17 February 2021 08:12
> > To: gem5 Developer List 
> > Cc: Bobby Bruce 
> > Subject: [gem5-dev] gem5 21.0 Release blockers
> >
> > Dear all,
> >
> > We hope to soon create the staging branch for the gem5 21.0 release soon,
> > with the goal of releasing in early March. However, we will not do so
> until the
> > following items are fully reviewed, and incorporated into the gem5
> develop
> > branch.
> >
> >
> > * Changes to the Ruby memory system: https://gem5-
> > review.googlesource.com/c/public/gem5/+/31416
> >
> > * Updates necessary for RISC-V full-system simulation: https://gem5-
> > review.googlesource.com/c/public/gem5/+/41033
> >
> > * The Python Stats/ JSON output: https://gem5-
> > review.googlesource.com/c/public/gem5/+/41514
> >
> > As these are currently blocking our release, we will be focusing on them
> over
> > the next few days.
> >
> >
> > If anyone has a good case for their patchsets (currently under review or
> to be
> > submitted ASAP) to be incorporated into gem5 21.0, then please get in
> touch
> > so we can be made aware and push for their inclusion.
> >
> >
> > Kind regards,
> > Bobby
> >
> > --
> >
> > Dr. Bobby R. Bruce
> > Room 2235,
> > Kemper Hall, UC Davis
> > Davis,
> > CA, 95616
> >
> >
> > web: https://www.bobbybruce.net
>
> 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] breakdown of time running kokoro?

2021-02-17 Thread Gabe Black via gem5-dev
Hey folks, I was just wondering if any of the people that work on kokoro
and our testing setup know how the time it takes is spent? For instance,
how much of a typical run is spent on compiling? How much on running unit
tests? How much on running larger regressions? Depending on where that time
is going, that would help direct any efforts to bring the overall presubmit
test time down, and help avoid those annoying timeout errors. Thanks!

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] Change in gem5/gem5[develop]: base: Remove duplicate isPow2 helper

2021-02-17 Thread Giacomo Travaglini (Gerrit) via gem5-dev
Giacomo Travaglini has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/41533 )



Change subject: base: Remove duplicate isPow2 helper
..

base: Remove duplicate isPow2 helper

This is already defined as isPowerOf2 in src/base/intmath.hh and it
is currently unused

Change-Id: I50b5d344e234fe1d4f1f85186686440773a209e3
Signed-off-by: Giacomo Travaglini 
---
M src/base/bitfield.hh
M src/base/bitfield.test.cc
M src/base/intmath.test.cc
3 files changed, 2 insertions(+), 29 deletions(-)



diff --git a/src/base/bitfield.hh b/src/base/bitfield.hh
index 98a93d4..2aea2b7 100644
--- a/src/base/bitfield.hh
+++ b/src/base/bitfield.hh
@@ -264,17 +264,6 @@
 }

 /**
- * Checks if a number is a power of two, or zero.
- *
- * @ingroup api_bitfield
- */
-template 
-inline bool
-isPow2(T v) {
-   return (v & (v - 1)) == (T)0;
-}
-
-/**
  * Returns the number of set ones in the provided value.
  * PD algorithm from
  * http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetParallel
diff --git a/src/base/bitfield.test.cc b/src/base/bitfield.test.cc
index 3d07e69..909b111 100644
--- a/src/base/bitfield.test.cc
+++ b/src/base/bitfield.test.cc
@@ -290,24 +290,6 @@
 EXPECT_EQ(64, findLsbSet(0));
 }

-/* The following tests a simple function that verifies whether a value is a
- * a power of two or not.
- */
-TEST(BitfieldTest, IsPow2)
-{
-EXPECT_TRUE(isPow2(32));
-}
-
-TEST(BitfieldTest, IsNotPow2)
-{
-EXPECT_FALSE(isPow2(36));
-}
-
-TEST(BitfieldTest, IsPow2Zero)
-{
-EXPECT_TRUE(isPow2(0));
-}
-
 /*
  * The following tests "popCount(X)". popCount counts the number of bits  
set to

  * one.
diff --git a/src/base/intmath.test.cc b/src/base/intmath.test.cc
index 4e88b00..e985a1b 100644
--- a/src/base/intmath.test.cc
+++ b/src/base/intmath.test.cc
@@ -33,10 +33,12 @@
 TEST(IntmathTest, isPowerOf2)
 {
 EXPECT_TRUE(isPowerOf2(1));
+EXPECT_TRUE(isPowerOf2(32));
 EXPECT_TRUE(isPowerOf2(65536));
 EXPECT_TRUE(isPowerOf2(131072));
 EXPECT_TRUE(isPowerOf2(262144));
 EXPECT_FALSE(isPowerOf2(0));
+EXPECT_FALSE(isPowerOf2(36));
 EXPECT_FALSE(isPowerOf2(2521));
 EXPECT_FALSE(isPowerOf2(1679616));
 }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41533
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: I50b5d344e234fe1d4f1f85186686440773a209e3
Gerrit-Change-Number: 41533
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini 
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] Re: gem5 21.0 Release blockers

2021-02-17 Thread Giacomo Travaglini via gem5-dev
Hi Bobby,

It would be nice if we could get this in as well:

https://gem5-review.googlesource.com/c/public/gem5/+/39898/2

Kind Regards

Giacomo

> -Original Message-
> From: Bobby Bruce via gem5-dev 
> Sent: 17 February 2021 08:12
> To: gem5 Developer List 
> Cc: Bobby Bruce 
> Subject: [gem5-dev] gem5 21.0 Release blockers
>
> Dear all,
>
> We hope to soon create the staging branch for the gem5 21.0 release soon,
> with the goal of releasing in early March. However, we will not do so until 
> the
> following items are fully reviewed, and incorporated into the gem5 develop
> branch.
>
>
> * Changes to the Ruby memory system: https://gem5-
> review.googlesource.com/c/public/gem5/+/31416
>
> * Updates necessary for RISC-V full-system simulation: https://gem5-
> review.googlesource.com/c/public/gem5/+/41033
>
> * The Python Stats/ JSON output: https://gem5-
> review.googlesource.com/c/public/gem5/+/41514
>
> As these are currently blocking our release, we will be focusing on them over
> the next few days.
>
>
> If anyone has a good case for their patchsets (currently under review or to be
> submitted ASAP) to be incorporated into gem5 21.0, then please get in touch
> so we can be made aware and push for their inclusion.
>
>
> Kind regards,
> Bobby
>
> --
>
> Dr. Bobby R. Bruce
> Room 2235,
> Kemper Hall, UC Davis
> Davis,
> CA, 95616
>
>
> web: https://www.bobbybruce.net

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] Change in gem5/gem5[develop]: sim: Fix initialization of ticksClkGated distribution

2021-02-17 Thread Giacomo Travaglini (Gerrit) via gem5-dev
Giacomo Travaglini has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/41413 )


Change subject: sim: Fix initialization of ticksClkGated distribution
..

sim: Fix initialization of ticksClkGated distribution

The third init argument is the bucket size. This should be evaluated
according to the following formula:

bucket size = (max - min + 1.0) / #buckets

Current initialization is not taking into considering the minimum value
(and the +1 offset)

Change-Id: Ie4b8dd7e26d3db60288ab1715ff1b7f0f4fe419e
Signed-off-by: Giacomo Travaglini 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41413
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/sim/power_state.cc
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/src/sim/power_state.cc b/src/sim/power_state.cc
index a12e247..8281d2f 100644
--- a/src/sim/power_state.cc
+++ b/src/sim/power_state.cc
@@ -245,7 +245,8 @@
 // Each sample is time in ticks
 unsigned num_bins = std::max(p.clk_gate_bins, 10U);
 ticksClkGated
-.init(p.clk_gate_min, p.clk_gate_max, (p.clk_gate_max / num_bins))
+.init(p.clk_gate_min, p.clk_gate_max,
+(p.clk_gate_max - p.clk_gate_min + 1.0) / num_bins)
 .flags(pdf | nozero | nonan)
 ;


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41413
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: Ie4b8dd7e26d3db60288ab1715ff1b7f0f4fe419e
Gerrit-Change-Number: 41413
Gerrit-PatchSet: 3
Gerrit-Owner: Giacomo Travaglini 
Gerrit-Reviewer: Anouk Van Laer 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jason Lowe-Power 
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]: scons: Work around very long command lines and arg size limits.

2021-02-17 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/41273 )


Change subject: scons: Work around very long command lines and arg size  
limits.

..

scons: Work around very long command lines and arg size limits.

In the background, scons invokes commands using what is essentially
'sh -c ${CMD}'. It's a little more sophisticated than that, but the net
effect is that all of the arguments of a given command are collected
into a single argument for sh. While Linux has a very generous limit
on the number of command line arguments you can have, and a relatively
generous limit on the total size of the arguments and environment
variables which can be read with "getconf ARG_MAX" (about 2MB only my
system), the limit on an individual argument, defined in the little
documented constant MAX_ARG_STRLEN, is much smaller, 32 pages or
131072 bytes from what I've read.

Unfortunately, when building gem5, especially without partial linking,
the command line for the final linking step can be very long, and with
some extra files brought in with EXTRAS can relatively easily exceed
this limit.

To work around this problem, this change adds a new scons "tool" which
replaces the SPAWN and PSPAWN construction environment variables (not
the shell environment, scon's env, aka main) with wrappes. These
wrappers create a temporary file, write the command into it, and then
tell the original SPAWN/PSPAWN implementation to run that file as the
actual command.

This works, but it has two potential drawbacks. First, it creates
extra temporary files which may add some overhead to the build. The
overhead is likely small, but is non-zero.

Second, while this restores the original breaks between command line
arguments, it doesn't completely avoid the total argument/environment
size limit which would be harder to hit, but does still exist.

Another option would be to use the same sort of technique, but to use
gcc's (and I assume clang's) ability to read options from a file using
an @file argument, where file is replaced with the name of the
arguments.

The upside of this approach is that it avoids all of these limits
since gcc is just reading a file, and the only limits are ones it self
imposes. Also, this would only apply to invocations of gcc, and so
would be worth plumbing in to only affect, say, the linking step.
There would be no hypothetical overhead from creating temp files.

One downside though, is that this is not a universal approach and
would break anything which doesn't understand @file style arguments.
Also, when intercepting calls to the shell, the arguments we're
getting have been made appropriate for that environment (escaping,
quoting, etc). The rules for escaping arguments in an @file may not be
quite the same as for the shell, and so there may be weird cases where
a command line gets garbled this way.

Given the tradeoffs, I think always putting the commands into temp
files and running them as scripts is the way to go.

Change-Id: I0a5288aed745a432ed72ffd990ceded2b9422585
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41273
Reviewed-by: Earl Ou 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M SConstruct
M site_scons/gem5_scons/__init__.py
2 files changed, 22 insertions(+), 1 deletion(-)

Approvals:
  Earl Ou: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/SConstruct b/SConstruct
index 210f813..e9dfae5 100755
--- a/SConstruct
+++ b/SConstruct
@@ -126,6 +126,7 @@
   help='Build systemc tests')

 from gem5_scons import Transform, error, warning, summarize_warnings
+from gem5_scons import TempFileSpawn
 import gem5_scons

 
@@ -134,7 +135,7 @@
 #
 

-main = Environment(tools=['default', 'git'])
+main = Environment(tools=['default', 'git', TempFileSpawn])

 from gem5_scons.util import get_termcap
 termcap = get_termcap()
diff --git a/site_scons/gem5_scons/__init__.py  
b/site_scons/gem5_scons/__init__.py

index 9d62c47..5b5777c 100644
--- a/site_scons/gem5_scons/__init__.py
+++ b/site_scons/gem5_scons/__init__.py
@@ -40,6 +40,7 @@

 import os
 import sys
+import tempfile
 import textwrap

 from gem5_scons.util import get_termcap
@@ -58,6 +59,25 @@
 path = path[len(build_base):]
 return path

+def TempFileSpawn(scons_env):
+old_pspawn = scons_env['PSPAWN']
+old_spawn = scons_env['SPAWN']
+
+def wrapper(old, sh, esc, cmd, sh_args, *py_args):
+with tempfile.NamedTemporaryFile() as temp:
+temp.write(' '.join(sh_args).encode())
+temp.flush()
+sh_args = [sh, esc(temp.name)]
+return old(sh, esc, sh, sh_args, *py_args)
+
+def new_pspawn(sh, esc, cmd, args, sh_env, stdout, stderr):
+return 

[gem5-dev] gem5 21.0 Release blockers

2021-02-17 Thread Bobby Bruce via gem5-dev
Dear all,

We hope to soon create the staging branch for the gem5 21.0 release soon,
with the goal of releasing in early March. However, we will not do so until
the following items are fully reviewed, and incorporated into the gem5
develop branch.

* Changes to the Ruby memory system:
https://gem5-review.googlesource.com/c/public/gem5/+/31416

* Updates necessary for RISC-V full-system simulation:
https://gem5-review.googlesource.com/c/public/gem5/+/41033

* The Python Stats/ JSON output:
https://gem5-review.googlesource.com/c/public/gem5/+/41514

As these are currently blocking our release, we will be focusing on them
over the next few days.

If anyone has a good case for their patchsets (currently under review or to
be submitted ASAP) to be incorporated into gem5 21.0, then please get in
touch so we can be made aware and push for their inclusion.

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

web: https://www.bobbybruce.net
___
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