[gem5-dev] derived units for stats formulas?

2021-02-06 Thread Gabe Black via gem5-dev
Hi folks working on stats. I noticed a lot of changes recently related to
stats and units, and while I haven't been paying that close attention to
it, it at least sounds like a pretty good idea, so go for it.

One thing I noticed though, was that there are some stats which are derived
from other stats (formula stats I think). These specify how they're
computed by overloading operators on other stats, so if a stat should
computed as the value of stat A divided by the value of stat B, you'd set
it to be A / B. Then in addition to that, the units are also separately
computed the same way, by saying, for instance, bytes / seconds. If stat A
already has units bytes, and stat B already has units seconds, why don't we
just figure out the units of A / B as bytes / seconds without having to
specify it again? That would simplify writing out stats, and reduce the
likelihood of errors.

Just a thought.

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] Build failed in Jenkins: Nightly #212

2021-02-06 Thread jenkins-no-reply--- via gem5-dev
See 

Changes:


--
[...truncated 172.90 KB...]
[--] 4 tests from StatsStatStorTest
[ RUN  ] StatsStatStorTest.SetValueResult
[   OK ] StatsStatStorTest.SetValueResult (0 ms)
[ RUN  ] StatsStatStorTest.Prepare
[   OK ] StatsStatStorTest.Prepare (0 ms)
[ RUN  ] StatsStatStorTest.IncDec
[   OK ] StatsStatStorTest.IncDec (0 ms)
[ RUN  ] StatsStatStorTest.ZeroReset
[   OK ] StatsStatStorTest.ZeroReset (0 ms)
[--] 4 tests from StatsStatStorTest (0 ms total)

[--] 4 tests from StatsAvgStorTest
[ RUN  ] StatsAvgStorTest.SetValueResult
[   OK ] StatsAvgStorTest.SetValueResult (0 ms)
[ RUN  ] StatsAvgStorTest.Prepare
[   OK ] StatsAvgStorTest.Prepare (0 ms)
[ RUN  ] StatsAvgStorTest.IncDec
[   OK ] StatsAvgStorTest.IncDec (0 ms)
[ RUN  ] StatsAvgStorTest.ZeroReset
[   OK ] StatsAvgStorTest.ZeroReset (0 ms)
[--] 4 tests from StatsAvgStorTest (0 ms total)

[--] 5 tests from StatsDistStorTest
[ RUN  ] StatsDistStorTest.ZeroReset
[   OK ] StatsDistStorTest.ZeroReset (0 ms)
[ RUN  ] StatsDistStorTest.Size
[   OK ] StatsDistStorTest.Size (0 ms)
[ RUN  ] StatsDistStorTest.SamplePrepareSingle
[   OK ] StatsDistStorTest.SamplePrepareSingle (0 ms)
[ RUN  ] StatsDistStorTest.SamplePrepareMultiple
[   OK ] StatsDistStorTest.SamplePrepareMultiple (0 ms)
[ RUN  ] StatsDistStorTest.Reset
[   OK ] StatsDistStorTest.Reset (0 ms)
[--] 5 tests from StatsDistStorTest (0 ms total)

