[gem5-dev] Re: deprecating warn_once

2021-07-27 Thread Daniel Carvalho via gem5-dev
 Hello,
I like the idea of GEM5_ONCE, but as it would become part of the API users 
could definitely use in unforeseen ways (e.g., debugging). I am not saying this 
is a bad thing, but it is something to consider.
Regards,Daniel
___
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: Add the "print_suppressions=0" option to the LSAN warning.

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


Change subject: scons: Add the "print_suppressions=0" option to the LSAN  
warning.

..

scons: Add the "print_suppressions=0" option to the LSAN warning.

This is part of what SCons uses internally, and is probably what someone
using LSAN_OPTIONS would want to use externally too.

Change-Id: I413c680829e0edab76598122637e3236c35e8209
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48645
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
Reviewed-by: Gabe Black 
---
M SConstruct
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/SConstruct b/SConstruct
index d9d2db3..617c7b4 100755
--- a/SConstruct
+++ b/SConstruct
@@ -408,13 +408,13 @@
 sanitizers.append('address')
 suppressions_file = Dir('util').File('lsan-suppressions').get_abspath()
 suppressions_opt = 'suppressions=%s' % suppressions_file
-main['ENV']['LSAN_OPTIONS'] = ':'.join([suppressions_opt,
-'print_suppressions=0'])
+suppressions_opts  
= ':'.join([suppressions_opt, 'print_suppressions=0'])

+main['ENV']['LSAN_OPTIONS'] = suppressions_opts
 print()
 warning('To suppress false positive leaks, set the LSAN_OPTIONS '
 'environment variable to "%s" when running gem5' %
-suppressions_opt)
-warning('LSAN_OPTIONS=%s' % suppressions_opt)
+suppressions_opts)
+warning('LSAN_OPTIONS=%s' % suppressions_opts)
 print()
 if sanitizers:
 sanitizers = ','.join(sanitizers)



1 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/+/48645
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: I413c680829e0edab76598122637e3236c35e8209
Gerrit-Change-Number: 48645
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
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: Get rid of some redundant text in a print out.

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


Change subject: scons: Get rid of some redundant text in a print out.
..

scons: Get rid of some redundant text in a print out.

When printing the LSAN_OPTIONS setting to use, we were manually
prefixing "suppressions=" to it, but it already had that built into the
option. This made that text print twice. Remove the duplicate.

Change-Id: Ie599e02d0cf17bcf18278d72350831a2e0ac09f6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48644
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M SConstruct
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/SConstruct b/SConstruct
index c980300..d9d2db3 100755
--- a/SConstruct
+++ b/SConstruct
@@ -414,7 +414,7 @@
 warning('To suppress false positive leaks, set the LSAN_OPTIONS '
 'environment variable to "%s" when running gem5' %
 suppressions_opt)
-warning('LSAN_OPTIONS=suppressions=%s' % suppressions_opt)
+warning('LSAN_OPTIONS=%s' % suppressions_opt)
 print()
 if sanitizers:
 sanitizers = ','.join(sanitizers)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48644
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: Ie599e02d0cf17bcf18278d72350831a2e0ac09f6
Gerrit-Change-Number: 48644
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Giacomo Travaglini 
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,test: Don't -Wall or -Werror for googletest libraries.

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


Change subject: scons,test: Don't -Wall or -Werror for googletest libraries.
..

scons,test: Don't -Wall or -Werror for googletest libraries.

These libraries come from elsewhere, and so there's no reason to worry
about warnings. We can't fix them even if they crop up. Also, set
CCFLAGS to avoid having a mixture of gem5 flags and googletest flags.

Change-Id: I19b07747a43cebb263ae1546c75631cff1f13132
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48368
Maintainer: Gabe Black 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
Reviewed-by: Bobby R. Bruce 
Reviewed-by: Daniel Carvalho 
---
M ext/googletest/SConscript
1 file changed, 2 insertions(+), 3 deletions(-)

Approvals:
  Daniel Carvalho: 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/ext/googletest/SConscript b/ext/googletest/SConscript
index e5241d6..5a4b691 100644
--- a/ext/googletest/SConscript
+++ b/ext/googletest/SConscript
@@ -43,9 +43,8 @@
 main.Append(CPPPATH=[gtest_include, gmock_include])
 main.Append(LIBPATH=[build])

-env = main.Clone(CPPFLAGS=['-g', '-Wall', '-Wextra', '-pthread',
-   '-Wno-undef', '-isystem', str(gtest_include),
-   '-isystem', str(gmock_include)])
+env = main.Clone(CCFLAGS=['-g', '-pthread', '-Wno-undef', '-isystem',
+  str(gtest_include), '-isystem',  
str(gmock_include)])

 env.Append(CPPPATH=[gtest_base, gmock_base])

 gtest_all = env.Object(gtest_src.File('gtest-all.cc'))

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48368
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: I19b07747a43cebb263ae1546c75631cff1f13132
Gerrit-Change-Number: 48368
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Gabe Black 
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] Re: deprecating warn_once

