[gem5-dev] Change in gem5/gem5[develop]: configs, tests: Replace optparse with argparse

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


Change subject: configs, tests: Replace optparse with argparse
..

configs, tests: Replace optparse with argparse

JIRA: https://gem5.atlassian.net/browse/GEM5-543

Change-Id: I997d6a4e45319a74e21bd0d61d4af6118474c849
Signed-off-by: Giacomo Travaglini 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44513
Reviewed-by: Daniel Carvalho 
Tested-by: kokoro 
---
M configs/common/GPUTLBOptions.py
M configs/common/Options.py
M configs/common/SimpleOpts.py
M configs/dist/sw.py
M configs/dram/lat_mem_rd.py
M configs/dram/sweep.py
M configs/example/apu_se.py
M configs/example/arm/ruby_fs.py
M configs/example/etrace_replay.py
M configs/example/fs.py
M configs/example/garnet_synth_traffic.py
M configs/example/memcheck.py
M configs/example/memtest.py
M configs/example/riscv/fs_linux.py
M configs/example/ruby_direct_test.py
M configs/example/ruby_gpu_random_test.py
M configs/example/ruby_mem_test.py
M configs/example/ruby_random_test.py
M configs/example/se.py
M configs/learning_gem5/part1/two_level.py
M configs/network/Network.py
M configs/nvm/sweep.py
M configs/nvm/sweep_hybrid.py
M configs/ruby/AMD_Base_Constructor.py
M configs/ruby/CHI.py
M configs/ruby/GPU_VIPER.py
M configs/ruby/MESI_Three_Level.py
M configs/ruby/MESI_Three_Level_HTM.py
M configs/ruby/MOESI_AMD_Base.py
M configs/ruby/MOESI_CMP_token.py
M configs/ruby/MOESI_hammer.py
M configs/ruby/Ruby.py
M configs/splash2/cluster.py
M configs/splash2/run.py
M tests/configs/gpu-randomtest-ruby.py
M tests/configs/gpu-ruby.py
M tests/configs/memtest-ruby.py
M tests/configs/pc-simple-timing-ruby.py
M tests/configs/rubytest-ruby.py
M tests/configs/simple-timing-mp-ruby.py
M tests/configs/simple-timing-ruby.py
M tests/gem5/configs/base_config.py
M tests/gem5/x86-boot-tests/run_exit.py
43 files changed, 1,940 insertions(+), 1,953 deletions(-)

Approvals:
  Daniel Carvalho: Looks good to me, approved
  Giacomo Travaglini: Looks good to me, approved
  kokoro: Regressions pass






9 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the  
submitted one.

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/44513
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: I997d6a4e45319a74e21bd0d61d4af6118474c849
Gerrit-Change-Number: 44513
Gerrit-PatchSet: 11
Gerrit-Owner: Giacomo Travaglini 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Matthew Poremba 
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]: configs: restore_simpoint_checkpoint should be a boolean

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


Change subject: configs: restore_simpoint_checkpoint should be a boolean
..

configs: restore_simpoint_checkpoint should be a boolean

The --restore_simpoint_checkpoint option is a boolean;
however if no default value is supplied, optparse sets the
default value to None

This is not valid for argparse. Argparse recognizes the store_true
action and it is automatically treating the option as a boolean,
hence providing a default=False instead of default=None

Change-Id: I6b09edf6911be71a06001730be1232a1b5c8482c
Signed-off-by: Giacomo Travaglini 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44765
Reviewed-by: Daniel Carvalho 
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M configs/common/Options.py
M configs/common/Simulation.py
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/configs/common/Options.py b/configs/common/Options.py
index c48bfe6..b833531 100644
--- a/configs/common/Options.py
+++ b/configs/common/Options.py
@@ -305,6 +305,7 @@
 parser.add_option("--take-simpoint-checkpoints", action="store",  
type="string",

 help="")
 parser.add_option("--restore-simpoint-checkpoint", action="store_true",
+default=False,
 help="restore from a simpoint checkpoint taken with " +
  "--take-simpoint-checkpoints")

diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py
index 067bc01..3b9efc0 100644
--- a/configs/common/Simulation.py
+++ b/configs/common/Simulation.py
@@ -710,7 +710,7 @@
 takeSimpointCheckpoints(simpoints, interval_length, cptdir)

 # Restore from SimPoint checkpoints
-elif options.restore_simpoint_checkpoint != None:
+elif options.restore_simpoint_checkpoint:
 restoreSimpointCheckpoint()

 else:

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/44765
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: I6b09edf6911be71a06001730be1232a1b5c8482c
Gerrit-Change-Number: 44765
Gerrit-PatchSet: 2
Gerrit-Owner: Giacomo Travaglini 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jason Lowe-Power 
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] gem5 Minor Release staging [v21.0.1]