[--] 13 tests from StatsHistStorTest
[ RUN  ] StatsHistStorTest.ZeroReset
[   OK ] StatsHistStorTest.ZeroReset (1 ms)
[ RUN  ] StatsHistStorTest.Size
[   OK ] StatsHistStorTest.Size (0 ms)
[ RUN  ] StatsHistStorTest.SamplePrepareFit
[   OK ] StatsHistStorTest.SamplePrepareFit (0 ms)
[ RUN  ] StatsHistStorTest.SamplePrepareSingleGrowUp
[   OK ] StatsHistStorTest.SamplePrepareSingleGrowUp (0 ms)
[ RUN  ] StatsHistStorTest.SamplePrepareMultipleGrowUp
[   OK ] StatsHistStorTest.SamplePrepareMultipleGrowUp (0 ms)
[ RUN  ] StatsHistStorTest.SamplePrepareGrowDownOddBuckets
[   OK ] StatsHistStorTest.SamplePrepareGrowDownOddBuckets (0 ms)
[ RUN  ] StatsHistStorTest.SamplePrepareGrowDownEvenBuckets
[   OK ] StatsHistStorTest.SamplePrepareGrowDownEvenBuckets (0 ms)
[ RUN  ] StatsHistStorTest.SamplePrepareGrowDownGrowOutOddBuckets
[   OK ] StatsHistStorTest.SamplePrepareGrowDownGrowOutOddBuckets (0 ms)
[ RUN  ] StatsHistStorTest.SamplePrepareGrowDownGrowOutEvenBuckets
[   OK ] StatsHistStorTest.SamplePrepareGrowDownGrowOutEvenBuckets (0 ms)
[ RUN  ] StatsHistStorTest.SamplePrepareMultipleGrowOddBuckets
[   OK ] StatsHistStorTest.SamplePrepareMultipleGrowOddBuckets (0 ms)
[ RUN  ] StatsHistStorTest.SamplePrepareMultipleGrowEvenBuckets
[   OK ] StatsHistStorTest.SamplePrepareMultipleGrowEvenBuckets (0 ms)
[ RUN  ] StatsHistStorTest.Reset
[   OK ] StatsHistStorTest.Reset (0 ms)
[ RUN  ] StatsHistStorTest.Add
[   OK ] StatsHistStorTest.Add (0 ms)
[--] 13 tests from StatsHistStorTest (1 ms total)

[--] 3 tests from StatsSampleStorTest
[ RUN  ] StatsSampleStorTest.ZeroReset
[   OK ] StatsSampleStorTest.ZeroReset (0 ms)
[ RUN  ] StatsSampleStorTest.SamplePrepare
[   OK ] StatsSampleStorTest.SamplePrepare (0 ms)
[ RUN  ] StatsSampleStorTest.Size
[   OK ] StatsSampleStorTest.Size (0 ms)
[--] 3 tests from StatsSampleStorTest (0 ms total)

[--] 3 tests from StatsAvgSampleStorTest
[ RUN  ] StatsAvgSampleStorTest.ZeroReset
[   OK ] StatsAvgSampleStorTest.ZeroReset (0 ms)
[ RUN  ] StatsAvgSampleStorTest.SamplePrepare
[   OK ] StatsAvgSampleStorTest.SamplePrepare (0 ms)
[ RUN  ] StatsAvgSampleStorTest.Size
[   OK ] StatsAvgSampleStorTest.Size (0 ms)
[--] 3 tests from StatsAvgSampleStorTest (0 ms total)

[--] 2 tests from StatsSparseHistStorTest
[ RUN  ] StatsSparseHistStorTest.ZeroReset
[   OK ] StatsSparseHistStorTest.ZeroReset (0 ms)
[ RUN  ] StatsSparseHistStorTest.SamplePrepare
[   OK ] StatsSparseHistStorTest.SamplePrepare (0 ms)
[--] 2 tests from StatsSparseHistStorTest (0 ms total)

[--] Global test environment tear-down
[==] 40 tests from 10 test suites ran. (38 ms total)
[  PASSED  ] 37 tests.
[  FAILED  ] 3 tests, listed below:
[  FAILED  ] StatsAvgStorDeathTest.Result
[  FAILED  ] StatsHistStorDeathTest.AddDifferentSize
[  FAILED  ] StatsHistStorDeathTest.AddDifferentMin

 3 FAILED TESTS
Running main() from build/googletest/googletest/src/gtest_main.cc
[==] Running 42 tests from 1 test suite.
[--] Global test environment set-up.
[--] 42 tests from StrTest
[ RUN  ] StrTest.EatLeadWhite
[   OK ] StrTest.EatLeadWhite (0 ms)
[ RUN  ] StrTest.EatLeadWhi

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

2021-02-06 Thread Daniel Carvalho via gem5-dev
 Fix here: https://gem5-review.googlesource.com/c/public/gem5/+/40835
Bonus fix (not run by any CI): 
https://gem5-review.googlesource.com/c/public/gem5/+/40836/1Em sábado, 6 de 
fevereiro de 2021 21:19:30 BRT, jenkins-no-reply--- via gem5-dev 
 escreveu:  
 
 See 