2021-07-27 Thread Gabe Black via gem5-dev
Yeah, that's not a bad option either. Between the two, I suggested
GEM5_ONCE so that the _once version wouldn't be as inconsistent with the
normal version of warn, and even though the GEM5_ONCE macro probably
wouldn't be useful outside of warn, it's a pretty generic mechanism and
could be. For instance, I think there's exactly one instance of a *_once
macro being used in gem5 (I forget if it's inform_once, or hack_once), but
if we decide those are worth bringing forward, GEM5_ONCE could be used with
those too.

Keeping in mind the inconsistent format, GEM5_WARN_ONCE is fairly verbose,
but given its infrequent usage that's not a big deal. Turning warn into
GEM5_WARN would be a bigger deal since I think that's used quite a lot, and
that name is twice as long. Renaming warn would also have major impact on
existing code, and would be unnecessary if warn turned into a normal
function.

So, I don't think renaming warn_once would be the *wrong* approach, but
between the two I do have a minor preference for splitting out the
"once"-ness into a macro separately.

This is also mostly an academic conversation right now, since until we move
our minimum clang version up to 9, and/or move to c++20, I can't turn even
the non _once version of those macros into normal functions.

Gabe

On Tue, Jul 27, 2021 at 10:58 AM Steve Reinhardt  wrote:

> Wouldn't we get the same net result by just renaming warn_once() to
> GEM5_WARN_ONCE()?  Seems simpler .
>
> Steve
>
> On Mon, Jul 26, 2021 at 11:03 PM Gabe Black  wrote:
>
>> Or I should say without un-namespaced macros (GEM5_ prefixed), since
>> GEM5_ONCE itself would be a macro.
>>
>> Gabe
>>
>> On Mon, Jul 26, 2021 at 11:01 PM Gabe Black  wrote:
>>
>>> No, not that I'm aware of. It would just be to make it feasible to
>>> implement the warn_once functionality without using macros. With c++20, I
>>> can more or less get it to work with some minor template syntax,
>>> warn("xyz"), but that relies on the source location (file, line,
>>> column which may be iffy) to be unique, which is defeated by, for instance,
>>> putting multiple warn_once-s in a macro which then all look like they came
>>> from the location of the macro in the source.
>>>
>>> Gabe
>>>
>>> On Mon, Jul 26, 2021 at 9:01 PM Steve Reinhardt 
>>> wrote:
>>>
 Hi Gabe,

 Is there a use case for GEM5_ONCE() other than warn_once()?

 Thanks,

 Steve


 On Mon, Jul 26, 2021 at 6:06 PM Gabe Black via gem5-dev <
 gem5-dev@gem5.org> wrote:

> Hi folks. I'm continuing to research how to turn warn, panic, etc,
> into regular functions instead of macros, and one particularly sticky
> problem is how to ensure something like warn_once only happens once.
>
> Right now, the macro warn_once expands to something like this:
>
> do {
> static bool once = false;
> if (!once) {
> warn(...);
> once = true;
> }
> } while (0)
>
> So, a static bool is declared which guards the warn. The problem with
> this is that it requires declaring a static bool at the call sight, which
> as you can imagine is hard to do without macros.
>
> As far as how it *might* be done, if we can extract the location of
> the call (file name, source line, column offset), then we could possibly
> use a template holding a static bool.
>
> template <${source location info}>
> warn_once(...)
> {
> static bool once = false;
> 
> }
>
> There are a few problems with this approach. First, the source
> location would have to be broken down into individual primitive types, 
> like
> an int for the line number, and individual characters for the file name
> string, since you can't use a struct as a non-type template parameter 
> until
> c++20. This *might* be possible using fancy template tricks, but it would
> be a bit ugly and may gum up the compiler, slowing builds.
>
> Second, if the column information is not unique (I think the standard
> is not very specific about what it maps to), then the "once" will apply to
> more than one thing. This would be particularly true if a macro whose
> contents all share the same source location had multiple warn_once-s in 
> it.
>
> I did a check with grep, and warn_once shows up in all of gem5 about
> 80 times, so while it's used, it's not used extensively.
>
> What I would like to propose is that instead of having warn_once(...),
> we add a new macro called GEM5_ONCE which would be defined something like
> the following:
>
> #define GEM5_ONCE(statement) do { \
> static [[maybe_unused]] bool _once = ([](){ statement; }(), true);
> \
> while (0)
>
> Then when you want to warn once (or anything else once), you'd write
> it like this:
>
> GEM5_ONCE(warn("blah blah"));
>
> This is *slightly* more verbose, 

[gem5-dev] Change in gem5/gem5[develop]: fastmodel: Use Iris API to access memory

2021-07-27 Thread Yu-hsin Wang (Gerrit) via gem5-dev
Yu-hsin Wang has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/45581 )


Change subject: fastmodel: Use Iris API to access memory
..

fastmodel: Use Iris API to access memory

Memory space is not always outside of the CPU. For example the tightly
coupled memory (TCM) is inside of the core. To make gdb access those
kind of memory, we should use Iris memory API to read and write memory.
If we access a memory address not inside the CPU with Iris memory API.
The CPU would fire a request via amba transport_dbg. So the change also
covers the original behavior.

Change-Id: Ie223ab12f9a746ebafa21026a8680222f6ebd593
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45581
Reviewed-by: Gabe Black 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M src/arch/arm/fastmodel/iris/thread_context.cc
1 file changed, 9 insertions(+), 3 deletions(-)

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



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

index 716ffad..87e4e77 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.cc
+++ b/src/arch/arm/fastmodel/iris/thread_context.cc
@@ -503,9 +503,15 @@
 void
 ThreadContext::sendFunctional(PacketPtr pkt)
 {
-auto *iris_cpu = dynamic_cast(getCpuPtr());
-assert(iris_cpu);
-iris_cpu->evs_base_cpu->sendFunc(pkt);
+auto addr = pkt->getAddr();
+auto size = pkt->getSize();
+auto data = pkt->getPtr();
+
+pkt->makeResponse();
+if (pkt->isRead())
+readMem(addr, data, size);
+else
+writeMem(addr, data, size);
 }

 ThreadContext::Status

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45581
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: Ie223ab12f9a746ebafa21026a8680222f6ebd593
Gerrit-Change-Number: 45581
Gerrit-PatchSet: 5
Gerrit-Owner: Yu-hsin Wang 
Gerrit-Reviewer: Earl Ou 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Philip Metzler 
Gerrit-Reviewer: Yu-hsin Wang 
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: Increase the minimum version of gcc to 7.

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


Change subject: scons: Increase the minimum version of gcc to 7.
..

scons: Increase the minimum version of gcc to 7.

This was bumped up to 7 by policy, but the SConsctruct was still
enforcing the old minimum of version 5.

Change-Id: I91966f95b18451f880af279dae286119f7b282d6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48512
Reviewed-by: Daniel Carvalho 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M SConstruct
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/SConstruct b/SConstruct
index ca1bc7b..c980300 100755
--- a/SConstruct
+++ b/SConstruct
@@ -351,8 +351,8 @@
   "src/SConscript to support that compiler.")))

 if main['GCC']:
-if compareVersions(main['CXXVERSION'], "5") < 0:
-error('gcc version 5 or newer required.\n'
+if compareVersions(main['CXXVERSION'], "7") < 0:
+error('gcc version 7 or newer required.\n'
   'Installed version:', main['CXXVERSION'])

 # Add the appropriate Link-Time Optimization (LTO) flags if  
`--with-lto` is




1 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/+/48512
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: I91966f95b18451f880af279dae286119f7b282d6
Gerrit-Change-Number: 48512
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Gabe Black 
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]: dev: Drop include of drm/drm.h in kfd_ioctl.h.

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


