[gem5-dev] Change in gem5/gem5[develop]: misc: Fix db_offset calculation

2020-08-28 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/32678 )


Change subject: misc: Fix db_offset calculation
..

misc: Fix db_offset calculation

db_offset used to be calculated through pointer arithmetic. Pointer
arithmetic increments the address by the size of the data type the
pointer is pointing at. In the previous db_offset calculation, that
was a uint32_t, which means the input was multiplied by 4, which is
sizeof(uint32_t)

This patch multiplies the input value by sizeof(uint32_t) before
assigning it to db_offset.

Change-Id: I9042560303ae6b8b1054b98e9a16a9da27843bb2
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32678
Reviewed-by: Matt Sinclair 
Reviewed-by: Alexandru Duțu 
Maintainer: Matt Sinclair 
Tested-by: kokoro 
---
M src/dev/hsa/hw_scheduler.cc
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Alexandru Duțu: Looks good to me, approved
  Matt Sinclair: Looks good to me, but someone else must approve; Looks  
good to me, approved

  kokoro: Regressions pass



diff --git a/src/dev/hsa/hw_scheduler.cc b/src/dev/hsa/hw_scheduler.cc
index 8523be9..f25839d 100644
--- a/src/dev/hsa/hw_scheduler.cc
+++ b/src/dev/hsa/hw_scheduler.cc
@@ -95,7 +95,7 @@
 // #define VOID_PTR_ADD32(ptr,n)
 // (void*)((uint32_t*)(ptr) + n)/*ptr + offset*/
 // (Addr)VOID_PTR_ADD32(0, queue_id)
-Addr db_offset = queue_id;
+Addr db_offset = sizeof(uint32_t)*queue_id;
 if (dbMap.find(db_offset) != dbMap.end()) {
 panic("Creating an already existing queue (queueID %d)", queue_id);
 }
@@ -346,7 +346,7 @@
 // #define VOID_PTR_ADD32(ptr,n)
 // (void*)((uint32_t*)(ptr) + n)/*ptr + offset*/
 // (Addr)VOID_PTR_ADD32(0, queue_id)
-Addr db_offset = queue_id;
+Addr db_offset = sizeof(uint32_t)*queue_id;
 auto dbmap_iter = dbMap.find(db_offset);
 if (dbmap_iter == dbMap.end()) {
 panic("Destroying a non-existing queue (db_offset %x)",

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32678
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: I9042560303ae6b8b1054b98e9a16a9da27843bb2
Gerrit-Change-Number: 32678
Gerrit-PatchSet: 3
Gerrit-Owner: Kyle Roarty 
Gerrit-Reviewer: Alexandru Duțu 
Gerrit-Reviewer: Anthony Gutierrez 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Kyle Roarty 
Gerrit-Reviewer: Matt Sinclair 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Bobby R. Bruce 
Gerrit-CC: Bradford Beckmann 
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: set hsaTopology properties from options

2020-08-28 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/31995 )


Change subject: configs: set hsaTopology properties from options
..

configs: set hsaTopology properties from options

This change sets the properties in hsaTopology to the proper values
specified by the user through command-line arguments. This ensures
that if the properties file is read by a program, it will return
the correct values for the simulated hardware.

This change also adds in a command-line argument for the lds size, as
it was the only other property used in hsaTopology that didn't have
a command-line argument. The default value (65536) is taken from
src/gpu-compute/LdsState.py

Change-Id: I17bb812491708f4221c39b738c906f1ad944614d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31995
Reviewed-by: Matt Sinclair 
Reviewed-by: Alexandru Duțu 
Reviewed-by: Anthony Gutierrez 
Maintainer: Matt Sinclair 
Maintainer: Anthony Gutierrez 
Tested-by: kokoro 
---
M configs/example/apu_se.py
M configs/example/hsaTopology.py
2 files changed, 32 insertions(+), 26 deletions(-)

Approvals:
  Alexandru Duțu: Looks good to me, approved
  Anthony Gutierrez: Looks good to me, approved; Looks good to me, approved
  Matt Sinclair: Looks good to me, but someone else must approve; Looks  
good to me, approved

  kokoro: Regressions pass



diff --git a/configs/example/apu_se.py b/configs/example/apu_se.py
index 59dd4c5..03418c3 100644
--- a/configs/example/apu_se.py
+++ b/configs/example/apu_se.py
@@ -174,6 +174,8 @@
   help="number of physical banks per LDS module")
 parser.add_option("--ldsBankConflictPenalty", type="int", default=1,
   help="number of cycles per LDS bank conflict")
+parser.add_options("--lds-size", type="int", default=65536,
+   help="Size of the LDS in bytes")
 parser.add_option('--fast-forward-pseudo-op', action='store_true',
   help = 'fast forward using kvm until the m5_switchcpu'
   ' pseudo-op is encountered, then switch cpus. subsequent'
@@ -290,7 +292,8 @@
  localDataStore = \
  LdsState(banks = options.numLdsBanks,
   bankConflictPenalty = \
-   
options.ldsBankConflictPenalty)))
+   
options.ldsBankConflictPenalty,

+  size = options.lds_size)))
 wavefronts = []
 vrfs = []
 vrf_pool_mgrs = []
diff --git a/configs/example/hsaTopology.py b/configs/example/hsaTopology.py
index df24223..707a83d 100644
--- a/configs/example/hsaTopology.py
+++ b/configs/example/hsaTopology.py
@@ -36,6 +36,7 @@
 from os.path import join as joinpath
 from os.path import isdir
 from shutil import rmtree, copyfile
+from m5.util.convert import toFrequency

 def file_append(path, contents):
 with open(joinpath(*path), 'a') as f:
@@ -76,30 +77,32 @@

 # populate global node properties
 # NOTE: SIMD count triggers a valid GPU agent creation
-# TODO: Really need to parse these from options
-node_prop = 'cpu_cores_count %s\n' % options.num_cpus   + \
-'simd_count 32\n'   + \
-'mem_banks_count 0\n'   + \
-'caches_count 0\n'  + \
-'io_links_count 0\n'+ \
-'cpu_core_id_base 16\n' + \
-'simd_id_base 2147483648\n' + \
-'max_waves_per_simd 40\n'   + \
-'lds_size_in_kb 64\n'   + \
-'gds_size_in_kb 0\n'+ \
-'wave_front_size 64\n'  + \
-'array_count 1\n'   + \
-'simd_arrays_per_engine 1\n'+ \
-'cu_per_simd_array 10\n'+ \
-'simd_per_cu 4\n'   + \
-'max_slots_scratch_cu 32\n' + \
-'vendor_id 4098\n'  + \
-'device_id 39028\n' + \
-'location_id 8\n'   + \
-'max_engine_clk_fcompute 800\n' + \
-'local_mem_size 0\n'+ \
-'fw_version 699\n'  + \
-'capability 4738\n' + \
-'max_engine_clk_ccompute 2100\n'
+node_prop = 'cpu_cores_count %s\n' %  
options.num_cpus   + \
+'simd_count %s\n'  
\
+   

[gem5-dev] Change in gem5/gem5[develop]: misc,scons,util: Drop support for GCC 4

2020-08-28 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/+/33659 )



Change subject: misc,scons,util: Drop support for GCC 4
..

misc,scons,util: Drop support for GCC 4

Corresponding website update:
https://gem5-review.googlesource.com/c/public/gem5-website/+/33657

Issue-on: https://gem5.atlassian.net/browse/GEM5-218
Change-Id: Ia72edda6229214e2f9d548266a42a0affd49b340
---
M SConstruct
M util/cloudbuild/cloudbuild_create_images.yaml
2 files changed, 12 insertions(+), 20 deletions(-)



diff --git a/SConstruct b/SConstruct
index bbfa37a..f1c7644 100755
--- a/SConstruct
+++ b/SConstruct
@@ -390,24 +390,24 @@
   "src/SConscript to support that compiler.")))

 if main['GCC']:
-# Check for a supported version of gcc. >= 4.8 is chosen for its
+# Check for a supported version of gcc. >= 5 is chosen for its
 # level of c++11 support. See
 # http://gcc.gnu.org/projects/cxx0x.html for details.
 gcc_version = readCommand([main['CXX'], '-dumpversion'],  
exception=False)