Changes:

[odanrc] base: Fix storage params safe_cast

[odanrc] base: Initialize storage params on constructor

[gabe.black] arch,sim: Add a UintPtr type to the ABI types for GuestABI.

[gabe.black] sim: Add a void * analogue to VPtr.

[shingarov] arch-power: Restore consistency with other platforms

[gabe.black] tests,base: Delete the SymbolTable::load method and symtest test.


--
[...truncated 304.76 KB...]
[ RUN      ] CyclesTest.ShiftRight
[      OK ] CyclesTest.ShiftRight (0 ms)
[ RUN      ] CyclesTest.ShiftLeft
[      OK ] CyclesTest.ShiftLeft (0 ms)
[ RUN      ] CyclesTest.OutStream
[      OK ] CyclesTest.OutStream (0 ms)
[--] 10 tests from CyclesTest (5 ms total)

[--] 5 tests from MicroPCTest
[ RUN      ] MicroPCTest.CheckMicroPCRomBit
[      OK ] MicroPCTest.CheckMicroPCRomBit (0 ms)
[ RUN      ] MicroPCTest.RomMicroPCTest
[      OK ] MicroPCTest.RomMicroPCTest (0 ms)
[ RUN      ] MicroPCTest.NormalMicroPCTest
[      OK ] MicroPCTest.NormalMicroPCTest (0 ms)
[ RUN      ] MicroPCTest.IsRomMicroPCTest
[      OK ] MicroPCTest.IsRomMicroPCTest (0 ms)
[ RUN      ] MicroPCTest.IsNotRomMicroPCTest
[      OK ] MicroPCTest.IsNotRomMicroPCTest (0 ms)
[--] 5 tests from MicroPCTest (2 ms total)

[--] 4 tests from TypesTest
[ RUN      ] TypesTest.FloatToBits32
[      OK ] TypesTest.FloatToBits32 (0 ms)
[ RUN      ] TypesTest.floatToBits64
[      OK ] TypesTest.floatToBits64 (0 ms)
[ RUN      ] TypesTest.floatsToBitsDoubleInput
[      OK ] TypesTest.floatsToBitsDoubleInput (0 ms)
[ RUN      ] TypesTest.floatsToBitsFloatInput
[      OK ] TypesTest.floatsToBitsFloatInput (0 ms)
[--] 4 tests from TypesTest (2 ms total)

[--] Global test environment tear-down
[==] 19 tests from 3 test suites ran. (34 ms total)
[  PASSED  ] 19 tests.
build/NULL/sim/byteswap.test.fast 
--gtest_output=xml:build/NULL/unittests.fast/sim/byteswap.test.xml
Running main() from build/googletest/googletest/src/gtest_main.cc
[==] Running 8 tests from 1 test suite.
[--] Global test environment set-up.
[--] 8 tests from ByteswapTest
[ RUN      ] ByteswapTest.swap_byte64
[      OK ] ByteswapTest.swap_byte64 (0 ms)
[ RUN      ] ByteswapTest.swap_byte32
[      OK ] ByteswapTest.swap_byte32 (0 ms)
[ RUN      ] ByteswapTest.swap_byte16
[      OK ] ByteswapTest.swap_byte16 (0 ms)
[ RUN      ] ByteswapTest.swap_byte
[      OK ] ByteswapTest.swap_byte (0 ms)
[ RUN      ] ByteswapTest.htog
[      OK ] ByteswapTest.htog (0 ms)
[ RUN      ] ByteswapTest.gtoh
[      OK ] ByteswapTest.gtoh (0 ms)
[ RUN      ] ByteswapTest.betole
[      OK ] ByteswapTest.betole (0 ms)
[ RUN      ] ByteswapTest.letobe
[      OK ] ByteswapTest.letobe (0 ms)
[--] 8 tests from ByteswapTest (1 ms total)

[--] Global test environment tear-down
[      OK ] UncontendedMutex.Lock (212 ms)
[ RUN      ] UncontendedMutex.HeavyContention
 [    LINK]  -> NULL/sim/guest_abi.test.fast.unstripped