Change subject: dev: Drop include of drm/drm.h in kfd_ioctl.h.
..

dev: Drop include of drm/drm.h in kfd_ioctl.h.

I don't have this header on one of the machines I build on, so this is
breaking the build for me. Removing this include seems to make the
build succeed, implying that it's not actually necessary. I looked at
the file it's used in and didn't see anything that looked like it came
from this header file.

Change-Id: If4a29063d6d0d25904183cab78c9713ff1f8daa6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48603
Reviewed-by: Matthew Poremba 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M src/dev/hsa/kfd_ioctl.h
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/src/dev/hsa/kfd_ioctl.h b/src/dev/hsa/kfd_ioctl.h
index e1286dc..c953787 100644
--- a/src/dev/hsa/kfd_ioctl.h
+++ b/src/dev/hsa/kfd_ioctl.h
@@ -24,7 +24,6 @@
 #define KFD_IOCTL_H_INCLUDED

 #include 
-#include 
 #include 
 #include 


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48603
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: If4a29063d6d0d25904183cab78c9713ff1f8daa6
Gerrit-Change-Number: 48603
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Kyle Roarty 
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]: mem: Use the new "debug" namespace, and not "Debug".

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


Change subject: mem: Use the new "debug" namespace, and not "Debug".
..

mem: Use the new "debug" namespace, and not "Debug".

The "Debug" namespace is deprecated and has been replaced by "debug".

Change-Id: Ic8e9082361a6717f3b07990dbaa1a66b0926f000
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48647
Reviewed-by: Giacomo Travaglini 
Maintainer: Giacomo Travaglini 
Tested-by: kokoro 
---
M src/mem/cache/prefetch/queued.cc
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/mem/cache/prefetch/queued.cc  
b/src/mem/cache/prefetch/queued.cc

index dec71f2..ae4913d 100644
--- a/src/mem/cache/prefetch/queued.cc
+++ b/src/mem/cache/prefetch/queued.cc
@@ -517,7 +517,7 @@
 queue.insert(it, dpp);
 }

-if (Debug::HWPrefetchQueue)
+if (debug::HWPrefetchQueue)
 printQueue(queue);
 }




1 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/+/48647
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: Ic8e9082361a6717f3b07990dbaa1a66b0926f000
Gerrit-Change-Number: 48647
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Giacomo Travaglini 
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]: fastmodel: Minimally implement reading MiscRegs for the CortexR52.

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


Change subject: fastmodel: Minimally implement reading MiscRegs for the  
CortexR52.

..

fastmodel: Minimally implement reading MiscRegs for the CortexR52.

This currently supports only the CPSR and SPSR currently. The CPSR is
needed to be able to read the PC since that also reads other related
info which ultimately comes from the CPSR. The SPSR is also set up
since it was easy to do at the same time.

Change-Id: I977fde47c81927f4972d4da2e781df306dfa3f4e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/46139
Reviewed-by: Giacomo Travaglini 
Maintainer: Giacomo Travaglini 
Tested-by: kokoro 
---
M src/arch/arm/fastmodel/CortexR52/thread_context.cc
M src/arch/arm/fastmodel/CortexR52/thread_context.hh
2 files changed, 647 insertions(+), 4 deletions(-)

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



diff --git a/src/arch/arm/fastmodel/CortexR52/thread_context.cc  
b/src/arch/arm/fastmodel/CortexR52/thread_context.cc

index 62c7a8c..5bedf5a 100644
--- a/src/arch/arm/fastmodel/CortexR52/thread_context.cc
+++ b/src/arch/arm/fastmodel/CortexR52/thread_context.cc
@@ -90,6 +90,8 @@

 pcRscId = extractResourceId(resources, "R15");

+extractResourceMap(miscRegIds, resources, miscRegIdxNameMap);
+
 extractResourceMap(intReg32Ids, resources, intReg32IdxNameMap);
 extractResourceMap(ccRegIds, resources, ccRegIdxNameMap);
 }
@@ -168,6 +170,642 @@
 return bpSpaceIds;
 }