2021-04-21 Thread Bobby Bruce via gem5-dev
Dear all,

In order to ensure bug fixes are ported to the latest release, I've
proposed we do semi-regular "minor" releases of gem5, consisting purely of
bug fixes and improvements that don't change functionality or APIs. There's
really no fixed schedule for this, but my intention is to make a minor
release when we have a nice set of changes we feel should be on the stable
branch. This stops the problem of having lots of little "hotfixes" which
are not really urgently needed by gem5 users.

I've created a new branch, `minor-release-staging-v21-0-1` :
https://gem5-review.googlesource.com/q/project:public%252Fgem5+branch:minor-release-staging-v21-0-1

If you have a patch which you want applied as part of the minor release
then you can either:

A) Submit directly to this branch (`git push origin
HEAD:refs/for/minor-release-staging-v21-0-1`). This branch will be merged
into the stable and develop branch upon release.

B) Submit to develop, and once merged cherry-pick the change into the
minor-release-staging-v21-0-1 branch.

I suggest `B)` as this gets a fix on the develop branch faster, and no
slower to the stable, but it's up to you.

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

[gem5-dev] Change in gem5/gem5[develop]: configs: restore_simpoint_checkpoint should be a boolean

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



Change subject: configs: restore_simpoint_checkpoint should be a boolean
..

configs: restore_simpoint_checkpoint should be a boolean

The --restore_simpoint_checkpoint option is a boolean;
however if no default value is supplied, optparse sets the
default value to None

This is not valid for argparse. Argparse recognizes the store_true
action and it is automatically treating the option as a boolean,
hence providing a default=False instead of default=None

Change-Id: I6b09edf6911be71a06001730be1232a1b5c8482c
Signed-off-by: Giacomo Travaglini 
---
M configs/common/Options.py
M configs/common/Simulation.py
2 files changed, 2 insertions(+), 1 deletion(-)



diff --git a/configs/common/Options.py b/configs/common/Options.py
index c48bfe6..b833531 100644
--- a/configs/common/Options.py
+++ b/configs/common/Options.py
@@ -305,6 +305,7 @@
 parser.add_option("--take-simpoint-checkpoints", action="store",  
type="string",

 help="")
 parser.add_option("--restore-simpoint-checkpoint", action="store_true",
+default=False,
 help="restore from a simpoint checkpoint taken with " +
  "--take-simpoint-checkpoints")

diff --git a/configs/common/Simulation.py b/configs/common/Simulation.py
index 067bc01..3b9efc0 100644
--- a/configs/common/Simulation.py
+++ b/configs/common/Simulation.py
@@ -710,7 +710,7 @@
 takeSimpointCheckpoints(simpoints, interval_length, cptdir)

 # Restore from SimPoint checkpoints
-elif options.restore_simpoint_checkpoint != None:
+elif options.restore_simpoint_checkpoint:
 restoreSimpointCheckpoint()

 else:

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/44765
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: I6b09edf6911be71a06001730be1232a1b5c8482c
Gerrit-Change-Number: 44765
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] Change in gem5/gem5[develop]: configs: Fix stats name in arm/fs_power.py

2021-04-21 Thread Hoa Nguyen (Gerrit) via gem5-dev
Hoa Nguyen has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/44626 )


Change subject: configs: Fix stats name in arm/fs_power.py
..

configs: Fix stats name in arm/fs_power.py

In the config, there are stats having name changed:
- overall_misses -> overallMisses
- sim_seconds -> simSeconds
- overall_accesses -> overallAccesses

JIRA: https://gem5.atlassian.net/browse/GEM5-957

Signed-off-by: Hoa Nguyen 
Change-Id: I35faa72b12320e6b41833f601eb23604358b3d42
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44626
Reviewed-by: Jason Lowe-Power 
Reviewed-by: Giacomo Travaglini 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M configs/example/arm/fs_power.py
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, but someone else must approve; Looks  
good to me, approved

  Giacomo Travaglini: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/configs/example/arm/fs_power.py  
b/configs/example/arm/fs_power.py

index 1c7b6b7..7ae9cf8 100644
--- a/configs/example/arm/fs_power.py
+++ b/configs/example/arm/fs_power.py
@@ -51,8 +51,8 @@
 # 2A per IPC, 3pA per cache miss
 # and then convert to Watt
 self.dyn =  "voltage * (2 * {}.ipc + 3 * 0.1 * " \