[==] 8 tests from 1 test suite ran. (1 ms total)
[  PASSED  ] 8 tests.
 [    CXX] NULL/sim/proxy_ptr.test.cc -> .fo
[      OK ] UncontendedMutex.HeavyContention (441 ms)
[--] 2 tests from UncontendedMutex (653 ms total)

[--] Global test environment tear-down
[==] 2 tests from 1 test suite ran. (653 ms total)
[  PASSED  ] 2 tests.
 [    LINK]  -> NULL/base/stats/storage.test.fast.unstripped
 [  STRIP] NULL/sim/guest_abi.test.fast.unstripped -> .fast
build/NULL/sim/guest_abi.test.fast 
--gtest_output=xml:build/NULL/unittests.fast/sim/guest_abi.test.xml
Running main() from build/googletest/googletest/src/gtest_main.cc
[==] Running 7 tests from 1 test suite.
[--] Global test environment set-up.
[--] 7 tests from GuestABI
[ RUN      ] GuestABI.ABI_1D_args
[      OK ] GuestABI.ABI_1D_args (0 ms)
[ RUN      ] GuestABI.ABI_Prepare
[      OK ] GuestABI.ABI_Prepare (0 ms)
[ RUN      ] GuestABI.ABI_2D_args
[      OK ] GuestABI.ABI_2D_args (0 ms)
[ RUN      ] GuestABI.ABI_TC_init
[      OK ] GuestABI.ABI_TC_init (0 ms)
[ RUN      ] GuestABI.ABI_returns
[      OK ] GuestABI.ABI_returns (0 ms)
[ RUN      ] GuestABI.dumpSimcall
[      OK ] GuestABI.dumpSimcall (0 ms)
[ RUN      ] GuestABI.isVarArgs
[      OK ] GuestABI.isVarArgs (0 ms)
[--] 7 tests from GuestABI (0 ms total)

[--] Global test environment tear-down
[==] 7 tests from 1 test suite ran. (0 ms total)
[  PASSED  ] 7 tests.
 [  STRIP] NULL/base/stats/storage.test.fast.unstripped -> .fast
build/NULL/base/stats/storage.test.fast 
--gtest_output=xml:build/NULL/unittests.fast/base/stats/storage.test.xml
Run

[gem5-dev] Change in gem5/gem5[develop]: base: Fix storage unit test in .fast

2021-02-06 Thread Daniel Carvalho (Gerrit) via gem5-dev
Daniel Carvalho has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/40835 )



Change subject: base: Fix storage unit test in .fast
..

base: Fix storage unit test in .fast

These tests depend on assertions being triggered, which
does not happen in .fast.

Change-Id: I0dd78f184809a453035046bc76640dfb5988bb5f
Signed-off-by: Daniel R. Carvalho 
---
M src/base/stats/storage.test.cc
1 file changed, 8 insertions(+), 0 deletions(-)



diff --git a/src/base/stats/storage.test.cc b/src/base/stats/storage.test.cc
index 78df23d..3218438 100644
--- a/src/base/stats/storage.test.cc
+++ b/src/base/stats/storage.test.cc
@@ -175,6 +175,7 @@
 increaseTick();
 }

+#if TRACING_ON
 /**
  * Test whether getting the result in a different tick triggers an  
assertion.

  */
@@ -184,6 +185,7 @@
 increaseTick();
 ASSERT_DEATH(stor.result(), ".+");
 }
+#endif

 /**
  * Test whether getting the result in a different tick does not trigger an
@@ -266,6 +268,7 @@
 ASSERT_FALSE(stor.zero());
 }

+#if TRACING_ON
 /** Test that an assertion is thrown when bucket size is 0. */
 TEST(StatsDistStorDeathTest, BucketSize0)
 {
@@ -273,6 +276,7 @@
 EXPECT_ANY_THROW(Stats::DistStor::Params params(0, 5, 0));
 testing::internal::GetCapturedStderr();
 }
+#endif

 /**
  * Test whether zero is correctly set as the reset value. The test order is
@@ -492,6 +496,7 @@
 checkExpectedDistData(data, expected_data, true);
 }

+#if TRACING_ON
 /** Test that an assertion is thrown when not enough buckets are provided.  
*/

 TEST(StatsHistStorDeathTest, NotEnoughBuckets0)
 {
@@ -507,6 +512,7 @@
 EXPECT_ANY_THROW(Stats::HistStor::Params params(1));
 testing::internal::GetCapturedStderr();
 }