+Iris::ThreadContext::IdxNameMap CortexR52TC::miscRegIdxNameMap({
+{ ArmISA::MISCREG_CPSR, "CPSR" },
+{ ArmISA::MISCREG_SPSR, "SPSR" },
+// ArmISA::MISCREG_SPSR_FIQ?
+// ArmISA::MISCREG_SPSR_IRQ?
+// ArmISA::MISCREG_SPSR_SVC?
+// ArmISA::MISCREG_SPSR_MON?
+// ArmISA::MISCREG_SPSR_ABT?
+// ArmISA::MISCREG_SPSR_HYP?
+// ArmISA::MISCREG_SPSR_UND?
+// ArmISA::MISCREG_ELR_HYP?
+// ArmISA::MISCREG_FPSID?
+// ArmISA::MISCREG_FPSCR?
+// ArmISA::MISCREG_MVFR1?
+// ArmISA::MISCREG_MVFR0?
+// ArmISA::MISCREG_FPEXC?
+
+// Helper registers
+// ArmISA::MISCREG_CPSR_MODE?
+// ArmISA::MISCREG_CPSR_Q?
+// ArmISA::MISCREG_FPSCR_EXC?
+// ArmISA::MISCREG_FPSCR_QC?
+// ArmISA::MISCREG_LOCKADDR?
+// ArmISA::MISCREG_LOCKFLAG?
+// ArmISA::MISCREG_PRRR_MAIR0?
+// ArmISA::MISCREG_PRRR_MAIR0_NS?
+// ArmISA::MISCREG_PRRR_MAIR0_S?
+// ArmISA::MISCREG_NMRR_MAIR1?
+// ArmISA::MISCREG_NMRR_MAIR1_NS?
+// ArmISA::MISCREG_NMRR_MAIR1_S?
+// ArmISA::MISCREG_PMXEVTYPER_PMCCFILTR?
+// ArmISA::MISCREG_SCTLR_RST?
+// ArmISA::MISCREG_SEV_MAILBOX?
+
+// AArch32 CP14 registers (debug/trace/ThumbEE/Jazelle control)
+// ArmISA::MISCREG_DBGDIDR?
+// ArmISA::MISCREG_DBGDSCRint?
+// ArmISA::MISCREG_DBGDCCINT?
+// ArmISA::MISCREG_DBGDTRTXint?
+// ArmISA::MISCREG_DBGDTRRXint?
+// ArmISA::MISCREG_DBGWFAR?
+// ArmISA::MISCREG_DBGVCR?
+// ArmISA::MISCREG_DBGDTRRXext?
+// ArmISA::MISCREG_DBGDSCRext?
+// ArmISA::MISCREG_DBGDTRTXext?
+// ArmISA::MISCREG_DBGOSECCR?
+// ArmISA::MISCREG_DBGBVR0?
+// ArmISA::MISCREG_DBGBVR1?
+// ArmISA::MISCREG_DBGBVR2?
+// ArmISA::MISCREG_DBGBVR3?
+// ArmISA::MISCREG_DBGBVR4?
+// ArmISA::MISCREG_DBGBVR5?
+// ArmISA::MISCREG_DBGBCR0?
+// ArmISA::MISCREG_DBGBCR1?
+// ArmISA::MISCREG_DBGBCR2?
+// ArmISA::MISCREG_DBGBCR3?
+// ArmISA::MISCREG_DBGBCR4?
+// ArmISA::MISCREG_DBGBCR5?
+// ArmISA::MISCREG_DBGWVR0?
+// ArmISA::MISCREG_DBGWVR1?
+// ArmISA::MISCREG_DBGWVR2?
+// ArmISA::MISCREG_DBGWVR3?
+// ArmISA::MISCREG_DBGWCR0?
+// ArmISA::MISCREG_DBGWCR1?
+// ArmISA::MISCREG_DBGWCR2?
+// ArmISA::MISCREG_DBGWCR3?
+// ArmISA::MISCREG_DBGDRAR?
+// ArmISA::MISCREG_DBGBXVR4?
+// ArmISA::MISCREG_DBGBXVR5?
+// ArmISA::MISCREG_DBGOSLAR?
+// ArmISA::MISCREG_DBGOSLSR?
+// ArmISA::MISCREG_DBGOSDLR?
+// ArmISA::MISCREG_DBGPRCR?
+// ArmISA::MISCREG_DBGDSAR?
+// ArmISA::MISCREG_DBGCLAIMSET?
+// ArmISA::MISCREG_DBGCLAIMCLR?
+// ArmISA::MISCREG_DBGAUTHSTATUS?
+// ArmISA::MISCREG_DBGDEVID2?
+// ArmISA::MISCREG_DBGDEVID1?
+// ArmISA::MISCREG_DBGDEVID0?
+// ArmISA::MISCREG_TEECR? not in ARM DDI 0487A.b+
+// ArmISA::MISCREG_JIDR?
+// ArmISA::MISCREG_TEEHBR? not in ARM DDI 0487A.b+
+// ArmISA::MISCREG_JOSCR?
+// ArmISA::MISCREG_JMCR?
+
+// AArch32 CP15 registers (system control)
+

[gem5-dev] Change in gem5/gem5[release-staging-v21-1]: docker-util: Update the gcn-gpu docker image Cloud Bucket

2021-07-27 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/48663 )



Change subject: docker-util: Update the gcn-gpu docker image Cloud Bucket
..

docker-util: Update the gcn-gpu docker image Cloud Bucket

This is updated for the gem5 v21.1 release.

Change-Id: I84e663afdca41045a73e2fc25b87b53a6063202c
---
M util/dockerfiles/gcn-gpu/Dockerfile
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/util/dockerfiles/gcn-gpu/Dockerfile  
b/util/dockerfiles/gcn-gpu/Dockerfile

index 360ab1f..b307996 100644
--- a/util/dockerfiles/gcn-gpu/Dockerfile
+++ b/util/dockerfiles/gcn-gpu/Dockerfile
@@ -70,7 +70,7 @@

 WORKDIR /ROCclr
 # The patch allows us to avoid building blit kernels on-the-fly in gem5
-RUN wget -q -O - dist.gem5.org/dist/develop/rocm_patches/ROCclr.patch |  
git apply -v
+RUN wget -q -O - dist.gem5.org/dist/v21-1/rocm_patches/ROCclr.patch | git  
apply -v


 WORKDIR /ROCclr/build
 RUN cmake -DOPENCL_DIR="/ROCm-OpenCL-Runtime" \

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


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

[gem5-dev] Change in gem5/gem5[release-staging-v21-1]: scons: Remove -Werror for the gem5 21.1 release

2021-07-27 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/48584 )


Change subject: scons: Remove -Werror for the gem5 21.1 release
..

scons: Remove -Werror for the gem5 21.1 release

While gem5 compiles on all our supported compilers, removing the -Werror
flag on the stable branch ensures that, as new compilers are released
with stricters warnings, gem5 remains compilable.

Change-Id: If306785e3f0822e1c435e1f10bf507a9e7a87eb6
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48584
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M SConstruct
1 file changed, 0 insertions(+), 6 deletions(-)

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



diff --git a/SConstruct b/SConstruct
index ca1bc7b..1903756 100755
--- a/SConstruct
+++ b/SConstruct
@@ -330,12 +330,6 @@
 if GetOption('gold_linker'):
 main.Append(LINKFLAGS='-fuse-ld=gold')

-# Treat warnings as errors but white list some warnings that we
-# want to allow (e.g., deprecation warnings).
-main.Append(CCFLAGS=['-Werror',
- '-Wno-error=deprecated-declarations',
- '-Wno-error=deprecated',
-])
 else:
 error('\n'.join((
   "Don't know what compiler options to use for your compiler.",

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


Gerrit-Project: public/gem5
Gerrit-Branch: release-staging-v21-1
Gerrit-Change-Id: If306785e3f0822e1c435e1f10bf507a9e7a87eb6
Gerrit-Change-Number: 48584
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
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[release-staging-v21-1]: misc: Update the version to v21.1.0.0

2021-07-27 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/48583 )


Change subject: misc: Update the version to v21.1.0.0
..

misc: Update the version to v21.1.0.0

Change-Id: I4174611bdaf68673f77a446e979776ad502ae20b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48583
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M ext/testlib/configuration.py
M src/Doxyfile
M src/base/version.cc
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/ext/testlib/configuration.py b/ext/testlib/configuration.py
index 1fffab4..c3d328d 100644
--- a/ext/testlib/configuration.py
+++ b/ext/testlib/configuration.py
@@ -213,7 +213,7 @@
   os.pardir,
   os.pardir))
 defaults.result_path = os.path.join(os.getcwd(), 'testing-results')