-"{}.dcache.overall_misses /  
sim_seconds)".format(cpu_path,
-  
cpu_path)
+"{}.dcache.overallMisses /  
simSeconds)".format(cpu_path,
+
cpu_path)

 self.st = "4 * temp"

 class CpuPowerOff(MathExprPowerModel):
@@ -72,10 +72,10 @@
 class L2PowerOn(MathExprPowerModel):
 def __init__(self, l2_path, **kwargs):
 super(L2PowerOn, self).__init__(**kwargs)
-# Example to report l2 Cache overall_accesses
+# Example to report l2 Cache overallAccesses
 # The estimated power is converted to Watt and will vary based
 # on the size of the cache
-self.dyn = "{}.overall_accesses * 0.18000".format(l2_path)
+self.dyn = "{}.overallAccesses * 0.18000".format(l2_path)
 self.st = "(voltage * 3)/10"

 class L2PowerOff(MathExprPowerModel):

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/44626
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: I35faa72b12320e6b41833f601eb23604358b3d42
Gerrit-Change-Number: 44626
Gerrit-PatchSet: 2
Gerrit-Owner: Hoa Nguyen 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Hoa Nguyen 
Gerrit-Reviewer: Jason Lowe-Power 
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]: util: Replace optparse with argparse

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


Change subject: util: Replace optparse with argparse
..

util: Replace optparse with argparse

JIRA: https://gem5.atlassian.net/browse/GEM5-543

Change-Id: Id270ed29f14199f4f8eb6eb5739451a43d100484
Signed-off-by: Giacomo Travaglini 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44512
Reviewed-by: Daniel Carvalho 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M util/checkpoint-tester.py
M util/checkpoint_aggregator.py
M util/cpt_upgrader.py
M util/gem5img.py
M util/gen_arm_fs_files.py
M util/memtest-soak.py
M util/o3-pipeview.py
M util/style/sort_includes.py
8 files changed, 162 insertions(+), 159 deletions(-)

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



diff --git a/util/checkpoint-tester.py b/util/checkpoint-tester.py
index e2051cd..2600644 100755
--- a/util/checkpoint-tester.py
+++ b/util/checkpoint-tester.py
@@ -39,7 +39,7 @@
 #c. Dump a checkpoint and end the simulation
 #d. Diff the new checkpoint with the original checkpoint N+1
 #
-# Note that '--' must be used to separate the script options from the
+# Note that '--' must be used to separate the script args from the
 # M5 command line.
 #
 # Caveats:
@@ -66,39 +66,40 @@

 import os, sys, re
 import subprocess
-import optparse
+import argparse

-parser = optparse.OptionParser()
+parser = argparse.ArgumentParser()

-parser.add_option('-i', '--interval', type='int')
-parser.add_option('-d', '--directory', default='checkpoint-test')
+parser.add_argument('-i', '--interval', type=int)
+parser.add_argument('-d', '--directory', default='checkpoint-test')
+parser.add_argument('cmdline', nargs='+', help='gem5 command line')

-(options, args) = parser.parse_args()
+args = parser.parse_args()

-interval = options.interval
+interval = args.interval

-if os.path.exists(options.directory):
-print('Error: test directory', options.directory, 'exists')
+if os.path.exists(args.directory):
+print('Error: test directory', args.directory, 'exists')
 print('   Tester needs to create directory from scratch')
 sys.exit(1)

-top_dir = options.directory
+top_dir = args.directory
 os.mkdir(top_dir)

 cmd_echo = open(os.path.join(top_dir, 'command'), 'w')
 print(' '.join(sys.argv), file=cmd_echo)
 cmd_echo.close()

-m5_binary = args[0]
+m5_binary = args.cmdline[0]

-options = args[1:]
+args = args.cmdline[1:]

 initial_args = ['--take-checkpoints', '%d,%d' % (interval, interval)]

 cptdir = os.path.join(top_dir, 'm5out')

 print('===> Running initial simulation.')
-subprocess.call([m5_binary] + ['-red', cptdir] + options + initial_args)
+subprocess.call([m5_binary] + ['-red', cptdir] + args + initial_args)

 dirs = os.listdir(cptdir)
 expr = re.compile('cpt\.([0-9]*)')
@@ -117,7 +118,7 @@
 for i in range(1, len(cpts)):
 print('===> Running test %d of %d.' % (i, len(cpts)-1))
 mydir = os.path.join(top_dir, 'test.%d' % i)