+#endif

 /**
  * Test whether zero is correctly set as the reset value. The test order is
@@ -913,6 +919,7 @@
 prepareCheckHistStor(params, values, 0, expected_data);
 }

+#if TRACING_ON
 /** Test whether adding storages with different sizes triggers an  
assertion. */

 TEST(StatsHistStorDeathTest, AddDifferentSize)
 {
@@ -942,6 +949,7 @@

 ASSERT_DEATH(stor.add(&stor2), ".+");
 }
+#endif

 /** Test merging two histograms. */
 TEST(StatsHistStorTest, Add)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/40835
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: I0dd78f184809a453035046bc76640dfb5988bb5f
Gerrit-Change-Number: 40835
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho 
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]: dev: Fix register bank unit test in .debug

2021-02-06 Thread Daniel Carvalho (Gerrit) via gem5-dev
Daniel Carvalho has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/40836 )



Change subject: dev: Fix register bank unit test in .debug
..

dev: Fix register bank unit test in .debug

The lack of definition of this static variable was throwing
and undefined reference error when running

  scons build/X86/unittests.opt.

For more info, check

  https://stackoverflow.com/questions/
8016780/undefined-reference-to-static-constexpr-char

Change-Id: Id736dc42a82aea871da6a53c06d89fd399d3559a
Signed-off-by: Daniel R. Carvalho 
---
M src/dev/reg_bank.test.cc
1 file changed, 8 insertions(+), 0 deletions(-)



diff --git a/src/dev/reg_bank.test.cc b/src/dev/reg_bank.test.cc
index 6e655e2..f72642d 100644
--- a/src/dev/reg_bank.test.cc
+++ b/src/dev/reg_bank.test.cc
@@ -82,6 +82,8 @@
 buf.fill(0xff);
 }
 };
+// Needed by C++14 and lower
+constexpr size_t RegisterRazTest::RazSize;

 TEST_F(RegisterRazTest, Name)
 {
@@ -166,6 +168,8 @@
 buf.fill(0x00);
 }
 };
+// Needed by C++14 and lower
+constexpr size_t RegisterRaoTest::RaoSize;

 TEST_F(RegisterRaoTest, Name)
 {
@@ -252,6 +256,8 @@
 0x70, 0x80, 0x90, 0xa0, 0xb0, 0xc0}
 {}
 };
+// Needed by C++14 and lower
+constexpr size_t RegisterBufTest::RegSize;

 TEST_F(RegisterBufTest, Name)
 {
@@ -456,6 +462,8 @@
 buf{0x1, 0x2, 0x3, 0x4, 0x5, 0x6}
 {}
 };
+// Needed by C++14 and lower
+constexpr size_t TypedRegisterTest::RegSize;

 TEST_F(TypedRegisterTest, DefaultConstructor)
 {

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/40836
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: Id736dc42a82aea871da6a53c06d89fd399d3559a
Gerrit-Change-Number: 40836
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho 
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] Build failed in Jenkins: Nightly #211

2021-02-06 Thread jenkins-no-reply--- via gem5-dev
See 

Changes:

[odanrc] base: Fix storage params safe_cast

[odanrc] base: Initialize storage params on constructor

[gabe.black] arch,sim: Add a UintPtr type to the ABI types for GuestABI.

[gabe.black] sim: Add a void * analogue to VPtr.

[shingarov] arch-power: Restore consistency with other platforms

[gabe.black] tests,base: Delete the SymbolTable::load method and symtest test.


--
[...truncated 304.76 KB...]
[ RUN  ] CyclesTest.ShiftRight
[   OK ] CyclesTest.ShiftRight (0 ms)
[ RUN  ] CyclesTest.ShiftLeft
[   OK ] CyclesTest.ShiftLeft (0 ms)
[ RUN  ] CyclesTest.OutStream
[   OK ] CyclesTest.OutStream (0 ms)
[--] 10 tests from CyclesTest (5 ms total)