-defaults.resource_url = 'http://dist.gem5.org/dist/develop'
+defaults.resource_url = 'http://dist.gem5.org/dist/v21-1'
 defaults.resource_path =  
os.path.abspath(os.path.join(defaults.base_dir,

 'tests',
 'gem5',
diff --git a/src/Doxyfile b/src/Doxyfile
index a557e01..ef70b54 100644
--- a/src/Doxyfile
+++ b/src/Doxyfile
@@ -31,7 +31,7 @@
 # This could be handy for archiving the generated documentation or
 # if some version control system is used.

-PROJECT_NUMBER = DEVELOP-FOR-v21.1
+PROJECT_NUMBER = v21.1.0.0

 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
 # base path where the generated documentation will be put.
diff --git a/src/base/version.cc b/src/base/version.cc
index 6e4f3a7..50ffd40 100644
--- a/src/base/version.cc
+++ b/src/base/version.cc
@@ -32,6 +32,6 @@
 /**
  * @ingroup api_base_utils
  */
-const char *gem5Version = "[DEVELOP-FOR-V21.01]";
+const char *gem5Version = "21.1.0.0";

 } // namespace gem5

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


Gerrit-Project: public/gem5
Gerrit-Branch: release-staging-v21-1
Gerrit-Change-Id: I4174611bdaf68673f77a446e979776ad502ae20b
Gerrit-Change-Number: 48583
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
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] Re: "epic" Jira issue to track multi-ISA gem5

2021-07-27 Thread Bobby Bruce via gem5-dev
This will make things so much better. I very much support it.

Thanks for creating the Jira epic for tracking this.
--
Dr. Bobby R. Bruce
Room 3050,
Kemper Hall, UC Davis
Davis,
CA, 95616

web: https://www.bobbybruce.net


On Tue, Jul 27, 2021 at 3:42 AM Giacomo Travaglini via gem5-dev <
gem5-dev@gem5.org> wrote:

> This is great, thanks Gabe!
>
> > -Original Message-
> > From: Gabe Black via gem5-dev 
> > Sent: 25 July 2021 12:45
> > To: gem5 Developer List ; Earl Ou
> > 
> > Cc: Gabe Black 
> > Subject: [gem5-dev] "epic" Jira issue to track multi-ISA gem5
> >
> > To help lay out a roadmap and scope for my ongoing effort to make gem5
> > support more than one ISA at a time, I created an "epic" issue here:
> >
> > https://gem5.atlassian.net/browse/GEM5-1048
> >
> >
> > The sub-tasks are linked off of that one, and I put a bit of explanation
> under
> > each one. I tried to be fairly thorough, but of course I could have
> forgotten
> > something, or there may even be aspects that I/we aren't aware of yet.
> >
> > Gabe
> 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 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: deprecating warn_once

2021-07-27 Thread Steve Reinhardt via gem5-dev
Wouldn't we get the same net result by just renaming warn_once() to
GEM5_WARN_ONCE()?  Seems simpler .

Steve

On Mon, Jul 26, 2021 at 11:03 PM Gabe Black  wrote:

> Or I should say without un-namespaced macros (GEM5_ prefixed), since
> GEM5_ONCE itself would be a macro.
>
> Gabe
>
> On Mon, Jul 26, 2021 at 11:01 PM Gabe Black  wrote:
>
>> No, not that I'm aware of. It would just be to make it feasible to
>> implement the warn_once functionality without using macros. With c++20, I
>> can more or less get it to work with some minor template syntax,
>> warn("xyz"), but that relies on the source location (file, line,
>> column which may be iffy) to be unique, which is defeated by, for instance,
>> putting multiple warn_once-s in a macro which then all look like they came
>> from the location of the macro in the source.
>>
>> Gabe
>>
>> On Mon, Jul 26, 2021 at 9:01 PM Steve Reinhardt  wrote:
>>
>>> Hi Gabe,
>>>
>>> Is there a use case for GEM5_ONCE() other than warn_once()?
>>>
>>> Thanks,
>>>
>>> Steve
>>>
>>>
>>> On Mon, Jul 26, 2021 at 6:06 PM Gabe Black via gem5-dev <
>>> gem5-dev@gem5.org> wrote:
>>>
 Hi folks. I'm continuing to research how to turn warn, panic, etc, into
 regular functions instead of macros, and one particularly sticky problem is
 how to ensure something like warn_once only happens once.

 Right now, the macro warn_once expands to something like this:

 do {
 static bool once = false;
 if (!once) {
 warn(...);
 once = true;
 }
 } while (0)

 So, a static bool is declared which guards the warn. The problem with
 this is that it requires declaring a static bool at the call sight, which
 as you can imagine is hard to do without macros.

 As far as how it *might* be done, if we can extract the location of the
 call (file name, source line, column offset), then we could possibly use a
 template holding a static bool.

 template <${source location info}>
 warn_once(...)
 {
 static bool once = false;
 
 }

 There are a few problems with this approach. First, the source location
 would have to be broken down into individual primitive types, like an int
 for the line number, and individual characters for the file name string,
 since you can't use a struct as a non-type template parameter until c++20.
 This *might* be possible using fancy template tricks, but it would be a bit
 ugly and may gum up the compiler, slowing builds.

 Second, if the column information is not unique (I think the standard
 is not very specific about what it maps to), then the "once" will apply to
 more than one thing. This would be particularly true if a macro whose
 contents all share the same source location had multiple warn_once-s in it.

 I did a check with grep, and warn_once shows up in all of gem5 about 80
 times, so while it's used, it's not used extensively.

 What I would like to propose is that instead of having warn_once(...),
 we add a new macro called GEM5_ONCE which would be defined something like
 the following:

 #define GEM5_ONCE(statement) do { \
 static [[maybe_unused]] bool _once = ([](){ statement; }(), true); \
 while (0)

 Then when you want to warn once (or anything else once), you'd write it
 like this:

 GEM5_ONCE(warn("blah blah"));

 This is *slightly* more verbose, but warn_once is only used 80 times in
 the whole code base. Also the macro is namespaced now, which is a nice
 improvement.

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

[gem5-dev] Change in gem5/gem5[develop]: util: Fix gerrit bot commit subject parser

2021-07-27 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/48586 )


Change subject: util: Fix gerrit bot commit subject parser
..

util: Fix gerrit bot commit subject parser