-subprocess.call([m5_binary] + ['-red', mydir] + options + initial_args  
+

+subprocess.call([m5_binary] + ['-red', mydir] + args + initial_args +
 ['--max-checkpoints' , '1', '--checkpoint-dir', cptdir,
  '--checkpoint-restore', str(i)])
 cpt_name = 'cpt.%d' % cpts[i]
diff --git a/util/checkpoint_aggregator.py b/util/checkpoint_aggregator.py
index dc0f867..60f015d 100755
--- a/util/checkpoint_aggregator.py
+++ b/util/checkpoint_aggregator.py
@@ -143,7 +143,7 @@

 if __name__ == "__main__":
 from argparse import ArgumentParser
-parser = ArgumentParser("usage: %prog [options] which "\
+parser = ArgumentParser(usage="%(prog)s [options] which "\

 "hold the checkpoints to be combined>")
 parser.add_argument("-o", "--output-dir", action="store",
 help="Output directory")
diff --git a/util/cpt_upgrader.py b/util/cpt_upgrader.py
index cf46b58..ee82a7a 100755
--- a/util/cpt_upgrader.py
+++ b/util/cpt_upgrader.py
@@ -260,26 +260,31 @@
 cpt.write(open(path, 'w'))

 if __name__ == '__main__':
-from optparse import OptionParser, SUPPRESS_HELP
-parser = OptionParser("usage: %prog [options] ")
-parser.add_option("-r", "--recurse", action="store_true",
-  help="Recurse through all subdirectories modifying "\
-   "each checkpoint that is found")
-parser.add_option("-N", "--no-backup", action="store_false",
-  dest="backup", default=True,
-  help="Do no backup each checkpoint before modifying  
it")

-parser.add_option("-v", "--verbose", action="store_true",
-  help="Print out debugging information as")
-parser.add_option("--get-cc-file", action="store_true",
-  # used during build; generate 

[gem5-dev] Re: Upstreaming power-gem5

2021-04-21 Thread Boris Shingarov via gem5-dev
Perfect.In accord with the latest email from Jason, I created GEM5-959:https://gem5.atlassian.net/browse/GEM5-959but I left the "Assignee" field blank as I will leave the choice to you whether you prefer to have your or my name in that field.-"Sandipan Das via gem5-dev"  wrote: -To: "Boris Shingarov" From: "Sandipan Das via gem5-dev" Date: 04/19/2021 09:09AMCc: "gem5 Developer List" , "Sandipan Das" Subject: [gem5-dev] Re: Upstreaming power-gem5Hi Boris,On 14/04/21 11:43 pm, Boris Shingarov wrote:> Hi Sandipan,> > I notice some of the commits (which were, if not blocking reviewing other > commits, but at least making comprehension of the whole body of commits harder > for me) are ready for merge, for example> https://urldefense.proofpoint.com/v2/url?u=https-3A__gem5-2Dreview.googlesource.com_c_public_gem5_-2B_42943=DwICAg=sPZ6DeHLiehUHQWKIrsNwWp3t7snrE-az24ztT0w7Jc=ecC5uu6ubGhPt6qQ8xWcSQh1QUJ8B1-CG4B9kRM0nd4=DI6zOlzR8c3l8AQxCfEXIndX4KH7YKA_u6nYj1gSFxU=-UyG89zz-zPUQzlLrjPlIVIQyFDe4w16PRIMrTvPCsw=  > > > Do you want to start merging (what Gerrit calls "submit") them?> Sure. Sorry I could not respond earlier as I was on vacation but going forward,I'll keep that in mind. Thanks for merging a few of the initial patches.- Sandipan___gem5-dev mailing list -- gem5-dev@gem5.orgTo 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] Change in gem5/gem5[develop]: base: Add warnings for legacy stats

2021-04-21 Thread Hoa Nguyen (Gerrit) via gem5-dev
Hoa Nguyen has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/44706 )



Change subject: base: Add warnings for legacy stats
..

base: Add warnings for legacy stats

Legacy stat is defined as a stat that doesn't belong to any
Stats::Group.

Change-Id: I8d426882b6bf7600998e181f18d1339ce82d5917
Signed-off-by: Hoa Nguyen 
---
M src/base/statistics.hh
1 file changed, 34 insertions(+), 3 deletions(-)



diff --git a/src/base/statistics.hh b/src/base/statistics.hh
index 63bfb5b..548c351 100644
--- a/src/base/statistics.hh
+++ b/src/base/statistics.hh
@@ -546,6 +546,10 @@
 : DataWrap(parent, name, unit, desc)
 {
 this->doInit();
+if (parent == nullptr && name != nullptr)
+warn(csprintf("`%s` is a legacy stat", name));
+else if (parent == nullptr)
+warn_once("Legacy stat exists");
 }

   public:
@@ -704,6 +708,10 @@
 : DataWrap(parent, name, unit, desc),
   proxy(NULL)
 {
+if (parent == nullptr && name != nullptr)
+warn(csprintf("`%s` is a legacy stat", name));
+else if (parent == nullptr)
+warn_once("Legacy stat exists");
 }

 ~ValueBase() { if (proxy) delete proxy; }
@@ -1007,7 +1015,12 @@
const char *desc)
 : DataWrapVec(parent, name, unit, desc),
   storage(nullptr), _size(0)
-{}
+{
+if (parent == nullptr && name != nullptr)
+warn(csprintf("`%s` is a legacy stat", name));
+else if (parent == nullptr)
+warn_once("Legacy stat exists");
+}

 ~VectorBase()
 {
@@ -1150,7 +1163,12 @@
  const char *desc)
 : DataWrapVec2d(parent, name, unit,  
desc),

   x(0), y(0), _size(0), storage(nullptr)
-{}
+{
+if (parent == nullptr && name != nullptr)
+warn(csprintf("`%s` is a legacy stat", name));
+else if (parent == nullptr)
+warn_once("Legacy stat exists");
+}

 ~Vector2dBase()
 {
@@ -1311,6 +1329,10 @@
  const char *desc)
 : DataWrap(parent, name, unit, desc)
 {
+if (parent == nullptr && name != nullptr)
+warn(csprintf("`%s` is a legacy stat", name));
+else if (parent == nullptr)
+warn_once("Legacy stat exists");
 }

 /**
@@ -1409,7 +1431,12 @@
const char *desc)
 : DataWrapVec(parent, name, unit,  
desc),

   storage(NULL)
-{}
+{
+if (parent == nullptr && name != nullptr)
+warn(csprintf("`%s` is a legacy stat", name));
+else if (parent == nullptr)
+warn_once("Legacy stat exists");
+}

 ~VectorDistBase()
 {
@@ -2452,6 +2479,10 @@
const char *desc)
 : DataWrap(parent, name, unit, desc)
 {
+if (parent == nullptr && name != nullptr)
+warn(csprintf("`%s` is a legacy stat", name));
+else if (parent == nullptr)
+warn_once("Legacy stat exists");
 }

 /**

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/44706
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: I8d426882b6bf7600998e181f18d1339ce82d5917
Gerrit-Change-Number: 44706
Gerrit-PatchSet: 1
Gerrit-Owner: Hoa Nguyen 
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: LTO causing headaches for users

2021-04-21 Thread Gabe Black via gem5-dev
You would basically undo this change:

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

except there should also be an option to re-enable LTO for the other
builds. Like I said, for some users (myself included) LTO actually speeds
up the build.

Gabe

On Tue, Apr 20, 2021 at 9:55 PM Bobby Bruce  wrote:

> I did create a patch for this:
> https://gem5-review.googlesource.com/c/public/gem5/+/44565. I _think_
> this is the correct way to make LTO for .fast only. I won't submit until
> the community agrees this is the best course of action.
>
> Kind regards,
> Bobby
> --
> Dr. Bobby R. Bruce
> Room 2235,
> Kemper Hall, UC Davis
> Davis,
> CA, 95616
>
> web: https://www.bobbybruce.net
>
>
> On Tue, Apr 20, 2021 at 5:07 PM Gabe Black via gem5-dev 
> wrote:
>
>> I think that's reasonable. I didn't think the performance difference
>> would be as much as it is, since my machine has more cores than that, 12
>> with 2 threads per core. It actually speeds up the build for people who
>> have enough cores which offset the extra work the linker has to do, but I
>> suspect those people are not the common case. We should still make it
>> possible to use a flag to enable LTO explicitly for a given build, so
>> basically switch the polarity of the default and the override flag.
>>
>> Gabe
>>
>> On Tue, Apr 20, 2021 at 7:54 AM Jason Lowe-Power via gem5-dev <
>> gem5-dev@gem5.org> wrote:
>>
>>> Hi all,
>>>
>>> It seems the recent change to enable LTO by default is causing more harm
>>> than good. Especially for people debugging, it's a large overhead to wait
>>> 2-5 minutes for gem5 to link in opt mode. I even have encountered this with
>>> a 6 core 3.5+GHz Ryzen. It's quite annoying. We've gotten at least 3
>>> different posts on gem5-users and gem5-dev complaining about this. I think
>>> this is a strong sign we need to change something.
>>>
>>> I suggest *only enabling* LTO for fast builds and not for any other.
>>>
>>> Thoughts?
>>>
>>> Jason
>>> ___
>>> 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 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