[--] 5 tests from MicroPCTest
[ RUN  ] MicroPCTest.CheckMicroPCRomBit
[   OK ] MicroPCTest.CheckMicroPCRomBit (0 ms)
[ RUN  ] MicroPCTest.RomMicroPCTest
[   OK ] MicroPCTest.RomMicroPCTest (0 ms)
[ RUN  ] MicroPCTest.NormalMicroPCTest
[   OK ] MicroPCTest.NormalMicroPCTest (0 ms)
[ RUN  ] MicroPCTest.IsRomMicroPCTest
[   OK ] MicroPCTest.IsRomMicroPCTest (0 ms)
[ RUN  ] MicroPCTest.IsNotRomMicroPCTest
[   OK ] MicroPCTest.IsNotRomMicroPCTest (0 ms)
[--] 5 tests from MicroPCTest (2 ms total)

[--] 4 tests from TypesTest
[ RUN  ] TypesTest.FloatToBits32
[   OK ] TypesTest.FloatToBits32 (0 ms)
[ RUN  ] TypesTest.floatToBits64
[   OK ] TypesTest.floatToBits64 (0 ms)
[ RUN  ] TypesTest.floatsToBitsDoubleInput
[   OK ] TypesTest.floatsToBitsDoubleInput (0 ms)
[ RUN  ] TypesTest.floatsToBitsFloatInput
[   OK ] TypesTest.floatsToBitsFloatInput (0 ms)
[--] 4 tests from TypesTest (2 ms total)

[--] Global test environment tear-down
[==] 19 tests from 3 test suites ran. (34 ms total)
[  PASSED  ] 19 tests.
build/NULL/sim/byteswap.test.fast 
--gtest_output=xml:build/NULL/unittests.fast/sim/byteswap.test.xml
Running main() from build/googletest/googletest/src/gtest_main.cc
[==] Running 8 tests from 1 test suite.
[--] Global test environment set-up.
[--] 8 tests from ByteswapTest
[ RUN  ] ByteswapTest.swap_byte64
[   OK ] ByteswapTest.swap_byte64 (0 ms)
[ RUN  ] ByteswapTest.swap_byte32
[   OK ] ByteswapTest.swap_byte32 (0 ms)
[ RUN  ] ByteswapTest.swap_byte16
[   OK ] ByteswapTest.swap_byte16 (0 ms)
[ RUN  ] ByteswapTest.swap_byte
[   OK ] ByteswapTest.swap_byte (0 ms)
[ RUN  ] ByteswapTest.htog
[   OK ] ByteswapTest.htog (0 ms)
[ RUN  ] ByteswapTest.gtoh
[   OK ] ByteswapTest.gtoh (0 ms)
[ RUN  ] ByteswapTest.betole
[   OK ] ByteswapTest.betole (0 ms)
[ RUN  ] ByteswapTest.letobe
[   OK ] ByteswapTest.letobe (0 ms)
[--] 8 tests from ByteswapTest (1 ms total)

[--] Global test environment tear-down
[   OK ] UncontendedMutex.Lock (212 ms)
[ RUN  ] UncontendedMutex.HeavyContention
 [LINK]  -> NULL/sim/guest_abi.test.fast.unstripped
[==] 8 tests from 1 test suite ran. (1 ms total)
[  PASSED  ] 8 tests.
 [ CXX] NULL/sim/proxy_ptr.test.cc -> .fo
[   OK ] UncontendedMutex.HeavyContention (441 ms)
[--] 2 tests from UncontendedMutex (653 ms total)

[--] Global test environment tear-down
[==] 2 tests from 1 test suite ran. (653 ms total)
[  PASSED  ] 2 tests.
 [LINK]  -> NULL/base/stats/storage.test.fast.unstripped
 [   STRIP] NULL/sim/guest_abi.test.fast.unstripped -> .fast