Currently, if the commit subject does have tags, the parser will
return the list of tags as a NoneType object, which will be
iterated later. This caused the gerrit bot to fail.

This change lets the parser return the list of tags as an empty
list rather than a NoneType object. Also, a commit subject without
a semicolon `:` will be assumed as having no tags and the whole
subject is the commit message.

Signed-off-by: Hoa Nguyen 
Change-Id: Ie8c90e14bb85c4ce1c583121d02e75aa87db7811
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48586
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M util/gerrit-bot/util.py
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/util/gerrit-bot/util.py b/util/gerrit-bot/util.py
index 31b9fcc..d836690 100644
--- a/util/gerrit-bot/util.py
+++ b/util/gerrit-bot/util.py
@@ -30,9 +30,10 @@
 parsed_subject = subject.split(":", maxsplit = 1)

 # If the subject does not have a colon, it either does not have tags
-# or does not have a message
+# or does not have a message. In this case, we assume that the subject
+# is the commit message.
 if len(parsed_subject) <= 1:
-return None, None
+return [], parsed_subject[0]

 tags = [ tag.strip() for tag in parsed_subject[0].split(",") ]
 message = parsed_subject[1]

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48586
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: Ie8c90e14bb85c4ce1c583121d02e75aa87db7811
Gerrit-Change-Number: 48586
Gerrit-PatchSet: 2
Gerrit-Owner: Hoa Nguyen 
Gerrit-Reviewer: Bobby R. Bruce 
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: Make --with-asan work with more versions of the python lib.

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


Change subject: util: Make --with-asan work with more versions of the  
python lib.

..

util: Make --with-asan work with more versions of the python lib.

The version of the python library on my system is libpython3.9.so, not
libpython3.so. Generalize the line in lsan-suppressions to cover this
version as well.

Change-Id: Iaee9a7767eb5f735862a3716c796213a43c5f9e5
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48643
Reviewed-by: Giacomo Travaglini 
Maintainer: Giacomo Travaglini 
Tested-by: kokoro 
---
M util/lsan-suppressions
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/util/lsan-suppressions b/util/lsan-suppressions
index 18450d6..5252c06 100644
--- a/util/lsan-suppressions
+++ b/util/lsan-suppressions
@@ -1,2 +1,2 @@
 # Suppress detection of leaks from within the python3 interpreter.
-leak:libpython3.so
+leak:libpython3*.so

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48643
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: Iaee9a7767eb5f735862a3716c796213a43c5f9e5
Gerrit-Change-Number: 48643
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Giacomo Travaglini 
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: Update the minimum version of python to 3.6.

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


Change subject: scons: Update the minimum version of python to 3.6.
..

scons: Update the minimum version of python to 3.6.

The gem5 website says the minimum version of python is 3.6, but SCons
was only enforcing version 3.0.

Change-Id: I50e406538b29d2ee469d5fcc16cd509cfa6a7540
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48513
Reviewed-by: Giacomo Travaglini 
Maintainer: Giacomo Travaglini 
Tested-by: kokoro 
---
M site_scons/site_init.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/site_scons/site_init.py b/site_scons/site_init.py
index 3507373..6a03d84 100644
--- a/site_scons/site_init.py
+++ b/site_scons/site_init.py
@@ -53,7 +53,7 @@

 # Check for the python version. Python 2 is no longer supported.
 try:
-EnsurePythonVersion(3, 0)
+EnsurePythonVersion(3, 6)
 except SystemExit as e:
 print("""\033[93m
 Python 3 is now required.



1 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/+/48513
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: I50e406538b29d2ee469d5fcc16cd509cfa6a7540
Gerrit-Change-Number: 48513
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Daniel Carvalho 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Giacomo Travaglini 
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] Minor CPU decoding instructions in fetch?

2021-07-27 Thread Gabe Black via gem5-dev
Hi folks, specifically ARM folks. I'm trying to figure out what's going on
with this in the minor CPU:

#if THE_ISA == X86_ISA || THE_ISA == ARM_ISA
/* In SE mode, it's possible to branch to a microop when
 *  replaying faults such as page faults (or simply
 *  intra-microcode branches in X86).  Unfortunately,
 *  as Minor has micro-op decomposition in a separate
 *  pipeline stage from instruction decomposition, the
 *  following advancePC (which may follow a branch with
 *  microPC() != 0) *must* see a fresh macroop.  This
 *  kludge should be improved with an addition to
PCState
 *  but I offer it in this form for the moment
 *
 * X86 can branch within microops so we need to deal
with
 * the case that, after a branch, the first un-advanced
PC
 * may be pointing to a microop other than 0.  Once
 * advanced, however, the microop number *must* be 0 */
fetch_info.pc.upc(0);
fetch_info.pc.nupc(1);
#endif


This seems very strange, but removing it does in fact make the minor CPU
stop working for at least the ARM BubbleSort regression test.

Can anyone explain what's going on here? This code sprang into existence
with this #if in it, so there's no history, reviews, etc, that give any
clue why this self professed kludge is necessary. It was checked in with
this change:

commit 0e8a90f06bd3db00f700891a33458353478cce76
Author: Andrew Bardsley 
Date:   Wed Jul 23 16:09:04 2014 -0500

cpu: `Minor' in-order CPU model

There's some fairly hefty documentation now on the website which I'll look
through which I imagine might help, but I think there's a disconnect
between this code and how the PCState class is supposed to be used...

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] Re: "epic" Jira issue to track multi-ISA gem5

2021-07-27 Thread Giacomo Travaglini via gem5-dev
This is great, thanks Gabe!

> -Original Message-
> From: Gabe Black via gem5-dev 
> Sent: 25 July 2021 12:45
> To: gem5 Developer List ; Earl Ou
> 
> Cc: Gabe Black 
> Subject: [gem5-dev] "epic" Jira issue to track multi-ISA gem5
>
> To help lay out a roadmap and scope for my ongoing effort to make gem5
> support more than one ISA at a time, I created an "epic" issue here:
>
> https://gem5.atlassian.net/browse/GEM5-1048
>
>
> The sub-tasks are linked off of that one, and I put a bit of explanation under
> each one. I tried to be fairly thorough, but of course I could have forgotten
> something, or there may even be aspects that I/we aren't aware of yet.
>
> Gabe
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]: scons: Disable the free-nonheap-object warning for gcc.

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



Change subject: scons: Disable the free-nonheap-object warning for gcc.
..

scons: Disable the free-nonheap-object warning for gcc.

g++ 11.1 has a false positive in the systemc kernel for
free-nonheap-object which breaks the build. The check sees that an
EventWrapper is part of the systemc scheduler object, and doesn't
realize that it was *not* set to autodelete, and so would *not* delete
itself (as part of the scheduler) when it is descheduled.

Change-Id: Ia9f48f2113e8c165923e55d7db1442b11bb6a2e8
---
M SConstruct
1 file changed, 4 insertions(+), 0 deletions(-)



diff --git a/SConstruct b/SConstruct
index ea86cc0..d9d4757 100755
--- a/SConstruct
+++ b/SConstruct
@@ -355,6 +355,10 @@
 error('gcc version 5 or newer required.\n'
   'Installed version:', main['CXXVERSION'])

+with gem5_scons.Configure(main) as conf:
+# This detects a false positive in the systemc code in g++ 11.1.
+conf.CheckCxxFlag('-Wno-free-nonheap-object')
+
 # Add the appropriate Link-Time Optimization (LTO) flags if  
`--with-lto` is

 # set.
 if GetOption('with_lto'):

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48646
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: Ia9f48f2113e8c165923e55d7db1442b11bb6a2e8
Gerrit-Change-Number: 48646
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: scons: Get rid of some redundant text in a print out.

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



Change subject: scons: Get rid of some redundant text in a print out.
..

scons: Get rid of some redundant text in a print out.

When printing the LSAN_OPTIONS setting to use, we were manually
prefixing "suppressions=" to it, but it already had that built into the
option. This made that text print twice. Remove the duplicate.

Change-Id: Ie599e02d0cf17bcf18278d72350831a2e0ac09f6
---
M SConstruct
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/SConstruct b/SConstruct
index ca1bc7b..cbe4673 100755
--- a/SConstruct
+++ b/SConstruct
@@ -414,7 +414,7 @@
 warning('To suppress false positive leaks, set the LSAN_OPTIONS '
 'environment variable to "%s" when running gem5' %
 suppressions_opt)
-warning('LSAN_OPTIONS=suppressions=%s' % suppressions_opt)
+warning('LSAN_OPTIONS=%s' % suppressions_opt)
 print()
 if sanitizers:
 sanitizers = ','.join(sanitizers)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48644
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: Ie599e02d0cf17bcf18278d72350831a2e0ac09f6
Gerrit-Change-Number: 48644
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: scons: Add the "print_suppressions=0" option to the LSAN warning.

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



Change subject: scons: Add the "print_suppressions=0" option to the LSAN  
warning.

..

scons: Add the "print_suppressions=0" option to the LSAN warning.

This is part of what SCons uses internally, and is probably what someone
using LSAN_OPTIONS would want to use externally too.

Change-Id: I413c680829e0edab76598122637e3236c35e8209
---
M SConstruct
1 file changed, 4 insertions(+), 4 deletions(-)



diff --git a/SConstruct b/SConstruct
index cbe4673..ea86cc0 100755
--- a/SConstruct
+++ b/SConstruct
@@ -408,13 +408,13 @@
 sanitizers.append('address')
 suppressions_file = Dir('util').File('lsan-suppressions').get_abspath()
 suppressions_opt = 'suppressions=%s' % suppressions_file
-main['ENV']['LSAN_OPTIONS'] = ':'.join([suppressions_opt,
-'print_suppressions=0'])
+suppressions_opts  
= ':'.join([suppressions_opt, 'print_suppressions=0'])

+main['ENV']['LSAN_OPTIONS'] = suppressions_opts
 print()
 warning('To suppress false positive leaks, set the LSAN_OPTIONS '
 'environment variable to "%s" when running gem5' %
-suppressions_opt)
-warning('LSAN_OPTIONS=%s' % suppressions_opt)
+suppressions_opts)
+warning('LSAN_OPTIONS=%s' % suppressions_opts)
 print()
 if sanitizers:
 sanitizers = ','.join(sanitizers)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48645
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: I413c680829e0edab76598122637e3236c35e8209
Gerrit-Change-Number: 48645
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: mem: Use the new "debug" namespace, and not "Debug".

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



Change subject: mem: Use the new "debug" namespace, and not "Debug".
..

mem: Use the new "debug" namespace, and not "Debug".

The "Debug" namespace is deprecated and has been replaced by "debug".

Change-Id: Ic8e9082361a6717f3b07990dbaa1a66b0926f000
---
M src/mem/cache/prefetch/queued.cc
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/mem/cache/prefetch/queued.cc  
b/src/mem/cache/prefetch/queued.cc

index dec71f2..ae4913d 100644
--- a/src/mem/cache/prefetch/queued.cc
+++ b/src/mem/cache/prefetch/queued.cc
@@ -517,7 +517,7 @@
 queue.insert(it, dpp);
 }

-if (Debug::HWPrefetchQueue)
+if (debug::HWPrefetchQueue)
 printQueue(queue);
 }


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48647
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: Ic8e9082361a6717f3b07990dbaa1a66b0926f000
Gerrit-Change-Number: 48647
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: util: Make --with-asan work with more versions of the python lib.

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



Change subject: util: Make --with-asan work with more versions of the  
python lib.

..

util: Make --with-asan work with more versions of the python lib.

The version of the python library on my system is libpython3.9.so, not
libpython3.so. Generalize the line in lsan-suppressions to cover this
version as well.

Change-Id: Iaee9a7767eb5f735862a3716c796213a43c5f9e5
---
M util/lsan-suppressions
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/util/lsan-suppressions b/util/lsan-suppressions
index 18450d6..5252c06 100644
--- a/util/lsan-suppressions
+++ b/util/lsan-suppressions
@@ -1,2 +1,2 @@
 # Suppress detection of leaks from within the python3 interpreter.
-leak:libpython3.so
+leak:libpython3*.so

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48643
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: Iaee9a7767eb5f735862a3716c796213a43c5f9e5
Gerrit-Change-Number: 48643
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] Re: deprecating warn_once

2021-07-27 Thread Gabe Black via gem5-dev
Or I should say without un-namespaced macros (GEM5_ prefixed), since
GEM5_ONCE itself would be a macro.

Gabe

On Mon, Jul 26, 2021 at 11:01 PM Gabe Black  wrote:

> No, not that I'm aware of. It would just be to make it feasible to
> implement the warn_once functionality without using macros. With c++20, I
> can more or less get it to work with some minor template syntax,
> warn("xyz"), but that relies on the source location (file, line,
> column which may be iffy) to be unique, which is defeated by, for instance,
> putting multiple warn_once-s in a macro which then all look like they came
> from the location of the macro in the source.
>
> Gabe
>
> On Mon, Jul 26, 2021 at 9:01 PM Steve Reinhardt  wrote:
>
>> Hi Gabe,
>>
>> Is there a use case for GEM5_ONCE() other than warn_once()?
>>
>> Thanks,
>>
>> Steve
>>
>>
>> On Mon, Jul 26, 2021 at 6:06 PM Gabe Black via gem5-dev <
>> gem5-dev@gem5.org> wrote:
>>
>>> Hi folks. I'm continuing to research how to turn warn, panic, etc, into
>>> regular functions instead of macros, and one particularly sticky problem is
>>> how to ensure something like warn_once only happens once.
>>>
>>> Right now, the macro warn_once expands to something like this:
>>>
>>> do {
>>> static bool once = false;
>>> if (!once) {
>>> warn(...);
>>> once = true;
>>> }
>>> } while (0)
>>>
>>> So, a static bool is declared which guards the warn. The problem with
>>> this is that it requires declaring a static bool at the call sight, which
>>> as you can imagine is hard to do without macros.
>>>
>>> As far as how it *might* be done, if we can extract the location of the
>>> call (file name, source line, column offset), then we could possibly use a
>>> template holding a static bool.
>>>
>>> template <${source location info}>
>>> warn_once(...)
>>> {
>>> static bool once = false;
>>> 
>>> }
>>>
>>> There are a few problems with this approach. First, the source location
>>> would have to be broken down into individual primitive types, like an int
>>> for the line number, and individual characters for the file name string,
>>> since you can't use a struct as a non-type template parameter until c++20.
>>> This *might* be possible using fancy template tricks, but it would be a bit
>>> ugly and may gum up the compiler, slowing builds.
>>>
>>> Second, if the column information is not unique (I think the standard is
>>> not very specific about what it maps to), then the "once" will apply to
>>> more than one thing. This would be particularly true if a macro whose
>>> contents all share the same source location had multiple warn_once-s in it.
>>>
>>> I did a check with grep, and warn_once shows up in all of gem5 about 80
>>> times, so while it's used, it's not used extensively.
>>>
>>> What I would like to propose is that instead of having warn_once(...),
>>> we add a new macro called GEM5_ONCE which would be defined something like
>>> the following:
>>>
>>> #define GEM5_ONCE(statement) do { \
>>> static [[maybe_unused]] bool _once = ([](){ statement; }(), true); \
>>> while (0)
>>>
>>> Then when you want to warn once (or anything else once), you'd write it
>>> like this:
>>>
>>> GEM5_ONCE(warn("blah blah"));
>>>
>>> This is *slightly* more verbose, but warn_once is only used 80 times in
>>> the whole code base. Also the macro is namespaced now, which is a nice
>>> improvement.
>>>
>>> Gabe
>>> ___
>>> gem5-dev mailing list -- gem5-dev@gem5.org
>>> To unsubscribe send an email to gem5-dev-le...@gem5.org
>>> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>>
>>
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Re: deprecating warn_once

2021-07-27 Thread Gabe Black via gem5-dev
No, not that I'm aware of. It would just be to make it feasible to
implement the warn_once functionality without using macros. With c++20, I
can more or less get it to work with some minor template syntax,
warn("xyz"), but that relies on the source location (file, line,
column which may be iffy) to be unique, which is defeated by, for instance,
putting multiple warn_once-s in a macro which then all look like they came
from the location of the macro in the source.

Gabe

On Mon, Jul 26, 2021 at 9:01 PM Steve Reinhardt  wrote:

> Hi Gabe,
>
> Is there a use case for GEM5_ONCE() other than warn_once()?
>
> Thanks,
>
> Steve
>
>
> On Mon, Jul 26, 2021 at 6:06 PM Gabe Black via gem5-dev 
> wrote:
>
>> Hi folks. I'm continuing to research how to turn warn, panic, etc, into
>> regular functions instead of macros, and one particularly sticky problem is
>> how to ensure something like warn_once only happens once.
>>
>> Right now, the macro warn_once expands to something like this:
>>
>> do {
>> static bool once = false;
>> if (!once) {
>> warn(...);
>> once = true;
>> }
>> } while (0)
>>
>> So, a static bool is declared which guards the warn. The problem with
>> this is that it requires declaring a static bool at the call sight, which
>> as you can imagine is hard to do without macros.
>>
>> As far as how it *might* be done, if we can extract the location of the
>> call (file name, source line, column offset), then we could possibly use a
>> template holding a static bool.
>>
>> template <${source location info}>
>> warn_once(...)
>> {
>> static bool once = false;
>> 
>> }
>>
>> There are a few problems with this approach. First, the source location
>> would have to be broken down into individual primitive types, like an int
>> for the line number, and individual characters for the file name string,
>> since you can't use a struct as a non-type template parameter until c++20.
>> This *might* be possible using fancy template tricks, but it would be a bit
>> ugly and may gum up the compiler, slowing builds.
>>
>> Second, if the column information is not unique (I think the standard is
>> not very specific about what it maps to), then the "once" will apply to
>> more than one thing. This would be particularly true if a macro whose
>> contents all share the same source location had multiple warn_once-s in it.
>>
>> I did a check with grep, and warn_once shows up in all of gem5 about 80
>> times, so while it's used, it's not used extensively.
>>
>> What I would like to propose is that instead of having warn_once(...), we
>> add a new macro called GEM5_ONCE which would be defined something like the
>> following:
>>
>> #define GEM5_ONCE(statement) do { \
>> static [[maybe_unused]] bool _once = ([](){ statement; }(), true); \
>> while (0)
>>
>> Then when you want to warn once (or anything else once), you'd write it
>> like this:
>>
>> GEM5_ONCE(warn("blah blah"));
>>
>> This is *slightly* more verbose, but warn_once is only used 80 times in
>> the whole code base. Also the macro is namespaced now, which is a nice
>> improvement.
>>
>> Gabe
>> ___
>> gem5-dev mailing list -- gem5-dev@gem5.org
>> To unsubscribe send an email to gem5-dev-le...@gem5.org
>> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
>
>
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s