-if compareVersions(gcc_version, "4.8") < 0:
-error('gcc version 4.8 or newer required.\n'
+if compareVersions(gcc_version, "5") < 0:
+error('gcc version 5 or newer required.\n'
   'Installed version:', gcc_version)
 Exit(1)

 main['GCC_VERSION'] = gcc_version

-if compareVersions(gcc_version, '4.9') >= 0:
-# Incremental linking with LTO is currently broken in gcc versions
-# 4.9 and above. A version where everything works completely hasn't
-# yet been identified.
-#
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67548
-main['BROKEN_INCREMENTAL_LTO'] = True
+# Incremental linking with LTO is currently broken in gcc versions
+# 4.9 and above. A version where everything works completely hasn't
+# yet been identified.
+#
+# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67548
+main['BROKEN_INCREMENTAL_LTO'] = True
+
 if compareVersions(gcc_version, '6.0') >= 0:
 # gcc versions 6.0 and greater accept an -flinker-output flag which
 # selects what type of output the linker should generate. This is
@@ -450,7 +450,7 @@

 elif main['CLANG']:
 # Check for a supported version of clang, >= 3.1 is needed to
-# support similar features as gcc 4.8. See
+# support similar features as gcc 5. See
 # http://clang.llvm.org/cxx_status.html for details
 clang_version_re = re.compile(".* version (\d+\.\d+)")
 clang_version_match = clang_version_re.search(CXX_version)
@@ -500,7 +500,7 @@
 if not main['GCC'] or compareVersions(main['GCC_VERSION'], '4.9') >= 0:
 sanitizers.append('undefined')
 if GetOption('with_asan'):
-# Available for gcc >= 4.8 or llvm >= 3.1 both a requirement
+# Available for gcc >= 5 or llvm >= 3.1 both a requirement
 # by the build system
 sanitizers.append('address')
 suppressions_file = Dir('util').File('lsan-suppressions').get_abspath()
diff --git a/util/cloudbuild/cloudbuild_create_images.yaml  
b/util/cloudbuild/cloudbuild_create_images.yaml

index 2faadfa..bed950a 100644
--- a/util/cloudbuild/cloudbuild_create_images.yaml
+++ b/util/cloudbuild/cloudbuild_create_images.yaml
@@ -20,13 +20,6 @@
 - name: 'gcr.io/cloud-builders/docker'
   args: ['build',
 '-t',
-'gcr.io/$PROJECT_ID/gcc-version-4.8:latest',
-'--build-arg', 'version=4.8',
-'util/dockerfiles/ubuntu-18.04_gcc-version']
-
-- name: 'gcr.io/cloud-builders/docker'
-  args: ['build',
-'-t',
 'gcr.io/$PROJECT_ID/gcc-version-5:latest',
 '--build-arg', 'version=5',
 'util/dockerfiles/ubuntu-18.04_gcc-version']
@@ -124,7 +117,6 @@
 images: ['gcr.io/$PROJECT_ID/ubuntu-20.04_all-dependencies:latest',
  'gcr.io/$PROJECT_ID/ubuntu-18.04_all-dependencies:latest',
  'gcr.io/$PROJECT_ID/ubuntu-18.04_min-dependencies:latest',
- 'gcr.io/$PROJECT_ID/gcc-version-4.8:latest',
  'gcr.io/$PROJECT_ID/gcc-version-5:latest',
  'gcr.io/$PROJECT_ID/gcc-version-6:latest',
  'gcr.io/$PROJECT_ID/gcc-version-7:latest',

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33659
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: Ia72edda6229214e2f9d548266a42a0affd49b340
Gerrit-Change-Number: 33659
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[develop]: scons: Set the minimum scons version to 3.0.

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



Change subject: scons: Set the minimum scons version to 3.0.
..

scons: Set the minimum scons version to 3.0.

Change-Id: Id57a93e819588d2231d2d2d8b28cd62b05fbbe9b
---
M site_scons/site_init.py
1 file changed, 3 insertions(+), 3 deletions(-)



diff --git a/site_scons/site_init.py b/site_scons/site_init.py
index 82e1c8a..4045e90 100644
--- a/site_scons/site_init.py
+++ b/site_scons/site_init.py
@@ -46,9 +46,9 @@
 # Really old versions of scons only take two options for the
 # function, so check once without the revision and once with the
 # revision, the first instance will fail for stuff other than
-# 0.98, and the second will fail for 0.98.0
-EnsureSConsVersion(0, 98)
-EnsureSConsVersion(0, 98, 1)
+# 3.0, and the second will fail for 3.0.0
+EnsureSConsVersion(3, 0)
+EnsureSConsVersion(3, 0, 0)
 except SystemExit as e:
 print("""
 For more details, see:

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33675
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: Id57a93e819588d2231d2d2d8b28cd62b05fbbe9b
Gerrit-Change-Number: 33675
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: For gem5 20.1: Remove "master" and replace with new "stable" default branch (?)

2020-08-28 Thread Jason Lowe-Power via gem5-dev
+1

Thanks for getting the ball rolling on this, Bobby!

On Fri, Aug 28, 2020 at 5:26 PM Bobby Bruce via gem5-dev 
wrote:

> Dear all,
>
> Back when we moved from the master branch being under constant development
> to a dual "master-as-stable" and "develop" branch setup, there was talk of
> renaming the master branch. Though, at this time, it seemed unconventional
> so avoided doing so. In the past few months there has been greater momentum
> in the direction of allowing git repositories to call their default branch
> whatever they wish. For example, Github is reworking things in this regard (
> https://github.com/github/renaming/) and defaulting new repos to have
> "main" as the default branch.
>
> Our GoogleSource/Gerrit setup allows us to set HEAD to point towards
> whatever branch we wish. We therefore think v20.1 would be a good time to
> rename "master" to "stable". This afternoon I created a "stable" branch,
> identical to "master", here:
> https://gem5.googlesource.com/public/gem5/+/refs/heads/stable. The next
> step would be to redirect HEAD to this branch, then delete the master
> branch. Coinciding this with the release of v20.1 (in roughly 2 weeks time)
> seems like an ideal timing.
>
> I'm writing this email to ask if the community agrees with this, and if
> there is anything I'm not taking into account. I believe this should be a
> fairly seamless transition, and will give our two branches more descriptive
> names  --- stable and develop.
>
> 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 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: Build failed in Jenkins: gem5_develop #155

2020-08-28 Thread Bobby Bruce via gem5-dev
Hey Mike,

Sorry for the delay in getting back to you. I'm pretty sure this is due to
the following changes where we remove "ext/libelf" in favour of using the
system's libelf:

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

These commits mean you must have the "libelf-dev" package installed to
compile gem5. Our Jenkin's server did not have this. I have just installed
it, so we should be good now.

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

web: https://www.bobbybruce.net


On Fri, Aug 28, 2020 at 2:04 PM mike upton via gem5-dev 
wrote:

>
> I saw the develop regression failed on run 153, so i added gem5-dev to the
> mail list, cleaned the workspace, and kicked off another build.
> The next 2 builds 154, and 155 also failed.
>
> I dont understand what is going on. These same checkins are working fine
> on my private jenkins server.
>
> maybe a python2.7 vs python3 thing?
>
>
>
>
> On Fri, Aug 28, 2020 at 1:23 PM jenkins-no-reply--- via gem5-dev <
> gem5-dev@gem5.org> wrote:
>
>> See 
>>
>> Changes:
>>
>>
>> --
>> Started by user michael upton
>> Running as SYSTEM
>> Building in workspace 
>> The recommended git tool is: NONE
>> No credentials specified
>> Cloning the remote Git repository
>> Cloning repository https://gem5.googlesource.com/public/gem5
>>  > git init  # timeout=10
>> Fetching upstream changes from https://gem5.googlesource.com/public/gem5
>>  > git --version # timeout=10
>>  > git --version # 'git version 2.25.1'
>>  > git fetch --tags --force --progress --
>> https://gem5.googlesource.com/public/gem5
>> +refs/heads/*:refs/remotes/origin/* # timeout=10
>>  > git config remote.origin.url https://gem5.googlesource.com/public/gem5
>> # timeout=10
>>  > git config --add remote.origin.fetch
>> +refs/heads/*:refs/remotes/origin/* # timeout=10
>> Avoid second fetch
>>  > git rev-parse refs/remotes/origin/develop^{commit} # timeout=10
>>  > git rev-parse refs/remotes/origin/origin/develop^{commit} # timeout=10
>> Checking out Revision fa13042b5a1b4120bb7d96d15170bbd5d5068fad
>> (refs/remotes/origin/develop)
>>  > git config core.sparsecheckout # timeout=10
>>  > git checkout -f fa13042b5a1b4120bb7d96d15170bbd5d5068fad # timeout=10
>> Commit message: "ext: remove libelf"
>>  > git rev-list --no-walk fa13042b5a1b4120bb7d96d15170bbd5d5068fad #
>> timeout=10
>> [gem5_develop] $ /bin/sh -xe /tmp/jenkins6579710378508302396.sh
>> + cd tests
>> + ./main.py run -j 4 -t 4
>> Running the new gem5 testing script.
>> For more information see TESTING.md.
>> To see details as the testing scripts are running, use the option -v,
>> -vv, or -vvv
>>
>> 
>> Loading Tests
>> Discovered 2544 tests and 2544 suites in <
>> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/asmtest/tests.py>
>> Discovered 264 tests and 132 suites in <
>> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/cpu_tests/test.py
>> >
>> Discovered 24 tests and 12 suites in <
>> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/dram-lowp/test_dram_lowp.py
>> >
>> Discovered 166 tests and 166 suites in <
>> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/fs/linux/arm/test.py
>> >
>> Discovered 270 tests and 135 suites in <
>> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/hello_se/test_hello_se.py
>> >
>> Discovered 0 tests and 0 suites in <
>> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/insttest_se/test.py
>> >
>> Discovered 48 tests and 48 suites in <
>> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/learning_gem5/part1_test.py
>> >
>> Discovered 48 tests and 24 suites in <
>> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/learning_gem5/part2_test.py
>> >
>> Discovered 18 tests and 9 suites in <
>> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/learning_gem5/part3_test.py
>> >
>> Discovered 12 tests and 6 suites in <
>> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/m5_util/test_exit.py
>> >
>> Discovered 0 tests and 0 suites in <
>> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/m5threads_test_atomic/test.py
>> >
>> Discovered 72 tests and 72 suites in <
>> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/memory/test.py>
>> Discovered 18 tests and 18 suites in <
>> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/test_build/test_build.py
>> >
>> Discovered 18 tests and 18 suites in <
>> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/x86-boot-tests/test_linux_boot.py
>> >
>>
>> 
>> Running Tests from 502 suites
>> Results will be stored in <
>> 

[gem5-dev] For gem5 20.1: Remove "master" and replace with new "stable" default branch (?)

2020-08-28 Thread Bobby Bruce via gem5-dev
Dear all,

Back when we moved from the master branch being under constant development
to a dual "master-as-stable" and "develop" branch setup, there was talk of
renaming the master branch. Though, at this time, it seemed unconventional
so avoided doing so. In the past few months there has been greater momentum
in the direction of allowing git repositories to call their default branch
whatever they wish. For example, Github is reworking things in this regard (
https://github.com/github/renaming/) and defaulting new repos to have
"main" as the default branch.

Our GoogleSource/Gerrit setup allows us to set HEAD to point towards
whatever branch we wish. We therefore think v20.1 would be a good time to
rename "master" to "stable". This afternoon I created a "stable" branch,
identical to "master", here:
https://gem5.googlesource.com/public/gem5/+/refs/heads/stable. The next
step would be to redirect HEAD to this branch, then delete the master
branch. Coinciding this with the release of v20.1 (in roughly 2 weeks time)
seems like an ideal timing.

I'm writing this email to ask if the community agrees with this, and if
there is anything I'm not taking into account. I believe this should be a
fairly seamless transition, and will give our two branches more descriptive
names  --- stable and develop.

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]: gpu-compute,mem-ruby: WriteCompletePkts fixes

2020-08-28 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33656 )



Change subject: gpu-compute,mem-ruby: WriteCompletePkts fixes
..

gpu-compute,mem-ruby: WriteCompletePkts fixes

There seems to be a flow of packets as so:
WriteResp -> WriteReq -> WriteCompleteResp

All of these packets share a senderState. The senderState was being
deleted in the writeResp packet. This patch fixes that, avoiding a
segfault

Additionally, the WriteCompleteResp packet was attempting to access
physical memory in hitCallback while not having any data, which
caused a crash. This can be resolved either by not allowing
WriteCompleteResp packets to access memory, or by copying the data
from the WriteReq packet. This patch denies WriteCompleteResp packets
memory access in hitCallback.

In VIPERCoalescer::writeCompleteCallback, there was a packet map, but
no packets were ever being removed. This patch removes packets that
match the address that was passed in to the function. There was an
error that occured if this change wasn't implemented, I forget what it
was at this point.

Now for the worst part of the change
in ComputeUnit::DataPort::recvTimingResp, when the packet is a
WriteCompleteResp packet, will call globalMemoryPipe.handleResponse.
That call happens when gpuDynInst->allLanesZero().

There's two issues with this.

1: The WriteResp packets (as mentioned above) share the same gpuDynInst
as the WriteCompleteResp packets. The WriteResp packets also decrement
the status vector in ComputeUnit::DataPort::processMemRespEvent. This
leads to issue 2

2: There are multiple WriteCompleteResp packets for one
gpuDynInst. Because the status vector is already decremented by the
WriteResp packets, the check for gpuDynInst->allLanesZero() returns
true for all those packets. This causes globalMemoryPipe.handleResponse
to be called multiple times, which causes a crash on an assert.

I simply replaced the assert with a return statement.

WIP

Change-Id: I9a064a0def2bf6c513f5295596c56b1b652b0ca4
---
M src/gpu-compute/compute_unit.cc
M src/gpu-compute/global_memory_pipeline.cc
M src/mem/ruby/system/RubyPort.cc
M src/mem/ruby/system/VIPERCoalescer.cc
4 files changed, 30 insertions(+), 15 deletions(-)



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

index 920257d..2df3399 100644
--- a/src/gpu-compute/compute_unit.cc
+++ b/src/gpu-compute/compute_unit.cc
@@ -1376,7 +1376,10 @@
 }
 }

-delete pkt->senderState;
+if (pkt->cmd != MemCmd::WriteResp) {
+delete pkt->senderState;
+}
+
 delete pkt;
 }

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

index 9fc515a..87bbe17 100644
--- a/src/gpu-compute/global_memory_pipeline.cc
+++ b/src/gpu-compute/global_memory_pipeline.cc
@@ -278,7 +278,9 @@
 // if we are getting a response for this mem request,
 // then it ought to already be in the ordered response
 // buffer
-assert(mem_req != gmOrderedRespBuffer.end());
+//assert(mem_req != gmOrderedRespBuffer.end());
+if (mem_req == gmOrderedRespBuffer.end())
+return;
 mem_req->second.second = true;
 }

diff --git a/src/mem/ruby/system/RubyPort.cc  
b/src/mem/ruby/system/RubyPort.cc

index 4510e3a..574fab0 100644
--- a/src/mem/ruby/system/RubyPort.cc
+++ b/src/mem/ruby/system/RubyPort.cc
@@ -539,7 +539,8 @@
 }

 // Flush, acquire, release requests don't access physical memory
-if (pkt->isFlush() || pkt->cmd == MemCmd::MemSyncReq) {
+if (pkt->isFlush() || pkt->cmd == MemCmd::MemSyncReq
+|| pkt->cmd == MemCmd::WriteCompleteResp) {
 accessPhysMem = false;
 }

diff --git a/src/mem/ruby/system/VIPERCoalescer.cc  
b/src/mem/ruby/system/VIPERCoalescer.cc

index eafce6d..f6e7a4d 100644
--- a/src/mem/ruby/system/VIPERCoalescer.cc
+++ b/src/mem/ruby/system/VIPERCoalescer.cc
@@ -243,19 +243,28 @@
 assert(m_writeCompletePktMap.count(key) == 1 &&
!m_writeCompletePktMap[key].empty());

-for (auto writeCompletePkt : m_writeCompletePktMap[key]) {
-if (makeLineAddress(writeCompletePkt->getAddr()) == addr) {
-RubyPort::SenderState *ss =
-safe_cast
-(writeCompletePkt->senderState);
-MemSlavePort *port = ss->port;
-assert(port != NULL);
+m_writeCompletePktMap[key].erase(
+std::remove_if(
+m_writeCompletePktMap[key].begin(),
+m_writeCompletePktMap[key].end(),
+[addr](PacketPtr writeCompletePkt) -> bool {
+if (makeLineAddress(writeCompletePkt->getAddr()) == addr) {
+RubyPort::SenderState *ss =
+safe_cast
+(writeCompletePkt->senderState);
+MemSlavePort *port = ss->port;
+assert(port != NULL);

-

[gem5-dev] Change in gem5/gem5[develop]: misc: Use VPtr in hsa_driver.cc

2020-08-28 Thread Kyle Roarty (Gerrit) via gem5-dev
Kyle Roarty has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33655 )



Change subject: misc: Use VPtr in hsa_driver.cc
..

misc: Use VPtr in hsa_driver.cc

This change updates HSADriver::allocateQueue to take in a ThreadContext
pointer as opposed to a PortProxy ref. This allows the TypedBufferArg
to be replaced with VPtr.

This also fixes building GCN3_X86

Change-Id: I1fea26b10c7344daf54a0cb05337e961f834a5fd
---
M src/dev/hsa/hsa_driver.cc
M src/dev/hsa/hsa_driver.hh
M src/gpu-compute/gpu_compute_driver.cc
3 files changed, 4 insertions(+), 6 deletions(-)



diff --git a/src/dev/hsa/hsa_driver.cc b/src/dev/hsa/hsa_driver.cc
index a1215c4..3b27149 100644
--- a/src/dev/hsa/hsa_driver.cc
+++ b/src/dev/hsa/hsa_driver.cc
@@ -101,10 +101,9 @@
  * be mapped into that page.
  */
 void
-HSADriver::allocateQueue(PortProxy _proxy, Addr ioc_buf)
+HSADriver::allocateQueue(ThreadContext *tc, Addr ioc_buf)
 {
-TypedBufferArg args(ioc_buf);
-args.copyIn(mem_proxy);
+VPtr args(ioc_buf, tc);

 if (queueId >= 0x1000) {
 fatal("%s: Exceeded maximum number of HSA queues allowed\n",  
name());

@@ -115,5 +114,4 @@
 hsa_pp.setDeviceQueueDesc(args->read_pointer_address,
   args->ring_base_address, args->queue_id,
   args->ring_size);
-args.copyOut(mem_proxy);
 }
diff --git a/src/dev/hsa/hsa_driver.hh b/src/dev/hsa/hsa_driver.hh
index abf79ab..19982f7 100644
--- a/src/dev/hsa/hsa_driver.hh
+++ b/src/dev/hsa/hsa_driver.hh
@@ -74,7 +74,7 @@
 HSADevice *device;
 uint32_t queueId;

-void allocateQueue(PortProxy _proxy, Addr ioc_buf);
+void allocateQueue(ThreadContext *tc, Addr ioc_buf);
 };

 #endif // __DEV_HSA_HSA_DRIVER_HH__
diff --git a/src/gpu-compute/gpu_compute_driver.cc  
b/src/gpu-compute/gpu_compute_driver.cc

index 6bdb314..b4d65ce6 100644
--- a/src/gpu-compute/gpu_compute_driver.cc
+++ b/src/gpu-compute/gpu_compute_driver.cc
@@ -71,7 +71,7 @@
   {
 DPRINTF(GPUDriver, "ioctl: AMDKFD_IOC_CREATE_QUEUE\n");

-allocateQueue(virt_proxy, ioc_buf);
+allocateQueue(tc, ioc_buf);

 DPRINTF(GPUDriver, "Creating queue %d\n", queueId);
   }

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

[gem5-dev] Re: Build failed in Jenkins: gem5_develop #155

2020-08-28 Thread mike upton via gem5-dev
I saw the develop regression failed on run 153, so i added gem5-dev to the
mail list, cleaned the workspace, and kicked off another build.
The next 2 builds 154, and 155 also failed.

I dont understand what is going on. These same checkins are working fine on
my private jenkins server.

maybe a python2.7 vs python3 thing?




On Fri, Aug 28, 2020 at 1:23 PM jenkins-no-reply--- via gem5-dev <
gem5-dev@gem5.org> wrote:

> See 
>
> Changes:
>
>
> --
> Started by user michael upton
> Running as SYSTEM
> Building in workspace 
> The recommended git tool is: NONE
> No credentials specified
> Cloning the remote Git repository
> Cloning repository https://gem5.googlesource.com/public/gem5
>  > git init  # timeout=10
> Fetching upstream changes from https://gem5.googlesource.com/public/gem5
>  > git --version # timeout=10
>  > git --version # 'git version 2.25.1'
>  > git fetch --tags --force --progress --
> https://gem5.googlesource.com/public/gem5
> +refs/heads/*:refs/remotes/origin/* # timeout=10
>  > git config remote.origin.url https://gem5.googlesource.com/public/gem5
> # timeout=10
>  > git config --add remote.origin.fetch
> +refs/heads/*:refs/remotes/origin/* # timeout=10
> Avoid second fetch
>  > git rev-parse refs/remotes/origin/develop^{commit} # timeout=10
>  > git rev-parse refs/remotes/origin/origin/develop^{commit} # timeout=10
> Checking out Revision fa13042b5a1b4120bb7d96d15170bbd5d5068fad
> (refs/remotes/origin/develop)
>  > git config core.sparsecheckout # timeout=10
>  > git checkout -f fa13042b5a1b4120bb7d96d15170bbd5d5068fad # timeout=10
> Commit message: "ext: remove libelf"
>  > git rev-list --no-walk fa13042b5a1b4120bb7d96d15170bbd5d5068fad #
> timeout=10
> [gem5_develop] $ /bin/sh -xe /tmp/jenkins6579710378508302396.sh
> + cd tests
> + ./main.py run -j 4 -t 4
> Running the new gem5 testing script.
> For more information see TESTING.md.
> To see details as the testing scripts are running, use the option -v, -vv,
> or -vvv
>
> 
> Loading Tests
> Discovered 2544 tests and 2544 suites in <
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/asmtest/tests.py>
> Discovered 264 tests and 132 suites in <
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/cpu_tests/test.py>
> Discovered 24 tests and 12 suites in <
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/dram-lowp/test_dram_lowp.py
> >
> Discovered 166 tests and 166 suites in <
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/fs/linux/arm/test.py
> >
> Discovered 270 tests and 135 suites in <
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/hello_se/test_hello_se.py
> >
> Discovered 0 tests and 0 suites in <
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/insttest_se/test.py
> >
> Discovered 48 tests and 48 suites in <
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/learning_gem5/part1_test.py
> >
> Discovered 48 tests and 24 suites in <
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/learning_gem5/part2_test.py
> >
> Discovered 18 tests and 9 suites in <
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/learning_gem5/part3_test.py
> >
> Discovered 12 tests and 6 suites in <
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/m5_util/test_exit.py
> >
> Discovered 0 tests and 0 suites in <
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/m5threads_test_atomic/test.py
> >
> Discovered 72 tests and 72 suites in <
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/memory/test.py>
> Discovered 18 tests and 18 suites in <
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/test_build/test_build.py
> >
> Discovered 18 tests and 18 suites in <
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/x86-boot-tests/test_linux_boot.py
> >
>
> 
> Running Tests from 502 suites
> Results will be stored in <
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/.testing-results>
>
> 
> Building the following targets. This may take a while.
> 
> You may want to run with only a single ISA(--isa=), use --skip-build, or
> use 'rerun'.
> Traceback (most recent call last):
>   File "<
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/../ext/testlib/runner.py;,>
> line 199, in setup
> fixture.setup(testitem)
>   File "<
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/fixture.py;,>
> line 111, in setup
> self._setup(testitem)
>   File "<
> https://jenkins.gem5.org/job/gem5_develop/ws/tests/gem5/fixture.py;,>
> line 156, in _setup
> 

[gem5-dev] Build failed in Jenkins: gem5_develop #155

2020-08-28 Thread jenkins-no-reply--- via gem5-dev
See 

Changes:


--
Started by user michael upton
Running as SYSTEM
Building in workspace 
The recommended git tool is: NONE
No credentials specified
Cloning the remote Git repository
Cloning repository https://gem5.googlesource.com/public/gem5
 > git init  # timeout=10
Fetching upstream changes from https://gem5.googlesource.com/public/gem5
 > git --version # timeout=10
 > git --version # 'git version 2.25.1'
 > git fetch --tags --force --progress -- 
 > https://gem5.googlesource.com/public/gem5 
 > +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://gem5.googlesource.com/public/gem5 # 
 > timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
Avoid second fetch
 > git rev-parse refs/remotes/origin/develop^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/develop^{commit} # timeout=10
Checking out Revision fa13042b5a1b4120bb7d96d15170bbd5d5068fad 
(refs/remotes/origin/develop)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f fa13042b5a1b4120bb7d96d15170bbd5d5068fad # timeout=10
Commit message: "ext: remove libelf"
 > git rev-list --no-walk fa13042b5a1b4120bb7d96d15170bbd5d5068fad # timeout=10
[gem5_develop] $ /bin/sh -xe /tmp/jenkins6579710378508302396.sh
+ cd tests
+ ./main.py run -j 4 -t 4
Running the new gem5 testing script.
For more information see TESTING.md.
To see details as the testing scripts are running, use the option -v, -vv, or 
-vvv

Loading Tests
Discovered 2544 tests and 2544 suites in 

Discovered 264 tests and 132 suites in 

Discovered 24 tests and 12 suites in 

Discovered 166 tests and 166 suites in 

Discovered 270 tests and 135 suites in 

Discovered 0 tests and 0 suites in 

Discovered 48 tests and 48 suites in 

Discovered 48 tests and 24 suites in 

Discovered 18 tests and 9 suites in 

Discovered 12 tests and 6 suites in 

Discovered 0 tests and 0 suites in 

Discovered 72 tests and 72 suites in 

Discovered 18 tests and 18 suites in 

Discovered 18 tests and 18 suites in 


Running Tests from 502 suites
Results will be stored in 


Building the following targets. This may take a while.

You may want to run with only a single ISA(--isa=), use --skip-build, or use 
'rerun'.
Traceback (most recent call last):
  File 
"
 line 199, in setup
fixture.setup(testitem)
  File " 
line 111, in setup
self._setup(testitem)
  File " 
line 156, in _setup
log_call(log.test_log, command, stderr=sys.stderr)
  File 
"
 line 102, in log_call
raise subprocess.CalledProcessError(retval, cmdstr)
CalledProcessError: Command 'scons -C 
 -j 4 --ignore-style 
 returned 
non-zero exit status 1

Exception raised while setting up fixture for Test Library
=== No testing done 
Traceback (most recent call last):
  File "./main.py", line 

[gem5-dev] Build failed in Jenkins: gem5_develop #154

2020-08-28 Thread jenkins-no-reply--- via gem5-dev
See 

Changes:


--
Started by user michael upton
Running as SYSTEM
Building in workspace 
The recommended git tool is: NONE
No credentials specified
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://gem5.googlesource.com/public/gem5 # 
 > timeout=10
Fetching upstream changes from https://gem5.googlesource.com/public/gem5
 > git --version # timeout=10
 > git --version # 'git version 2.25.1'
 > git fetch --tags --force --progress -- 
 > https://gem5.googlesource.com/public/gem5 
 > +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git rev-parse refs/remotes/origin/develop^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/develop^{commit} # timeout=10
Checking out Revision fa13042b5a1b4120bb7d96d15170bbd5d5068fad 
(refs/remotes/origin/develop)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f fa13042b5a1b4120bb7d96d15170bbd5d5068fad # timeout=10
Commit message: "ext: remove libelf"
 > git rev-list --no-walk fa13042b5a1b4120bb7d96d15170bbd5d5068fad # timeout=10
[gem5_develop] $ /bin/sh -xe /tmp/jenkins178695534185374730.sh
+ cd tests
+ ./main.py run -j 4 -t 4
Running the new gem5 testing script.
For more information see TESTING.md.
To see details as the testing scripts are running, use the option -v, -vv, or 
-vvv

Loading Tests
Discovered 2544 tests and 2544 suites in 

Discovered 264 tests and 132 suites in 

Discovered 24 tests and 12 suites in 

Discovered 166 tests and 166 suites in 

Discovered 270 tests and 135 suites in 

Discovered 0 tests and 0 suites in 

Discovered 48 tests and 48 suites in 

Discovered 48 tests and 24 suites in 

Discovered 18 tests and 9 suites in 

Discovered 12 tests and 6 suites in 

Discovered 0 tests and 0 suites in 

Discovered 72 tests and 72 suites in 

Discovered 18 tests and 18 suites in 

Discovered 18 tests and 18 suites in 


Running Tests from 502 suites
Results will be stored in 


Building the following targets. This may take a while.

You may want to run with only a single ISA(--isa=), use --skip-build, or use 
'rerun'.
Traceback (most recent call last):
  File 
"
 line 199, in setup
fixture.setup(testitem)
  File " 
line 111, in setup
self._setup(testitem)
  File " 
line 156, in _setup
log_call(log.test_log, command, stderr=sys.stderr)
  File 
"
 line 102, in log_call
raise subprocess.CalledProcessError(retval, cmdstr)
CalledProcessError: Command 'scons -C 
 -j 4 --ignore-style 
 returned 
non-zero exit status 1

Exception raised while setting up fixture for Test Library
=== No testing done 
Traceback (most recent call last):
  File "./main.py", line 26, in 
sys.exit(testlib())
  File 
" 
line 328, in main
result = 

[gem5-dev] Change in gem5/gem5[develop]: ext: remove libelf

2020-08-28 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33318 )


Change subject: ext: remove libelf
..

ext: remove libelf

Change-Id: I52eb9a7bb7d9f3522ff565498dc2821a0d1ed0d6
Signed-off-by: Jason Lowe-Power 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33318
Tested-by: kokoro 
Reviewed-by: Gabe Black 
Maintainer: Gabe Black 
---
D ext/libelf/_libelf.h
D ext/libelf/elf32.h
D ext/libelf/elf64.h
D ext/libelf/elf_begin.c
D ext/libelf/elf_cntl.c
D ext/libelf/elf_common.h
D ext/libelf/elf_data.c
D ext/libelf/elf_end.c
D ext/libelf/elf_errmsg.c
D ext/libelf/elf_errno.c
D ext/libelf/elf_fill.c
D ext/libelf/elf_flag.c
D ext/libelf/elf_getarhdr.c
D ext/libelf/elf_getarsym.c
D ext/libelf/elf_getbase.c
D ext/libelf/elf_getident.c
D ext/libelf/elf_hash.c
D ext/libelf/elf_kind.c
D ext/libelf/elf_memory.c
D ext/libelf/elf_next.c
D ext/libelf/elf_phnum.c
D ext/libelf/elf_queue.h
D ext/libelf/elf_rand.c
D ext/libelf/elf_rawfile.c
D ext/libelf/elf_scn.c
D ext/libelf/elf_shnum.c
D ext/libelf/elf_shstrndx.c
D ext/libelf/elf_strptr.c
D ext/libelf/elf_types.m4
D ext/libelf/elf_update.c
D ext/libelf/elf_version.c
D ext/libelf/gelf.h
D ext/libelf/gelf_checksum.c
D ext/libelf/gelf_dyn.c
D ext/libelf/gelf_ehdr.c
D ext/libelf/gelf_fsize.c
D ext/libelf/gelf_getclass.c
D ext/libelf/gelf_phdr.c
D ext/libelf/gelf_rel.c
D ext/libelf/gelf_rela.c
D ext/libelf/gelf_shdr.c
D ext/libelf/gelf_sym.c
D ext/libelf/gelf_symshndx.c
D ext/libelf/gelf_xlate.c
D ext/libelf/libelf.c
D ext/libelf/libelf.h
D ext/libelf/libelf_align.c
D ext/libelf/libelf_allocate.c
D ext/libelf/libelf_ar.c
D ext/libelf/libelf_checksum.c
D ext/libelf/libelf_convert.m4
D ext/libelf/libelf_data.c
D ext/libelf/libelf_ehdr.c
D ext/libelf/libelf_extended.c
D ext/libelf/libelf_fsize.m4
D ext/libelf/libelf_msize.m4
D ext/libelf/libelf_phdr.c
D ext/libelf/libelf_shdr.c
D ext/libelf/libelf_xlate.c
59 files changed, 0 insertions(+), 9,701 deletions(-)

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




--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33318
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: I52eb9a7bb7d9f3522ff565498dc2821a0d1ed0d6
Gerrit-Change-Number: 33318
Gerrit-PatchSet: 4
Gerrit-Owner: Jason Lowe-Power 
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[develop]: base: Use system libelf instead of ext

2020-08-28 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33317 )


Change subject: base: Use system libelf instead of ext
..

base: Use system libelf instead of ext

The only change needed is to remove EM_SPARC64, which from what I can
tell was removed from elf.h in 1998.

https://sources.debian.org/src/glibc/2.24-11+deb9u1/ChangeLog.8/#L6134

Change-Id: I0dd7e23ea44b19c2ebd9c6eff7cbaedfe69d821b
Signed-off-by: Jason Lowe-Power 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33317
Tested-by: kokoro 
Reviewed-by: Gabe Black 
Reviewed-by: Jason Lowe-Power 
Maintainer: Gabe Black 
---
M SConstruct
D ext/libelf/SConscript
M src/base/loader/elf_object.cc
M src/base/loader/elf_object.hh
4 files changed, 8 insertions(+), 143 deletions(-)

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



diff --git a/SConstruct b/SConstruct
index e37a858..bbfa37a 100755
--- a/SConstruct
+++ b/SConstruct
@@ -748,6 +748,10 @@
   'and/or zlib.h header file.\n'
   'Please install zlib and try again.')

+if not conf.CheckLibWithHeader('elf', 'gelf.h', 'C++',
+   'elf_version(EV_CURRENT);'):
+error('Did not find ELF access library libelf')
+
 # If we have the protobuf compiler, also make sure we have the
 # development libraries. If the check passes, libprotobuf will be
 # automatically added to the LIBS environment variable. After
diff --git a/ext/libelf/SConscript b/ext/libelf/SConscript
deleted file mode 100644
index 45f809d..000
--- a/ext/libelf/SConscript
+++ /dev/null
@@ -1,139 +0,0 @@
-# -*- mode:python -*-
-
-# Copyright (c) 2004-2005 The Regents of The University of Michigan
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met: redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer;
-# redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution;
-# neither the name of the copyright holders nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-# Authors: Nathan Binkert
-
-from __future__ import print_function
-
-import os, subprocess
-
-Import('main')
-
-from m5.util import compareVersions
-
-elf_files = []
-def ElfFile(filename):
-elf_files.append(File(filename))
-
-ElfFile('elf_begin.c')
-ElfFile('elf_cntl.c')
-ElfFile('elf_data.c')
-ElfFile('elf_end.c')
-ElfFile('elf_errmsg.c')
-ElfFile('elf_errno.c')
-ElfFile('elf_fill.c')
-ElfFile('elf_flag.c')
-ElfFile('elf_getarhdr.c')
-ElfFile('elf_getarsym.c')
-ElfFile('elf_getbase.c')
-ElfFile('elf_getident.c')
-ElfFile('elf_hash.c')
-ElfFile('elf_kind.c')
-ElfFile('elf_memory.c')
-ElfFile('elf_next.c')
-ElfFile('elf_phnum.c')
-ElfFile('elf_rand.c')
-ElfFile('elf_rawfile.c')
-ElfFile('elf_scn.c')
-ElfFile('elf_shnum.c')
-ElfFile('elf_shstrndx.c')
-ElfFile('elf_strptr.c')
-ElfFile('elf_update.c')
-ElfFile('elf_version.c')
-ElfFile('gelf_checksum.c')
-ElfFile('gelf_dyn.c')
-ElfFile('gelf_ehdr.c')
-ElfFile('gelf_fsize.c')
-ElfFile('gelf_getclass.c')
-ElfFile('gelf_phdr.c')
-ElfFile('gelf_rel.c')
-ElfFile('gelf_rela.c')
-ElfFile('gelf_shdr.c')
-ElfFile('gelf_sym.c')
-ElfFile('gelf_symshndx.c')
-ElfFile('gelf_xlate.c')
-ElfFile('libelf.c')
-ElfFile('libelf_align.c')
-ElfFile('libelf_allocate.c')
-ElfFile('libelf_ar.c')
-ElfFile('libelf_checksum.c')
-ElfFile('libelf_data.c')
-ElfFile('libelf_ehdr.c')
-ElfFile('libelf_extended.c')
-ElfFile('libelf_phdr.c')
-ElfFile('libelf_shdr.c')
-ElfFile('libelf_xlate.c')
-
-ElfFile('libelf_convert.c')
-ElfFile('libelf_fsize.c')
-ElfFile('libelf_msize.c')
-
-m4env = main.Clone()
-if m4env['GCC']:
-m4env.Append(CCFLAGS=['-Wno-pointer-sign',
-  

[gem5-dev] Change in gem5/gem5[develop]: util: Updated Dockfiles with the libelf-dev dep

2020-08-28 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33596 )


Change subject: util: Updated Dockfiles with the libelf-dev dep
..

util: Updated Dockfiles with the libelf-dev dep

This is required if we eventually remove `ext/libelf` (
https://gem5.atlassian.net/browse/GEM5-752), otherwise our tests will
fail.

The corresponding Docker images have been built and uploaded to:
https://gcr.io/gem5-test/

Change-Id: I1bd069dfb968b56eac4c4da33929b5ff895eaa6f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33596
Reviewed-by: Gabe Black 
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M util/dockerfiles/gcn-gpu/Dockerfile
M util/dockerfiles/ubuntu-18.04_all-dependencies/Dockerfile
M util/dockerfiles/ubuntu-18.04_clang-version/Dockerfile
M util/dockerfiles/ubuntu-18.04_gcc-version/Dockerfile
M util/dockerfiles/ubuntu-18.04_min-dependencies/Dockerfile
M util/dockerfiles/ubuntu-20.04_all-dependencies/Dockerfile
M util/dockerfiles/ubuntu-20.04_gcc-version/Dockerfile
7 files changed, 9 insertions(+), 7 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  Gabe Black: Looks good to me, but someone else must approve
  kokoro: Regressions pass



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

index 2e1f591..4c17b42 100644
--- a/util/dockerfiles/gcn-gpu/Dockerfile
+++ b/util/dockerfiles/gcn-gpu/Dockerfile
@@ -34,7 +34,8 @@
 libboost-filesystem-dev \
 libboost-system-dev \
 libboost-dev \
-libpng12-dev
+libpng12-dev \
+libelf-dev

 ARG gem5_dist=http://dist.gem5.org/dist/develop

diff --git a/util/dockerfiles/ubuntu-18.04_all-dependencies/Dockerfile  
b/util/dockerfiles/ubuntu-18.04_all-dependencies/Dockerfile

index 95511a8..282805d 100644
--- a/util/dockerfiles/ubuntu-18.04_all-dependencies/Dockerfile
+++ b/util/dockerfiles/ubuntu-18.04_all-dependencies/Dockerfile
@@ -31,4 +31,4 @@
 RUN apt -y install build-essential git m4 scons zlib1g zlib1g-dev \
 libprotobuf-dev protobuf-compiler libprotoc-dev  
libgoogle-perftools-dev \
 python-dev python python-six doxygen libboost-all-dev  
libhdf5-serial-dev \

-python-pydot libpng-dev
+python-pydot libpng-dev libelf-dev
diff --git a/util/dockerfiles/ubuntu-18.04_clang-version/Dockerfile  
b/util/dockerfiles/ubuntu-18.04_clang-version/Dockerfile

index 428bd02..b98af88 100644
--- a/util/dockerfiles/ubuntu-18.04_clang-version/Dockerfile
+++ b/util/dockerfiles/ubuntu-18.04_clang-version/Dockerfile
@@ -40,7 +40,7 @@
 RUN apt -y upgrade
 RUN apt -y install git m4 scons zlib1g zlib1g-dev clang-${version} \
 libprotobuf-dev protobuf-compiler libprotoc-dev  
libgoogle-perftools-dev \

-python-dev python python-six doxygen
+python-dev python python-six doxygen libelf-dev

 RUN apt-get --purge -y remove gcc

diff --git a/util/dockerfiles/ubuntu-18.04_gcc-version/Dockerfile  
b/util/dockerfiles/ubuntu-18.04_gcc-version/Dockerfile

index 902e4a0..5eb40b1 100644
--- a/util/dockerfiles/ubuntu-18.04_gcc-version/Dockerfile
+++ b/util/dockerfiles/ubuntu-18.04_gcc-version/Dockerfile
@@ -37,7 +37,8 @@
 RUN apt -y upgrade
 RUN apt -y install git m4 scons zlib1g zlib1g-dev gcc-multilib \
 libprotobuf-dev protobuf-compiler libprotoc-dev  
libgoogle-perftools-dev \
-python-dev python python-six doxygen wget zip gcc-${version}  
g++-${version}

+python-dev python python-six doxygen wget zip gcc-${version} \
+g++-${version} libelf-dev

 RUN update-alternatives --install \
 /usr/bin/g++ g++ /usr/bin/g++-${version} 100
diff --git a/util/dockerfiles/ubuntu-18.04_min-dependencies/Dockerfile  
b/util/dockerfiles/ubuntu-18.04_min-dependencies/Dockerfile

index 986b2b6..f55ea2d 100644
--- a/util/dockerfiles/ubuntu-18.04_min-dependencies/Dockerfile
+++ b/util/dockerfiles/ubuntu-18.04_min-dependencies/Dockerfile
@@ -29,4 +29,4 @@
 RUN apt -y update
 RUN apt -y upgrade
 RUN apt -y install build-essential scons zlib1g-dev m4 python-dev python \
-python-six
+python-six libelf-dev
diff --git a/util/dockerfiles/ubuntu-20.04_all-dependencies/Dockerfile  
b/util/dockerfiles/ubuntu-20.04_all-dependencies/Dockerfile

index 814ef75..283d356 100644
--- a/util/dockerfiles/ubuntu-20.04_all-dependencies/Dockerfile
+++ b/util/dockerfiles/ubuntu-20.04_all-dependencies/Dockerfile
@@ -32,4 +32,4 @@
 RUN apt -y install build-essential git m4 scons zlib1g zlib1g-dev \
 libprotobuf-dev protobuf-compiler libprotoc-dev  
libgoogle-perftools-dev \

 python3-dev python3-six python-is-python3 doxygen libboost-all-dev \
-libhdf5-serial-dev python3-pydot libpng-dev
+libhdf5-serial-dev python3-pydot libpng-dev libelf-dev
diff --git a/util/dockerfiles/ubuntu-20.04_gcc-version/Dockerfile  
b/util/dockerfiles/ubuntu-20.04_gcc-version/Dockerfile

index d2008b6..d952183 100644
--- 

[gem5-dev] Change in gem5/gem5[develop]: util: Added GCN-GPU to cloudbuild_create_images

2020-08-28 Thread Bobby R. Bruce (Gerrit) via gem5-dev
Bobby R. Bruce has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33595 )


Change subject: util: Added GCN-GPU to cloudbuild_create_images
..

util: Added GCN-GPU to cloudbuild_create_images

This adds the GCN-GPU Docker image to this cloudbuild yaml file. We
use this file to create our Docker images:

```
gcloud builds submit --config \
util/cloudbuild/cloudbuild_create_images.yaml
```

The GCN-GPU docker image can be obtained at:
https://gcr.io/gem5-test/gcn-gpu

Change-Id: I7564db78a9f00507f5acc6cf6098de35f98b6fb1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33595
Reviewed-by: Matt Sinclair 
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M util/cloudbuild/cloudbuild_create_images.yaml
1 file changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  Matt Sinclair: Looks good to me, but someone else must approve
  kokoro: Regressions pass



diff --git a/util/cloudbuild/cloudbuild_create_images.yaml  
b/util/cloudbuild/cloudbuild_create_images.yaml

index d4d8d4c..2faadfa 100644
--- a/util/cloudbuild/cloudbuild_create_images.yaml
+++ b/util/cloudbuild/cloudbuild_create_images.yaml
@@ -115,6 +115,11 @@
 '--build-arg', 'version=9',
 'util/dockerfiles/ubuntu-18.04_clang-version']

+- name: 'gcr.io/cloud-builders/docker'
+  args: ['build',
+'-t',
+'gcr.io/$PROJECT_ID/gcn-gpu:latest',
+'util/dockerfiles/gcn-gpu']

 images: ['gcr.io/$PROJECT_ID/ubuntu-20.04_all-dependencies:latest',
  'gcr.io/$PROJECT_ID/ubuntu-18.04_all-dependencies:latest',
@@ -132,5 +137,6 @@
  'gcr.io/$PROJECT_ID/clang-version-6.0:latest',
  'gcr.io/$PROJECT_ID/clang-version-7:latest',
  'gcr.io/$PROJECT_ID/clang-version-8:latest',
- 'gcr.io/$PROJECT_ID/clang-version-9:latest']
+ 'gcr.io/$PROJECT_ID/clang-version-9:latest',
+ 'gcr.io/$PROJECT_ID/gcn-gpu:latest']
 timeout: 18000s # 5 Hours

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33595
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: I7564db78a9f00507f5acc6cf6098de35f98b6fb1
Gerrit-Change-Number: 33595
Gerrit-PatchSet: 2
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Kyle Roarty 
Gerrit-Reviewer: Matt Sinclair 
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: Update starter_fs.py for latest Arm FS binaries.

2020-08-28 Thread Richard Cooper (Gerrit) via gem5-dev
Richard Cooper has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/30814 )


Change subject: configs: Update starter_fs.py for latest Arm FS binaries.
..

configs: Update starter_fs.py for latest Arm FS binaries.

Updated the default kernel and root device names to match the latest
Arm full-system binaries available for download on the gem5 website.

Also added a command line option to allow the root device to be
specified as an optional command line argument.

Change-Id: I27f90ffaf0f4b35c5dcc4c22ac2fbd34f8a040a4
Reviewed-by: Giacomo Travaglini 
Reviewed-by: Andreas Sandberg 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30814
Maintainer: Andreas Sandberg 
Tested-by: kokoro 
---
M configs/example/arm/starter_fs.py
1 file changed, 9 insertions(+), 5 deletions(-)

Approvals:
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



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

index 3033890..8dee137 100644
--- a/configs/example/arm/starter_fs.py
+++ b/configs/example/arm/starter_fs.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2016-2017 ARM Limited
+# Copyright (c) 2016-2017, 2020 ARM Limited
 # All rights reserved.
 #
 # The license below extends only to copyright in the software and shall
@@ -58,9 +58,9 @@
 import devices


-default_dist_version = '20170616'
-default_kernel = 'vmlinux.vexpress_gem5_v1_64.' + default_dist_version
+default_kernel = 'vmlinux.arm64'
 default_disk = 'linaro-minimal-aarch64.img'
+default_root_device = '/dev/vda1'


 # Pre-defined CPU configurations. Each tuple must be ordered as :  
(cpu_class,

@@ -112,7 +112,7 @@

 # Add the PCI devices we need for this system. The base system
 # doesn't have any PCI devices by default since they are assumed
-# to be added by the configurastion scripts needin them.
+# to be added by the configuration scripts needing them.
 system.pci_devices = [
 # Create a VirtIO block device for the system's boot
 # disk. Attach the disk image using gem5's Copy-on-Write
@@ -165,7 +165,7 @@
 # memory layout.
 "norandmaps",
 # Tell Linux where to find the root disk image.
-"root=/dev/vda",
+"root=%s" % args.root_device,
 # Mount the root disk read-write by default.
 "rw",
 # Tell Linux about the amount of physical memory present.
@@ -206,6 +206,10 @@
 parser.add_argument("--disk-image", type=str,
 default=default_disk,
 help="Disk to instantiate")
+parser.add_argument("--root-device", type=str,
+default=default_root_device,
+help="OS device name for root partition (default:  
{})"

+ .format(default_root_device))
 parser.add_argument("--script", type=str, default="",
 help = "Linux bootscript")
 parser.add_argument("--cpu", type=str, choices=list(cpu_types.keys()),

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/30814
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: I27f90ffaf0f4b35c5dcc4c22ac2fbd34f8a040a4
Gerrit-Change-Number: 30814
Gerrit-PatchSet: 2
Gerrit-Owner: Richard Cooper 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Richard Cooper 
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: Change in gem5/gem5[develop]: mem-cache: Create Compressor namespace

2020-08-28 Thread mike upton via gem5-dev
http://jenkins.gem5.org:8080/job/gem5_develop/buildTimeTrend

Yes, there is a trend tab on the build history.
The pretty graph is not showing up for some reason. I will look into that.

Note that the build machine is a 4 thread google cloud VM, so somewhat weak.


On Thu, Aug 27, 2020 at 11:58 PM Daniel Carvalho 
wrote:

> Out of curiosity, is the average execution time of these builds available
> somewhere?
>
>
> I agree that this should not concern those who are not in gem5-dev, but I
> think it was relevant to archive such an answer in gem5-users in case
> someone does not comply with this expectation and searches for a solution
> there.
>
>
> Regards,
>
> Daniel
> Em quinta-feira, 27 de agosto de 2020 20:58:40 GMT+2, Bobby Bruce via
> gem5-dev  escreveu:
>
>
> Just an FYI on this:
>
> The nightly builds don't clean the gem5 directory before pulling and
> recompiling. This saves us some build time. Obviously for stuff like this,
> we need a work around. I've therefore tweaked the building scripts with
> stuff like this:
>
> ```
> scons build/ARM/gem5.opt -j4 || (rm -rf build && scons build/ARM/gem5.opt
> -j4)
> ```
>
> Essentially, if a build fails, we start fresh and give it a second go. So,
> we shouldn't be bothered when stuff like this comes up.
>
> It would be really nice if we could improve the build system, but that's a
> longer-term goal.
>
> On the topic at hand: I agree with Jason. Non-developers should be using
> the stable master branch, which is unaffected. They'll need to do a clean
> build per release, but i don't think that's a huge ask.
>
> --
> Dr. Bobby R. Bruce
> Room 2235,
> Kemper Hall, UC Davis
> Davis,
> CA, 95616
>
> web: https://www.bobbybruce.net
>
>
> On Wed, Aug 26, 2020 at 9:56 AM Jason Lowe-Power via gem5-dev <
> gem5-dev@gem5.org> wrote:
>
> It's a good idea to send an email to gem5-users. However, with our new
> release model, it should affect many fewer people. It's probably not true
> today, but the vision is that the only people who will care if develop
> breaks something are people subscribed to gem5-dev :).
>
> Cheers,
> Jason
>
> On Wed, Aug 26, 2020 at 12:32 AM Nikos Nikoleris via gem5-dev <
> gem5-dev@gem5.org> wrote:
>
> Do we also need to notify users about this? It might be worth sending an
> email about this. In fact an email with a different subject to both
> gem5-users and gem5-dev as people might ignore emails for a specific CL.
>
> Nikos
>
> On 25/08/2020 23:17, Daniel Carvalho via gem5-dev wrote:
> > Was about to send an e-mail with a heads up, but I guess I was too late.
> >
> > As reported here
> > (
> https://gem5.atlassian.net/jira/software/c/projects/GEM5/issues/GEM5-753),
> > itis not an issue caused by this patch itself. SCons does not trigger
> > recompilation when a change modifies the cxx_class; therefore,
> > params/BaseCache.hh is not recompiled and generates the error. To solve
> > this, one must manually delete this file and force a recompilation.
> >
> > Regards,
> > Daniel
> >
> > Em terça-feira, 25 de agosto de 2020 21:20:56 GMT+2, mike upton via
> > gem5-dev  escreveu:
> >
> >
> > This checkin breaks the build.
> >
> > you can check at:
> > http://jenkins.gem5.org:8080/job/gem5_develop/136/
> >
> >
> >
> > On Tue, Aug 25, 2020 at 8:13 AM Daniel Carvalho (Gerrit) via gem5-dev
> > mailto:gem5-dev@gem5.org>> wrote:
> >
> > Daniel Carvalho *submitted* this change.
> >
> > View Change <
> https://gem5-review.googlesource.com/c/public/gem5/+/33294>
> >
> > Approvals: Nikos Nikoleris: Looks good to me, approved; Looks good
> > to me, approved kokoro: Regressions pass
> >
> > mem-cache: Create Compressor namespace
> >
> > Creation of the Compressor namespace. It encapsulates all the cache
> > compressors, and other classes used by them.
> >
> > The following classes have been renamed:
> > BaseCacheCompressor -> Base
> > PerfectCompressor - Perfect
> > RepeatedQwordsCompressor -> RepeatedQwords
> > ZeroCompressor -> Zero
> >
> > BaseDictionaryCompressor and DictionaryCompressor were not renamed
> > because the there is a high probability that users may want to
> > create a Dictionary class that encompasses the dictionary contained
> > by these compressors.
> >
> > To apply this patch one must force recompilation (e.g., by deleting
> > it) of build//params/BaseCache.hh (and any other files that
> > were previously using these compressors).
> >
> > Change-Id: I78cb3b6fb8e3e50a52a04268e0e08dd664d81230
> > Signed-off-by: Daniel R. Carvalho  oda...@yahoo.com.br>>
> > Reviewed-on:
> https://gem5-review.googlesource.com/c/public/gem5/+/33294
> > Reviewed-by: Nikos Nikoleris  nikos.nikole...@arm.com>>
> > Maintainer: Nikos Nikoleris  nikos.nikole...@arm.com>>
> > Tested-by: kokoro  noreply%2bkok...@google.com>>
> > ---
> > M src/mem/cache/base.hh
> > M src/mem/cache/compressors/Compressors.py
> > M src/mem/cache/compressors/base.cc
> >

[gem5-dev] Change in gem5/gem5[develop]: arch-arm: Fix coding style in addressTranslation methods

2020-08-28 Thread Giacomo Travaglini (Gerrit) via gem5-dev
Giacomo Travaglini has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33434 )


Change subject: arch-arm: Fix coding style in addressTranslation methods
..

arch-arm: Fix coding style in addressTranslation methods

armFault -> arm_fault

Change-Id: I6263b105f8757b34dd15a06b16abe7289073614d
Signed-off-by: Giacomo Travaglini 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33434
Reviewed-by: Nikos Nikoleris 
Tested-by: kokoro 
---
M src/arch/arm/isa.cc
1 file changed, 10 insertions(+), 10 deletions(-)

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



diff --git a/src/arch/arm/isa.cc b/src/arch/arm/isa.cc
index 6ef9fe3..0c312d0 100644
--- a/src/arch/arm/isa.cc
+++ b/src/arch/arm/isa.cc
@@ -2359,15 +2359,15 @@
   "MISCREG: Translated addr %#x: PAR_EL1: %#xx\n",
   val, par);
 } else {
-ArmFault *armFault = static_cast(fault.get());
-armFault->update(tc);
+ArmFault *arm_fault = static_cast(fault.get());
+arm_fault->update(tc);
 // Set fault bit and FSR
-FSR fsr = armFault->getFsr(tc);
+FSR fsr = arm_fault->getFsr(tc);

 par.f = 1; // F bit
 par.fst = fsr.status; // FST
-par.ptw = (armFault->iss() >> 7) & 0x1; // S1PTW
-par.s = armFault->isStage2() ? 1 : 0; // S
+par.ptw = (arm_fault->iss() >> 7) & 0x1; // S1PTW
+par.s = arm_fault->isStage2() ? 1 : 0; // S

 DPRINTF(MiscRegs,
 "MISCREG: Translated addr %#x fault fsr %#x: PAR: %#x\n",
@@ -2418,15 +2418,15 @@
"MISCREG: Translated addr 0x%08x: PAR: 0x%08x\n",
val, par);
 } else {
-ArmFault *armFault = static_cast(fault.get());
-armFault->update(tc);
+ArmFault *arm_fault = static_cast(fault.get());
+arm_fault->update(tc);
 // Set fault bit and FSR
-FSR fsr = armFault->getFsr(tc);
+FSR fsr = arm_fault->getFsr(tc);

 par.f = 0x1; // F bit
 par.lpae = fsr.lpae;
-par.ptw = (armFault->iss() >> 7) & 0x1;
-par.s = armFault->isStage2() ? 1 : 0;
+par.ptw = (arm_fault->iss() >> 7) & 0x1;
+par.s = arm_fault->isStage2() ? 1 : 0;

 if (par.lpae) {
 // LPAE - rearange fault status

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33434
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: I6263b105f8757b34dd15a06b16abe7289073614d
Gerrit-Change-Number: 33434
Gerrit-PatchSet: 3
Gerrit-Owner: Giacomo Travaglini 
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]: arch-arm: Check if PAC is implemented before executing insts

2020-08-28 Thread Giacomo Travaglini (Gerrit) via gem5-dev
Giacomo Travaglini has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33455 )


Change subject: arch-arm: Check if PAC is implemented before executing insts
..

arch-arm: Check if PAC is implemented before executing insts

If Armv8.3-PAuth (PAC) extension is not supported, most instrucions
will trigger an Undefined Instruction fault; except for a group of
them living in the HINT space; those should be treated as NOP.

Change-Id: Idec920ed15e0310ec9132a3cb3701cdb7e7cf9d1
Signed-off-by: Giacomo Travaglini 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33455
Reviewed-by: Andreas Sandberg 
Maintainer: Andreas Sandberg 
Tested-by: kokoro 
---
M src/arch/arm/isa/insts/pauth.isa
1 file changed, 66 insertions(+), 44 deletions(-)

Approvals:
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/arch/arm/isa/insts/pauth.isa  
b/src/arch/arm/isa/insts/pauth.isa

index 4c5b371..4806e6a 100644
--- a/src/arch/arm/isa/insts/pauth.isa
+++ b/src/arch/arm/isa/insts/pauth.isa
@@ -1,5 +1,6 @@
 // -*- mode:c++ -*-

+// Copyright (c) 2020 ARM Limited
 // Copyright (c) 2020 Metempsy Technology Consulting
 // All rights reserved
 //
@@ -41,20 +42,39 @@
 decoder_output = ""
 exec_output = ""

+def pacEnabledCode(hint):
+if hint:
+code = """
+if (!HavePACExt(xc->tcBase())) {
+return NoFault;
+}
+"""
+else:
+code = """
+if (!HavePACExt(xc->tcBase())) {
+return std::make_shared(
+machInst, true);
+}
+"""
+return code

-def buildPauthObject(mnem, templateBase, opcode, optArgs=[]):
+def buildPauthObject(mnem, templateBase, opcode, hint, optArgs=[]):
 global header_output, decoder_output, exec_output
-pac_code = '''//uint64_t val = 0;
-uint64_t res;
-fault = %(op)s(xc->tcBase(), %(op1)s, %(op2)s, );
-XDest = res;
-'''
+pac_code = '''
+%(enabled)s
+
+uint64_t res;
+fault = %(op)s(xc->tcBase(), %(op1)s, %(op2)s, );
+XDest = res;
+'''
 if templateBase=='DataX2Reg':
-code = pac_code % {"op1": 'Op164',
+code = pac_code % {"enabled": pacEnabledCode(hint),
+   "op1": 'Op164',
"op2": 'Op264',
"op":  opcode }
 else:
-code = pac_code % {"op1": 'XDest',
+code = pac_code % {"enabled": pacEnabledCode(hint),
+   "op1": 'XDest',
"op2": 'Op164',
"op":  opcode }

@@ -63,13 +83,15 @@
 decoder_output += eval(templateBase + "Constructor").subst(iop)
 exec_output += BasicExecute.subst(iop)

-def buildXPauthObject(mnem, optArgs=[]):
+def buildXPauthObject(mnem, hint, optArgs=[]):
 global header_output, decoder_output, exec_output
 templateBase = "XPauthOpRegReg"

-code =  'uint64_t res;\n'\
-'fault = stripPAC(xc->tcBase(), XDest, data, );\n'
-code += 'XDest = res;'
+code = pacEnabledCode(hint) + """
+uint64_t res;
+fault = stripPAC(xc->tcBase(), XDest, data, );
+XDest = res;
+"""
 regoptype = 'RegOp'

 iop = InstObjParams(mnem, mnem, regoptype, code, optArgs)
@@ -78,42 +100,42 @@
 exec_output += BasicExecute.subst(iop)


-buildPauthObject("Pacda",  "DataX1Reg", 'addPACDA')
-buildPauthObject("Pacdza", "DataX1Reg", 'addPACDA')
-buildPauthObject("Pacdb",  "DataX1Reg", 'addPACDB')
-buildPauthObject("Pacdzb", "DataX1Reg", 'addPACDB')
-buildPauthObject("Pacga",  "DataX2Reg", 'addPACGA')
+buildPauthObject("Pacda",  "DataX1Reg", 'addPACDA', hint=False)
+buildPauthObject("Pacdza", "DataX1Reg", 'addPACDA', hint=False)
+buildPauthObject("Pacdb",  "DataX1Reg", 'addPACDB', hint=False)
+buildPauthObject("Pacdzb", "DataX1Reg", 'addPACDB', hint=False)
+buildPauthObject("Pacga",  "DataX2Reg", 'addPACGA', hint=False)

-buildPauthObject("Pacia", "DataX1Reg", 'addPACIA')
-buildPauthObject("Pacia1716", "DataX1Reg", 'addPACIA')
-buildPauthObject("Paciasp",   "DataX1Reg", 'addPACIA')
-buildPauthObject("Paciaz","DataX1Reg", 'addPACIA')
-buildPauthObject("Paciza","DataX1Reg", 'addPACIA')
+buildPauthObject("Pacia", "DataX1Reg", 'addPACIA', hint=False)
+buildPauthObject("Pacia1716", "DataX1Reg", 'addPACIA', hint=True)
+buildPauthObject("Paciasp",   "DataX1Reg", 'addPACIA', hint=True)
+buildPauthObject("Paciaz","DataX1Reg", 'addPACIA', 

[gem5-dev] Change in gem5/gem5[develop]: arch-arm: Introduce HavePACExt helper

2020-08-28 Thread Giacomo Travaglini (Gerrit) via gem5-dev
Giacomo Travaglini has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33454 )


Change subject: arch-arm: Introduce HavePACExt helper
..

arch-arm: Introduce HavePACExt helper

This will check for presence of pointer authentication extension.
According to the reference manual, Pointer authentication is
implemented if the value of at least one of

ID_AA64ISAR1_EL1.{APA, API, GPA, GPI}

is not 0b.

Change-Id: I4e98e65758e8edc953794e5b618d2c6c3f6000ae
Signed-off-by: Giacomo Travaglini 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33454
Reviewed-by: Andreas Sandberg 
Maintainer: Andreas Sandberg 
Tested-by: kokoro 
---
M src/arch/arm/utility.cc
M src/arch/arm/utility.hh
2 files changed, 9 insertions(+), 0 deletions(-)

Approvals:
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/arch/arm/utility.cc b/src/arch/arm/utility.cc
index ad0a3da..a189c4a 100644
--- a/src/arch/arm/utility.cc
+++ b/src/arch/arm/utility.cc
@@ -315,6 +315,14 @@
 }

 bool
+HavePACExt(ThreadContext *tc)
+{
+AA64ISAR1 id_aa64isar1 = tc->readMiscReg(MISCREG_ID_AA64ISAR1_EL1);
+return id_aa64isar1.api | id_aa64isar1.apa |
+id_aa64isar1.gpi | id_aa64isar1.gpa;
+}
+
+bool
 HaveVirtHostExt(ThreadContext *tc)
 {
 AA64MMFR1 id_aa64mmfr1 = tc->readMiscReg(MISCREG_ID_AA64MMFR1_EL1);
diff --git a/src/arch/arm/utility.hh b/src/arch/arm/utility.hh
index f00f606..f17ebc5 100644
--- a/src/arch/arm/utility.hh
+++ b/src/arch/arm/utility.hh
@@ -151,6 +151,7 @@
 return opModeToEL((OperatingMode) (uint8_t)cpsr.mode);
 }

+bool HavePACExt(ThreadContext *tc);
 bool HaveVirtHostExt(ThreadContext *tc);
 bool HaveSecureEL2Ext(ThreadContext *tc);
 bool IsSecureEL2Enabled(ThreadContext *tc);

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33454
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: I4e98e65758e8edc953794e5b618d2c6c3f6000ae
Gerrit-Change-Number: 33454
Gerrit-PatchSet: 2
Gerrit-Owner: Giacomo Travaglini 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Giacomo Travaglini 
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]: python: Add support for introspecting scalar stats

2020-08-28 Thread Andreas Sandberg (Gerrit) via gem5-dev
Andreas Sandberg has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33176 )


Change subject: python: Add support for introspecting scalar stats
..

python: Add support for introspecting scalar stats

This change adds a wrapper for the ScalarInfo stat type to enable
introspection of scalar stats from Python. Due to the slightly
confusing use of proxy objects in the stat system, PyBind11 fails to
automatically cast to the right wrapper type. This is worked around in
the by explicitly casting to the relevant type's Python wrapper.

To make the interface more Python-friendly, this change also changes
the semantics of resolveStat to raise an exception if the stat can't
be found.

Change-Id: If1fc6fe238fc9d69d4e22369a4988a06407d2f7c
Signed-off-by: Andreas Sandberg 
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33176
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/python/pybind11/stats.cc
1 file changed, 46 insertions(+), 2 deletions(-)

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



diff --git a/src/python/pybind11/stats.cc b/src/python/pybind11/stats.cc
index 1149eba..b146aa3 100644
--- a/src/python/pybind11/stats.cc
+++ b/src/python/pybind11/stats.cc
@@ -54,6 +54,25 @@

 namespace py = pybind11;

+static const py::object
+cast_stat_info(const Stats::Info *info)
+{
+/* PyBind11 gets confused by the InfoProxy magic, so we need to
+ * explicitly cast to the right wrapper type. */
+
+#define TRY_CAST(T) do {\
+auto _stat = dynamic_cast(info); \
+if (_stat)  \
+return py::cast(_stat); \
+} while (0)
+
+TRY_CAST(Stats::ScalarInfo);
+
+return py::cast(info);
+
+#undef TRY_CAST
+}
+
 namespace Stats {

 void
@@ -120,14 +139,39 @@
 .def("visit", ::Info::visit)
 ;

+py::class_>(
+   m, "ScalarInfo")
+.def("value", ::ScalarInfo::value)
+.def("result", ::ScalarInfo::result)
+.def("total", ::ScalarInfo::total)
+;
+
 py::class_>(
 m, "Group")
 .def("regStats", ::Group::regStats)
 .def("resetStats", ::Group::resetStats)
 .def("preDumpStats", ::Group::preDumpStats)
-.def("getStats", ::Group::getStats)
+.def("getStats", [](const Stats::Group )
+ -> std::vector {
+
+ auto stats = self.getStats();
+std::vector py_stats;
+py_stats.reserve(stats.size());
+std::transform(stats.begin(), stats.end(),
+   std::back_inserter(py_stats),
+   cast_stat_info);
+return py_stats;
+})
 .def("getStatGroups", ::Group::getStatGroups)
 .def("addStatGroup", ::Group::addStatGroup)
-.def("resolveStat", ::Group::resolveStat)
+.def("resolveStat", [](const Stats::Group ,
+   const std::string ) -> py::object {
+ const Stats::Info *stat = self.resolveStat(name);
+ if (!stat)
+ throw pybind11::key_error("Unknown stat name");
+
+ return cast_stat_info(stat);
+ })
 ;
 }

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33176
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: If1fc6fe238fc9d69d4e22369a4988a06407d2f7c
Gerrit-Change-Number: 33176
Gerrit-PatchSet: 3
Gerrit-Owner: Andreas Sandberg 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Ciro Santilli 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-Reviewer: Richard Cooper 
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]: tests: Use a docker image to build gem5.

2020-08-28 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33647 )


Change subject: tests: Use a docker image to build gem5.
..

tests: Use a docker image to build gem5.

This will give us control over what tools and packages are in the image,
instead of relying on what is provided on the kokoro build machines.

Change-Id: I9a9cdedfca4d2e9f31b3e918e01bc660e4d23f64
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33647
Maintainer: Gabe Black 
Reviewed-by: Jason Lowe-Power 
Tested-by: kokoro 
---
A tests/jenkins/presubmit-stage2.sh
M tests/jenkins/presubmit.sh
2 files changed, 63 insertions(+), 8 deletions(-)

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



diff --git a/tests/jenkins/presubmit-stage2.sh  
b/tests/jenkins/presubmit-stage2.sh

new file mode 100755
index 000..be90b2b
--- /dev/null
+++ b/tests/jenkins/presubmit-stage2.sh
@@ -0,0 +1,49 @@
+#!/bin/bash
+#
+# Copyright (c) 2018 The Regents of the University of California
+# All rights reserved
+#
+# The license below extends only to copyright in the software and shall
+# not be construed as granting a license to any other intellectual
+# property including but not limited to intellectual property relating
+# to a hardware implementation of the functionality of the software
+# licensed hereunder.  You may use the software subject to the license
+# terms below provided that you ensure that this notice is replicated
+# unmodified and in its entirety in all distributions of the software,
+# modified or unmodified, in source code or in binary form.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met: redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer;
+# redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution;
+# neither the name of the copyright holders nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+set -e
+
+# Use ccache with the default directory for caching
+#XXX Not available in docker image.
+#export PATH="/usr/lib/ccache:$PATH"
+
+# Build with 4 threads (i.e., pass -j4 to scons)
+# Run 4 tests in parallel
+# Look for tests in the gem5 subdirectory
+# Once complete, run the Google Tests
+cd tests
+./main.py run -j4 -t4 gem5 && scons -C .. build/NULL/unittests.opt
diff --git a/tests/jenkins/presubmit.sh b/tests/jenkins/presubmit.sh
index 6ae96f5..68a7320 100755
--- a/tests/jenkins/presubmit.sh
+++ b/tests/jenkins/presubmit.sh
@@ -37,13 +37,19 @@

 set -e

-# Use ccache with the default directory for caching
-export PATH="/usr/lib/ccache:$PATH"
+DOCKER_IMAGE=gcr.io/gem5-test/ubuntu-20.04_all-dependencies
+PRESUBMIT_STAGE2=tests/jenkins/presubmit-stage2.sh

-cd git/jenkins-gem5-prod/tests
+# Move the docker base directory to tempfs.
+sudo /etc/init.d/docker stop
+sudo mv /var/lib/docker /tmpfs/
+sudo ln -s /tmpfs/docker /var/lib/docker
+sudo /etc/init.d/docker start

-# Build with 4 threads (i.e., pass -j4 to scons)
-# Run 4 tests in parallel
-# Look for tests in the gem5 subdirectory
-# Once complete, run the Google Tests
-./main.py run -j4 -t4 gem5 && scons -C .. build/NULL/unittests.opt
+# Move the CWD to the gem5 checkout.
+cd git/jenkins-gem5-prod/
+
+# Enter a docker image which has all the tools we need, and run the actual
+# presubmit tests.
+docker run -u $UID:$GID --volume $(pwd):$(pwd) -w $(pwd) --rm \
+"${DOCKER_IMAGE}" "${PRESUBMIT_STAGE2}"

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/33647
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: 

[gem5-dev] Change in gem5/gem5[develop]: cpu: Factor the page size out of the decode cache.

2020-08-28 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33204 )


Change subject: cpu: Factor the page size out of the decode cache.
..

cpu: Factor the page size out of the decode cache.

There isn't anything special about using the page size, and it creates
an artificial dependence on the ISA. Instead of being based on pages,
the cache is now based on "chunks" who's size is a template parameter.
It defaults to 4K which is a common page size, but it can be tuned
arbitrarily if necessary.

Some unnecessary includes have been trimmed out as well.

Change-Id: I9fe59a5668d702433a800884fbfbdce20e0ade97
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33204
Reviewed-by: Jason Lowe-Power 
Reviewed-by: Daniel Carvalho 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M src/cpu/decode_cache.hh
1 file changed, 45 insertions(+), 38 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, but someone else must approve
  Daniel Carvalho: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/cpu/decode_cache.hh b/src/cpu/decode_cache.hh
index a4ce349..20b6783 100644
--- a/src/cpu/decode_cache.hh
+++ b/src/cpu/decode_cache.hh
@@ -31,16 +31,9 @@

 #include 

-#include "arch/isa_traits.hh"
-#include "arch/types.hh"
-#include "config/the_isa.hh"
+#include "base/bitfield.hh"
 #include "cpu/static_inst_fwd.hh"

-namespace TheISA
-{
-class Decoder;
-}
-
 namespace DecodeCache
 {

@@ -49,78 +42,92 @@
 using InstMap = std::unordered_map;

 /// A sparse map from an Addr to a Value, stored in page chunks.
-template
+template
 class AddrMap
 {
   protected:
-// A pages worth of cache entries.
-struct CachePage {
-Value items[TheISA::PageBytes];
+static constexpr Addr CacheChunkBytes = 1ULL << CacheChunkShift;
+
+static constexpr Addr
+chunkOffset(Addr addr)
+{
+return addr & (CacheChunkBytes - 1);
+}
+
+static constexpr Addr
+chunkStart(Addr addr)
+{
+return addr & ~(CacheChunkBytes - 1);
+}
+
+// A chunk of cache entries.
+struct CacheChunk
+{
+Value items[CacheChunkBytes];
 };
-// A map of cache pages which allows a sparse mapping.
-typedef typename std::unordered_map PageMap;
-typedef typename PageMap::iterator PageIt;
+// A map of cache chunks which allows a sparse mapping.
+typedef typename std::unordered_map ChunkMap;
+typedef typename ChunkMap::iterator ChunkIt;
 // Mini cache of recent lookups.
-PageIt recent[2];
-PageMap pageMap;
+ChunkIt recent[2];
+ChunkMap chunkMap;

 /// Update the mini cache of recent lookups.
 /// @param recentest The most recent result;
 void
-update(PageIt recentest)
+update(ChunkIt recentest)
 {
 recent[1] = recent[0];
 recent[0] = recentest;
 }

-/// Attempt to find the CacheePage which goes with a particular
+/// Attempt to find the CacheChunk which goes with a particular
 /// address. First check the small cache of recent results, then
 /// actually look in the hash map.
 /// @param addr The address to look up.
-CachePage *
-getPage(Addr addr)
+CacheChunk *
+getChunk(Addr addr)
 {
-Addr page_addr = addr & ~(TheISA::PageBytes - 1);
+Addr chunk_addr = chunkStart(addr);

 // Check against recent lookups.
-if (recent[0] != pageMap.end()) {
-if (recent[0]->first == page_addr)
+if (recent[0] != chunkMap.end()) {
+if (recent[0]->first == chunk_addr)
 return recent[0]->second;
-if (recent[1] != pageMap.end() &&
-recent[1]->first == page_addr) {
+if (recent[1] != chunkMap.end() &&
+recent[1]->first == chunk_addr) {
 update(recent[1]);
 // recent[1] has just become recent[0].
 return recent[0]->second;
 }
 }

-// Actually look in the has_map.
-PageIt it = pageMap.find(page_addr);
-if (it != pageMap.end()) {
+// Actually look in the hash_map.
+ChunkIt it = chunkMap.find(chunk_addr);
+if (it != chunkMap.end()) {
 update(it);
 return it->second;
 }

-// Didn't find an existing page, so add a new one.
-CachePage *newPage = new CachePage;
-page_addr = page_addr & ~(TheISA::PageBytes - 1);
-typename PageMap::value_type to_insert(page_addr, newPage);
-update(pageMap.insert(to_insert).first);
-return newPage;
+// Didn't find an existing chunk, so add a new one.
+CacheChunk *newChunk = new CacheChunk;
+typename ChunkMap::value_type to_insert(chunk_addr, newChunk);
+update(chunkMap.insert(to_insert).first);
+return newChunk;
 }

  

[gem5-dev] Change in gem5/gem5[develop]: misc: Clean up usage of arch/isa_traits.hh.

2020-08-28 Thread Gabe Black (Gerrit) via gem5-dev
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/33203 )


Change subject: misc: Clean up usage of arch/isa_traits.hh.
..

misc: Clean up usage of arch/isa_traits.hh.

isa_traits.hh used to have much more in it, but now it only has
PageShift, PageBytes, and (for now) the guest endianness. These values
should only be retrieved from the System class generally speaking, so
only the system class should include arch/isa_traits.hh.

Some gpu compute related files need PageBytes or PageShift. Even though
those files don't advertise their ISA dependence, they are tied to x86.
In those files, they can include arch/x86/isa_traits.hh.

The only other file which legitimately needs arch/isa_traits.hh is the
decoder cache since it uses PageBytes to size an array.

Change-Id: I12686368715623e3140a68a7027c136bd52567b1
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33203
Reviewed-by: Gabe Black 
Reviewed-by: Daniel Carvalho 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M src/arch/generic/memhelpers.hh
M src/arch/riscv/registers.hh
M src/cpu/base.hh
M src/cpu/checker/cpu_impl.hh
M src/cpu/exetrace.cc
M src/cpu/o3/dyn_inst.hh
M src/cpu/o3/fetch_impl.hh
M src/cpu/o3/impl.hh
M src/cpu/o3/lsq_unit.hh
M src/cpu/o3/regfile.hh
M src/cpu/o3/rename_impl.hh
M src/cpu/pred/bpred_unit.cc
M src/cpu/pred/simple_indirect.hh
M src/cpu/simple_thread.cc
M src/cpu/simple_thread.hh
M src/dev/storage/ide_disk.cc
M src/dev/virtio/base.hh
M src/gpu-compute/compute_unit.cc
M src/gpu-compute/gpu_tlb.cc
M src/gpu-compute/shader.cc
M src/gpu-compute/shader.hh
M src/gpu-compute/tlb_coalescer.cc
M src/gpu-compute/tlb_coalescer.hh
M src/kern/linux/helpers.cc
M src/mem/cache/prefetch/base.hh
M src/sim/faults.cc
M src/sim/process.cc
M src/sim/syscall_emul.cc
28 files changed, 11 insertions(+), 29 deletions(-)

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



diff --git a/src/arch/generic/memhelpers.hh b/src/arch/generic/memhelpers.hh
index ffdf543..d08bea9 100644
--- a/src/arch/generic/memhelpers.hh
+++ b/src/arch/generic/memhelpers.hh
@@ -41,7 +41,6 @@
 #ifndef __ARCH_GENERIC_MEMHELPERS_HH__
 #define __ARCH_GENERIC_MEMHELPERS_HH__

-#include "arch/isa_traits.hh"
 #include "base/types.hh"
 #include "mem/packet.hh"
 #include "mem/request.hh"
diff --git a/src/arch/riscv/registers.hh b/src/arch/riscv/registers.hh
index 9b899e3..7ce59e3 100644
--- a/src/arch/riscv/registers.hh
+++ b/src/arch/riscv/registers.hh
@@ -52,7 +52,6 @@
 #include "arch/generic/types.hh"
 #include "arch/generic/vec_pred_reg.hh"
 #include "arch/generic/vec_reg.hh"
-#include "arch/isa_traits.hh"
 #include "arch/riscv/generated/max_inst_regs.hh"
 #include "base/types.hh"

diff --git a/src/cpu/base.hh b/src/cpu/base.hh
index 5c0c709..3ef5519 100644
--- a/src/cpu/base.hh
+++ b/src/cpu/base.hh
@@ -51,7 +51,6 @@
 #include "arch/null/cpu_dummy.hh"
 #else
 #include "arch/generic/interrupts.hh"
-#include "arch/isa_traits.hh"
 #include "base/statistics.hh"
 #include "mem/port_proxy.hh"
 #include "sim/clocked_object.hh"
diff --git a/src/cpu/checker/cpu_impl.hh b/src/cpu/checker/cpu_impl.hh
index 0656035..c6d2cf8 100644
--- a/src/cpu/checker/cpu_impl.hh
+++ b/src/cpu/checker/cpu_impl.hh
@@ -45,7 +45,6 @@
 #include 
 #include 

-#include "arch/isa_traits.hh"
 #include "base/refcnt.hh"
 #include "config/the_isa.hh"
 #include "cpu/base_dyn_inst.hh"
diff --git a/src/cpu/exetrace.cc b/src/cpu/exetrace.cc
index c9c8b68..ca05041 100644
--- a/src/cpu/exetrace.cc
+++ b/src/cpu/exetrace.cc
@@ -43,7 +43,6 @@
 #include 
 #include 

-#include "arch/isa_traits.hh"
 #include "arch/utility.hh"
 #include "base/loader/symtab.hh"
 #include "config/the_isa.hh"
diff --git a/src/cpu/o3/dyn_inst.hh b/src/cpu/o3/dyn_inst.hh
index c326058..d5f142c 100644
--- a/src/cpu/o3/dyn_inst.hh
+++ b/src/cpu/o3/dyn_inst.hh
@@ -44,7 +44,6 @@

 #include 

-#include "arch/isa_traits.hh"
 #include "config/the_isa.hh"
 #include "cpu/o3/cpu.hh"
 #include "cpu/o3/isa_specific.hh"
diff --git a/src/cpu/o3/fetch_impl.hh b/src/cpu/o3/fetch_impl.hh
index 7ecab54..314e014 100644
--- a/src/cpu/o3/fetch_impl.hh
+++ b/src/cpu/o3/fetch_impl.hh
@@ -49,7 +49,6 @@
 #include 

 #include "arch/generic/tlb.hh"
-#include "arch/isa_traits.hh"
 #include "arch/utility.hh"
 #include "base/random.hh"
 #include "base/types.hh"
diff --git a/src/cpu/o3/impl.hh b/src/cpu/o3/impl.hh
index b7f43c5..1d73577 100644
--- a/src/cpu/o3/impl.hh
+++ b/src/cpu/o3/impl.hh
@@ -29,7 +29,6 @@
 #ifndef __CPU_O3_IMPL_HH__
 #define __CPU_O3_IMPL_HH__

-#include "arch/isa_traits.hh"
 #include "config/the_isa.hh"
 #include "cpu/o3/cpu_policy.hh"

diff --git a/src/cpu/o3/lsq_unit.hh b/src/cpu/o3/lsq_unit.hh
index 16dddfd..06d43ee 100644
--- a/src/cpu/o3/lsq_unit.hh
+++ b/src/cpu/o3/lsq_unit.hh
@@ -49,7 +49,6 @@

 #include