build/NULL/sim/guest_abi.test.fast 
--gtest_output=xml:build/NULL/unittests.fast/sim/guest_abi.test.xml
Running main() from build/googletest/googletest/src/gtest_main.cc
[==] Running 7 tests from 1 test suite.
[--] Global test environment set-up.
[--] 7 tests from GuestABI
[ RUN  ] GuestABI.ABI_1D_args
[   OK ] GuestABI.ABI_1D_args (0 ms)
[ RUN  ] GuestABI.ABI_Prepare
[   OK ] GuestABI.ABI_Prepare (0 ms)
[ RUN  ] GuestABI.ABI_2D_args
[   OK ] GuestABI.ABI_2D_args (0 ms)
[ RUN  ] GuestABI.ABI_TC_init
[   OK ] GuestABI.ABI_TC_init (0 ms)
[ RUN  ] GuestABI.ABI_returns
[   OK ] GuestABI.ABI_returns (0 ms)
[ RUN  ] GuestABI.dumpSimcall
[   OK ] GuestABI.dumpSimcall (0 ms)
[ RUN  ] GuestABI.isVarArgs
[   OK ] GuestABI.isVarArgs (0 ms)
[--] 7 tests from GuestABI (0 ms total)

[--] Global test environment tear-down
[==] 7 tests from 1 test suite ran. (0 ms total)
[  PASSED  ] 7 tests.
 [   STRIP] NULL/base/stats/storage.test.fast.unstripped -> .fast
build/NULL/base/stats/storage.test.fast 
--gtest_output=xml:build/NULL/unittests.fast/base/stats/storage.test.xml
Running main() from build/googletest/googletest/src/gtest_main.cc
[==] Running 40 tests from 10 test suites.
[--] Global test environment set-up.
[--] 1 test from StatsAvgStorDeathTest
[ RUN  ] StatsAvgStorDe

[gem5-dev] Re: Upstreaming power-gem5

2021-02-06 Thread Sandipan Das via gem5-dev


On 05/02/21 6:06 pm, Gabe Black wrote:
> Re my commit, please feel free to add back the constants you need. I'm
> probably going to try splitting up the ISA constants consumed by non-ISA
> code from the ones that are internally used in registers.hh since I'm
> trying to get rid of the former, but if that same constant is useful
> *inside* an ISA then that's ok, I just want to keep them separated so one
> doesn't leak back into the other over time.
> 

Sure, Gabe. Thanks.


- Sandipan
___
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] removing partial linking hurts simulator performance, locality suspected

2021-02-06 Thread Gabe Black via gem5-dev
Out of curiosity I tried a quick x86 boot test, and say that the run time
with partial linking removed increased from just under 7 minutes to about 7
and a half minutes.

I thought about this for a while since at first I had no idea why that
might happen, and a theory I came up with was that when partial linking,
related bits of the simulator are grouped together since they're generally
in the same directory, and then those will likely end up in the same part
of the final binary. If those things are related, then you'll get better
locality as far as TLB performance and maybe paging things in. gem5 is such
a big executable that I doubt locality at that scale would make much of a
difference at the granularity cache lines. Also possibly the type of
relocations between those entities could be more efficient if the offset
they need to encode is smaller?

If that's true, there are two ways I've thought of where we could get that
sort of behavior back without reintroducing partial linking, both of which
use attributes gcc provides which I assume clang would too.

1. The "hot" and "cold" attributes. "hot" makes a function get optimized
particularly aggressively for performance, and "cold" makes the compiler
optimize for size. According to the docs, both could (probably do?) put the
items in question into separate sections where they would have better
locality, and the "cold" functions would stay out of the way.

2. Put things in different sections explicitly with the "section"
attribute. This could explicitly group items we'd want to show up near each
other like what partial linking does explicitly/accidentally.

A third option might be to use profiling based optimization. I don't know
how to get gcc or clang to use that and what it requires, but I think they
at least *can* do something along those lines. That would hopefully give
the compiler enough information that it could figure some of these things
out on its own.

The problem with this option might be that things we don't exercise in the
profiling (devices or CPUs or features that aren't used) may look
unimportant, but would be very important if the configuration of the
simulator was different.

One other thing we might want to try, and I'm not sure how this would work,
might be to get gem5 loaded in with a larger page size somehow. Given how
big the binary is, reducing pressure on the TLB that way would probably
make a fairly big difference in performance.

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