[gem5-dev] Change in gem5/gem5[develop]: cpu: Remove the "profile" parameter and plumbing.

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



Change subject: cpu: Remove the "profile" parameter and plumbing.
..

cpu: Remove the "profile" parameter and plumbing.

This parameter is associated with a periodic event which would take a
sample for a kernel profile in FS mode. Unfortunately the only ISA which
had working versions of the necessary classes was alpha, and that has
been deleted. That means that without additional work for any given ISA,
the profile parameter has no chance of working.

Ideally, this parameter should be moved to the Workload classes. There
it can intrinsically be tied to a particular kernel, rather than having
to assume a particular kernel and gate everything on whether you're in
FS mode.

Because this isn't (IMHO) where this parameter should live in the long
term, and because it's currently unusable without additional development
for each of the ISAs, I think it makes the most sense to remove the
front end for this mechanism from the CPU.

Since the sampling/profiling mechanism itself could be useful and could
be re-plumbed somewhere else, the back end and its classes are left alone.

Change-Id: I2a3319c1d5ad0ef8c99f5d35953b93c51b2a8a0b
---
M src/arch/arm/fastmodel/iris/thread_context.hh
M src/cpu/BaseCPU.py
M src/cpu/base.cc
M src/cpu/base.hh
M src/cpu/checker/thread_context.hh
M src/cpu/o3/commit_impl.hh
M src/cpu/o3/thread_context.hh
M src/cpu/o3/thread_context_impl.hh
M src/cpu/o3/thread_state.hh
M src/cpu/simple/base.cc
M src/cpu/simple_thread.cc
M src/cpu/simple_thread.hh
M src/cpu/thread_context.hh
M src/cpu/thread_state.cc
M src/cpu/thread_state.hh
15 files changed, 1 insertion(+), 211 deletions(-)



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

index 8386e23..363e1d7 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.hh
+++ b/src/arch/arm/fastmodel/iris/thread_context.hh
@@ -238,12 +238,6 @@
 void halt() override { setStatus(Halted); }

 void
-dumpFuncProfile() override
-{
-panic("%s not implemented.", __FUNCTION__);
-}
-
-void
 takeOverFrom(::ThreadContext *old_context) override
 {
 panic("%s not implemented.", __FUNCTION__);
@@ -264,17 +258,6 @@
 }

 void
-profileClear() override
-{
-panic("%s not implemented.", __FUNCTION__);
-}
-void
-profileSample() override
-{
-panic("%s not implemented.", __FUNCTION__);
-}
-
-void
 copyArchRegs(::ThreadContext *tc) override
 {
 panic("%s not implemented.", __FUNCTION__);
diff --git a/src/cpu/BaseCPU.py b/src/cpu/BaseCPU.py
index e487cbb..96e96fc 100644
--- a/src/cpu/BaseCPU.py
+++ b/src/cpu/BaseCPU.py
@@ -148,8 +148,6 @@
 do_statistics_insts = Param.Bool(True,
 "enable statistics pseudo instructions")

-profile = Param.Latency('0ns', "trace the kernel stack")
-
 wait_for_remote_gdb = Param.Bool(False,
 "Wait for a remote GDB connection");

diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index c903145..084c1e5 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -54,7 +54,6 @@
 #include "base/output.hh"
 #include "base/trace.hh"
 #include "cpu/checker/cpu.hh"
-#include "cpu/profile.hh"
 #include "cpu/thread_context.hh"
 #include "debug/Mwait.hh"
 #include "debug/SyscallVerbose.hh"
@@ -127,8 +126,7 @@
   _dataMasterId(p->system->getMasterId(this, "data")),
   _taskId(ContextSwitchTaskId::Unknown), _pid(invldPid),
   _switchedOut(p->switched_out),  
_cacheLineSize(p->system->cacheLineSize()),

-  interrupts(p->interrupts), profileEvent(NULL),
-  numThreads(p->numThreads), system(p->system),
+  interrupts(p->interrupts), numThreads(p->numThreads),  
system(p->system),

   previousCycle(0), previousState(CPU_STATE_SLEEP),
   functionTraceStream(nullptr), currentFunctionStart(0),
   currentFunctionEnd(0), functionEntryTick(0),
@@ -169,12 +167,6 @@
 }
 }

-if (FullSystem) {
-if (params()->profile)
-profileEvent = new EventFunctionWrapper(
-[this]{ processProfileEvent(); },
-name());
-}
 tracer = params()->tracer;

 if (params()->isa.size() != numThreads) {
@@ -191,7 +183,6 @@

 BaseCPU::~BaseCPU()
 {
-delete profileEvent;
 }

 void
@@ -307,11 +298,6 @@
 void
 BaseCPU::startup()
 {
-if (FullSystem) {
-if (!params()->switched_out && profileEvent)
-schedule(profileEvent, curTick());
-}
-
 if (params()->progress_interval) {
 new CPUProgressEvent(this, params()->progress_interval);
 }
@@ -536,8 +522,6 @@
 {
 assert(!_switchedOut);
 _switchedOut = true;
-if (profileEvent && profileEvent->scheduled())
-deschedule(profileEvent);

 // Flush all TLBs in the CPU to avoid having stale translations if
 // it get

[gem5-dev] Change in gem5/gem5[develop]: arch: Remove the stacktrace.hh switching header file.

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



Change subject: arch: Remove the stacktrace.hh switching header file.
..

arch: Remove the stacktrace.hh switching header file.

This is no longer used.

Change-Id: I1419b28d51ff603beb7d8ab89632ad7038c3057e
---
M src/arch/SConscript
1 file changed, 0 insertions(+), 1 deletion(-)



diff --git a/src/arch/SConscript b/src/arch/SConscript
index 978f72a..89c89c1 100644
--- a/src/arch/SConscript
+++ b/src/arch/SConscript
@@ -65,7 +65,6 @@
 pseudo_inst.hh
 registers.hh
 remote_gdb.hh
-stacktrace.hh
 types.hh
 utility.hh
 '''),

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32215
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: I1419b28d51ff603beb7d8ab89632ad7038c3057e
Gerrit-Change-Number: 32215
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] Minimum scons version?

2020-08-05 Thread Gabe Black via gem5-dev
Hi folks. Our scons scripts currently require (through a
programmatic check) that you're using at least version 0.98.1. Since scons
is now up to version 4.0, this version is ancient and so we effectively
don't have a minimum.

Because scons adds features, fixes bugs, etc, over time, it would be
helpful to have a more specific range of versions to target so that we have
a better idea what API we're writing against. For example, there are two
workarounds in our scons setup right now, one for a bug which I believe was
fixed in version 3.0, and one we can avoid needing using a feature added in
version 2.5.

I did a *tiny* bit of research, and I see that, at least as far as I can
tell, The current Ubuntu LTS uses scons version 3.0. Would making this a
minimum cause anyone any problems? That would let us remove both of the
workarounds mentioned above, and doesn't seem like it would be so new that
people might not have it.

We'd probably want to ask on the user list too just to be safe, but the dev
list seems like a good place to start.

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

[gem5-dev] Change in gem5/gem5[develop]: scons: Remove the plumbing for running regression tests from scons.

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


Change subject: scons: Remove the plumbing for running regression tests  
from scons.

..

scons: Remove the plumbing for running regression tests from scons.

All of these tests have been migrated to the new framework, so there's
no reason to leave the old plumbing lying around.

Change-Id: Iaa5412864354d5754a68a9f53f30aa42f07ec2eb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32117
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
Maintainer: Bobby R. Bruce 
---
M src/SConscript
D tests/SConscript
2 files changed, 0 insertions(+), 255 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/SConscript b/src/SConscript
index 0b3127f..66db2f7 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -1315,11 +1315,6 @@
 new_env.Command(secondary_exename, new_env.M5Binary,
 MakeAction('ln $SOURCE $TARGET', Transform("HARDLINK")))

-# Set up regression tests.
-SConscript(os.path.join(env.root.abspath, 'tests', 'SConscript'),
-   variant_dir=Dir('tests').Dir(new_env.Label),
-   exports={ 'env' : new_env }, duplicate=False)
-
 # Start out with the compiler flags common to all compilers,
 # i.e. they all use -g for opt and -g -pg for prof
 ccflags = {'debug' : [], 'opt' : ['-g'], 'fast' : [], 'prof' :  
['-g', '-pg'],

@@ -1374,9 +1369,6 @@
 return ext
 if ext in obj2target:
 return obj2target[ext]
-match = re.search(r'/tests/([^/]+)/', t)
-if match and match.group(1) in target_types:
-return match.group(1)
 return 'all'

 needed_envs = [identifyTarget(target) for target in BUILD_TARGETS]
diff --git a/tests/SConscript b/tests/SConscript
deleted file mode 100644
index 0ecdee1..000
--- a/tests/SConscript
+++ /dev/null
@@ -1,247 +0,0 @@
-# -*- mode:python -*-
-#
-# Copyright (c) 2016 ARM Limited
-# All rights reserved
-#
-# The license below extends only to copyright in the software and shall
-# not be construed as granting a license to any other intellectual
-# property including but not limited to intellectual property relating
-# to a hardware implementation of the functionality of the software
-# licensed hereunder.  You may use the software subject to the license
-# terms below provided that you ensure that this notice is replicated
-# unmodified and in its entirety in all distributions of the software,
-# modified or unmodified, in source code or in binary form.
-#
-# Copyright (c) 2004-2006 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.
-
-from __future__ import print_function
-
-from SCons.Script.SConscript import SConsEnvironment
-import os
-import pickle
-import sys
-
-sys.path.insert(0, Dir(".").srcnode().abspath)
-import testing.tests as tests
-import testing.results as results
-from gem5_scons.util import get_termcap
-
-Import('env')
-
-# get the termcap from the environment
-termcap = get_termcap()
-
-# Dict that accumulates lists of tests by category (quick, medium, long)
-env.Tests = {}
-gpu_isa = env['TARGET_GPU_ISA'] if env['BUILD_GPU'] else None
-for cat in tests.all_categories:
-env.Tests[cat] = tuple(
-tests.get_tests(env["TARGET_ISA"],
-categories=(cat, ),
-ruby_protocol=env["PROTO

[gem5-dev] Change in gem5/gem5[develop]: tests: Get rid of the tests/tests.py script.

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


Change subject: tests: Get rid of the tests/tests.py script.
..

tests: Get rid of the tests/tests.py script.

This script was to manage and run the old style regression tests, which
have all been deleted.

Change-Id: I573f8e4ca0d61cb12de18f280ffabbb45a5443e8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32118
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
Maintainer: Bobby R. Bruce 
---
D tests/tests.py
1 file changed, 0 insertions(+), 346 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/tests/tests.py b/tests/tests.py
deleted file mode 100755
index df46b41..000
--- a/tests/tests.py
+++ /dev/null
@@ -1,346 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright (c) 2016 ARM Limited
-# All rights reserved
-#
-# The license below extends only to copyright in the software and shall
-# not be construed as granting a license to any other intellectual
-# property including but not limited to intellectual property relating
-# to a hardware implementation of the functionality of the software
-# licensed hereunder.  You may use the software subject to the license
-# terms below provided that you ensure that this notice is replicated
-# unmodified and in its entirety in all distributions of the software,
-# modified or unmodified, in source code or in binary form.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met: redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer;
-# redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution;
-# neither the name of the copyright holders nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (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.
-
-from __future__ import print_function
-
-import argparse
-import sys
-import os
-import pickle
-
-from testing.tests import *
-import testing.results
-
-class ParagraphHelpFormatter(argparse.HelpFormatter):
-def _fill_text(self, text, width, indent):
-return "\n\n".join([
-super(ParagraphHelpFormatter, self)._fill_text(p, width,  
indent) \

-for p in text.split("\n\n") ])
-
-formatters = {
-"junit" : testing.results.JUnit,
-"text" : testing.results.Text,
-"summary" : testing.results.TextSummary,
-"pickle" : testing.results.Pickle,
-}
-
-
-def _add_format_args(parser):
-parser.add_argument("--format", choices=formatters, default="text",
-help="Output format")
-
-parser.add_argument("--no-junit-xlate-names", action="store_true",
-help="Don't translate test names to " \
-"package-like names")
-
-parser.add_argument("--output", "-o",
-type=argparse.FileType('w'), default=sys.stdout,
-help="Test result output file")
-
-
-def _create_formatter(args):
-formatter = formatters[args.format]
-kwargs = {
-"fout" : args.output,
-"verbose" : args.verbose
-}
-
-if issubclass(formatter, testing.results.JUnit):
-kwargs.update({
-"translate_names" : not args.no_junit_xlate_names,
-})
-
-return formatter(**kwargs)
-
-
-def _list_tests_args(subparsers):
-parser = subparsers.add_parser(
-"list",
-formatter_class=ParagraphHelpFormatter,
-help="List available tests",
-description="List available tests",
-epilog="""
-Generate a list of available tests using a list filter.
-
-The filter is a string consisting of the target ISA optionally
-followed by the test category and mode separated by
-slashes. The tes

[gem5-dev] Change in gem5/gem5[develop]: tests: Get rid of the now unused diff-out script.

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


Change subject: tests: Get rid of the now unused diff-out script.
..

tests: Get rid of the now unused diff-out script.

This script had been used to compare the output of gem5 regression
tests to a golden reference, but all the tests that used it have been
deleted.

Change-Id: Ib65e4271ce8081dd5994b412ac2240869ab02d44
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32120
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
Maintainer: Bobby R. Bruce 
---
D tests/diff-out
D tests/legacy-configs/run.py
2 files changed, 0 insertions(+), 493 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/tests/diff-out b/tests/diff-out
deleted file mode 100755
index 6b0b239..000
--- a/tests/diff-out
+++ /dev/null
@@ -1,374 +0,0 @@
-#!/usr/bin/perl
-# Copyright (c) 2001-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.
-
-#
-# This script diffs two SimpleScalar statistics output files.
-#
-
-use Getopt::Std;
-
-getopts('adn:t:h');
-
-if ($#ARGV < 1)
-{
-print "\nError: need two file arguments ( ).\n";
-print "   Options: -d = Ignore distributions\n";
-print "-a = Sort errors alphabetically (default: by  
percentage)\n";

-print "-h = Diff header info separately from stats\n";
-print "-n  = Print top  errors (default 20, 0  
for all)\n";
-print "-t  = Ignore errors below  percent  
(default 0)\n\n";

-exit;
-}
-
-open(REF, "<$ARGV[0]") or die "Error: can't open $ARGV[0].\n";
-open(NEW, "<$ARGV[1]") or die "Error: can't open $ARGV[1].\n";
-
-
-#
-# Things that really should be adjustable via the command line
-#
-
-# Ignorable error (in percent)
-$err_thresh = defined($opt_t) ? $opt_t : 0;
-
-# Number of stats to print before omitting
-$omit_count = defined($opt_n) ? $opt_n : 20;
-
-
-#
-# First copy everything up to the simulation statistics to a pair of
-# temporary files, stripping out date-related items, and do a plain
-# diff.  Any differences in the arguments are not necessarily an issue;
-# any differences in the program output should be caught by the EIO
-# mechanism if an EIO file is used.
-#
-
-# copy_header takes input filehandle and output filename
-
-sub copy_header
-{
-my ($inhandle, $outname) = @_;
-
-open(OUTPUT, ">$outname") or die "Error: can't open $outname.\n";
-
-while (<$inhandle>)
-{
-   # strip out lines that can vary
-	next if /^(command line:|M5 compiled on |M5 simulation started |M5  
executing on )/;

-   last if /Begin Simulation Statistics/;
-   print OUTPUT;
-}
-close OUTPUT;
-}
-
-if ($opt_h) {
-
-# Diff header separately from stats
-
-$refheader = "/tmp/smt-test.refheader.$$";
-$newheader = "/tmp/smt-test.newheader.$$";
-
-copy_header(\*REF, $refheader);
-copy_header(\*NEW, $newheader);
-
-print "\n= Header and program output differences =\n\n";
-
-print `diff $refheader $newheader`;
-
-print "\n= Statistics differences =\n\n";
-}
-
-#
-# Now parse statistics
-#
-
-#
-# This function takes an open filehandle and returns a reference to
-# a hash containing all the statistics variables and their values.
-#
-sub parse_file
-{
-$stathandle = shift;
-
-$in_dist =

[gem5-dev] Change in gem5/gem5[develop]: util: Delete the util/regress script.

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


Change subject: util: Delete the util/regress script.
..

util: Delete the util/regress script.

This script was for running the old style scons based tests, but those
have all been deleted.

Change-Id: I644516a89ecafb611903ca304ced254e47e2e063
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32121
Tested-by: kokoro 
Reviewed-by: Jason Lowe-Power 
Maintainer: Bobby R. Bruce 
---
D util/regress
1 file changed, 0 insertions(+), 170 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/util/regress b/util/regress
deleted file mode 100755
index e7187757..000
--- a/util/regress
+++ /dev/null
@@ -1,170 +0,0 @@
-#! /usr/bin/env python2.7
-# Copyright (c) 2005-2007 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.
-
-import sys
-import os
-import optparse
-import datetime
-from subprocess import call
-
-progname = os.path.basename(sys.argv[0])
-
-optparser = optparse.OptionParser()
-add_option = optparser.add_option
-add_option('-v', '--verbose', action='store_true', default=False,
-   help='echo commands before executing')
-add_option('--builds',
-   default='ARM,' \
-   'MIPS,' \
-   'NULL,' \
-   'NULL_MOESI_hammer,' \
-   'NULL_MESI_Two_Level,'  \
-   'NULL_MOESI_CMP_directory,' \
-   'NULL_MOESI_CMP_token,' \
-   'POWER,' \
-   'SPARC,' \
-   'X86,X86_MESI_Two_Level,' \
-   'RISCV,' \
-   'GCN3_X86',
-   help="comma-separated build targets to test  
(default: '%default')")

-add_option('--modes',
-   default='se,fs',
-   help="comma-separated modes to test (default: '%default')")
-add_option('--test-variants', default='opt',
-   help="comma-separated build variants to test  
(default: '%default')"\

-   ", set to '' for none")
-add_option('--compile-variants', default='debug,fast',
-   help="comma-separated build variants to compile only (not  
test) " \

-   "(default: '%default'), set to '' for none", metavar='VARIANTS')
-add_option('--scons-opts', default='', metavar='OPTS',
-   help='scons options')
-add_option('-j', '--jobs', type='int', default=1, metavar='N',
-   help='number of parallel jobs to use (0 to use all cores)')
-add_option('-k', '--keep-going', action='store_true',
-   help='keep going after errors')
-add_option('--update-ref', action='store_true',
-   help='update reference outputs')
-add_option('-D', '--build-dir', default='', metavar='DIR',
-   help='build directory location')
-add_option('-n', "--no-exec", default=False, action='store_true',
-   help="don't actually invoke scons, just echo SCons command  
line")

-
-(options, tests) = optparser.parse_args()
-
-
-# split a comma-separated list, but return an empty list if given the
-# empty string
-def split_if_nonempty(s):
-if not s:
-return []
-return s.split(',')
-
-# split list options on ',' to get Python lists
-builds = split_if_nonempty(options.builds)
-modes = split_if_nonempty(options.modes)
-test_variants = split_if_nonempty(options.test_variants)
-compile_variants = split_if_nonempty(options.compile_variants)
-
-options.build_dir = os.path.joi

[gem5-dev] Re: Minimum scons version?

2020-08-05 Thread Bobby Bruce via gem5-dev
I've got no problem with this.

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

web: https://www.bobbybruce.net


On Wed, Aug 5, 2020 at 12:33 AM Gabe Black via gem5-dev 
wrote:

> Hi folks. Our scons scripts currently require (through a
> programmatic check) that you're using at least version 0.98.1. Since scons
> is now up to version 4.0, this version is ancient and so we effectively
> don't have a minimum.
>
> Because scons adds features, fixes bugs, etc, over time, it would be
> helpful to have a more specific range of versions to target so that we have
> a better idea what API we're writing against. For example, there are two
> workarounds in our scons setup right now, one for a bug which I believe was
> fixed in version 3.0, and one we can avoid needing using a feature added in
> version 2.5.
>
> I did a *tiny* bit of research, and I see that, at least as far as I can
> tell, The current Ubuntu LTS uses scons version 3.0. Would making this a
> minimum cause anyone any problems? That would let us remove both of the
> workarounds mentioned above, and doesn't seem like it would be so new that
> people might not have it.
>
> We'd probably want to ask on the user list too just to be safe, but the
> dev list seems like a good place to start.
>
> 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: AMD GCN3 - HSA Memory Mapping

2020-08-05 Thread Matt Sinclair via gem5-dev
Hi Sampad,

I don't know the answer to this question directly, but I'm CC'ing the AMD
folks who hopefully can provide the answer.  I mentioned this to Matt P
earlier and he thinks it may be a bug.

Thanks,
Matt

On Fri, Jul 31, 2020 at 10:47 AM Sampad Mohapatra via gem5-dev <
gem5-dev@gem5.org> wrote:

> Hi All,
>
> I have two queries related to apu_se.py.
>
> (1)
> In both AMD staging and public/develop, apu_se.py has two unused variables:
>
>   hsapp_gpu_map_vaddr = 0x2
>   hsapp_gpu_map_size = 0x1000
>
> Are they unnecessary or should they actually be used somewhere ?
>
> (2)
> The following is passed as pioAddr to the HSAPacketProcessor.
>   hsapp_gpu_map_paddr = int(Addr(options.mem_size))
>
> And then the following assignment is done.
>   # Map workload to this address space
>   host_cpu.workload[0].map(0x1000, 0x2, 4096)
>
> Should the physical address to the workload map be the same as pioAddr of
> HSAPacketProcessor, i.e. greater than physical memory size and should the
> virtual address of the workload map remain 0x1000 ?
>
> As a whole, are the above mentioned variables related ? If yes, then how ?
> Are some of them accidentally hardcoded and should actually be variables?
> Please advise.
>
> Thank you,
> Sampad
> ___
> 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]: utils,tests: Enable passing of build args to compiler-tests.sh

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


Change subject: utils,tests: Enable passing of build args to  
compiler-tests.sh

..

utils,tests: Enable passing of build args to compiler-tests.sh

Previously we passed "-j `nproc`" to the scons. This a greedy approach
that should not be default. This change was introduced so the "-j" flag
may be passed via the "util/compiler-tests.sh" script.

Change-Id: I2e891ae3a9819770bd3ef15b95b81b7f5b71f7fa
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/31734
Reviewed-by: Hoa Nguyen 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M util/compiler-tests.sh
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/util/compiler-tests.sh b/util/compiler-tests.sh
index c586c27..c8fce4b 100755
--- a/util/compiler-tests.sh
+++ b/util/compiler-tests.sh
@@ -8,7 +8,6 @@
 dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
 gem5_root="${dir}/.."
 build_dir="${gem5_root}/build"
-num_cores=`nproc`

 # All Docker images in the gem5 testing GCR which we want to compile with.
 images=("gcc-version-10"
@@ -61,7 +60,7 @@
 base_url="gcr.io/gem5-test"

 # Arguments passed into scons on every build target test.
-build_args="-j ${num_cores}"
+build_args="$@"

 # Testing directory variables
 mkdir -p "${build_dir}" # Create the build directory if it doesn't exist.

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/31734
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: I2e891ae3a9819770bd3ef15b95b81b7f5b71f7fa
Gerrit-Change-Number: 31734
Gerrit-PatchSet: 3
Gerrit-Owner: Bobby R. Bruce 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Hoa Nguyen 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: arch-gcn3: Free registers when execMask = 0

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



Change subject: arch-gcn3: Free registers when execMask = 0
..

arch-gcn3: Free registers when execMask = 0

Flat instructions free some of their registers through a call to
scheduleWriteOperandsFromLoad(), which is executed in  
GlobalMemPipeline::exec.


When execMask is 0, the instruction returns without issuing a memory  
request.


This patch adds in a call to scheduleWriteOperandsFromLoad() when execMask
is 0 for Flat instructions that are either Loads or AtomicReturns, as those
are the instructions that call scheduleWriteOperandsFromLoad() in the memory
pipeline.

This patch also adds in a missing return statement when execMask is 0 in one
of the Flat instructions.

Change-Id: I09296adb7401e7515d3cedceb780a5df4598b109
---
M src/arch/gcn3/insts/instructions.cc
1 file changed, 74 insertions(+), 0 deletions(-)



diff --git a/src/arch/gcn3/insts/instructions.cc  
b/src/arch/gcn3/insts/instructions.cc

index 6e81e2c..cc8a9fb 100644
--- a/src/arch/gcn3/insts/instructions.cc
+++ b/src/arch/gcn3/insts/instructions.cc
@@ -39406,6 +39406,9 @@
 wf->decLGKMInstsIssued();
 wf->rdGmReqsInPipe--;
 wf->rdLmReqsInPipe--;
+gpuDynInst->exec_mask = wf->execMask();
+wf->computeUnit->vfg[wf->simdId]->
+scheduleWriteOperandsFromLoad(wf, gpuDynInst);
 return;
 }

@@ -39504,6 +39507,9 @@
 wf->decLGKMInstsIssued();
 wf->rdGmReqsInPipe--;
 wf->rdLmReqsInPipe--;
+gpuDynInst->exec_mask = wf->execMask();
+wf->computeUnit->vfg[wf->simdId]->
+scheduleWriteOperandsFromLoad(wf, gpuDynInst);
 return;
 }

@@ -39602,6 +39608,9 @@
 wf->decLGKMInstsIssued();
 wf->rdGmReqsInPipe--;
 wf->rdLmReqsInPipe--;
+gpuDynInst->exec_mask = wf->execMask();
+wf->computeUnit->vfg[wf->simdId]->
+scheduleWriteOperandsFromLoad(wf, gpuDynInst);
 return;
 }

@@ -39672,6 +39681,9 @@
 wf->decLGKMInstsIssued();
 wf->rdGmReqsInPipe--;
 wf->rdLmReqsInPipe--;
+gpuDynInst->exec_mask = wf->execMask();
+wf->computeUnit->vfg[wf->simdId]->
+scheduleWriteOperandsFromLoad(wf, gpuDynInst);
 return;
 }

@@ -39742,6 +39754,9 @@
 wf->decLGKMInstsIssued();
 wf->rdGmReqsInPipe--;
 wf->rdLmReqsInPipe--;
+gpuDynInst->exec_mask = wf->execMask();
+wf->computeUnit->vfg[wf->simdId]->
+scheduleWriteOperandsFromLoad(wf, gpuDynInst);
 return;
 }

@@ -39821,6 +39836,10 @@
 wf->decLGKMInstsIssued();
 wf->rdGmReqsInPipe--;
 wf->rdLmReqsInPipe--;
+gpuDynInst->exec_mask = wf->execMask();
+wf->computeUnit->vfg[wf->simdId]->
+scheduleWriteOperandsFromLoad(wf, gpuDynInst);
+return;
 }

 gpuDynInst->execUnitId = wf->execUnitId;
@@ -40355,6 +40374,11 @@
 wf->decLGKMInstsIssued();
 wf->wrGmReqsInPipe--;
 wf->rdGmReqsInPipe--;
+if (instData.GLC) {
+gpuDynInst->exec_mask = wf->execMask();
+wf->computeUnit->vfg[wf->simdId]->
+scheduleWriteOperandsFromLoad(wf, gpuDynInst);
+}
 return;
 }

@@ -40457,6 +40481,11 @@
 wf->decLGKMInstsIssued();
 wf->wrGmReqsInPipe--;
 wf->rdGmReqsInPipe--;
+if (instData.GLC) {
+gpuDynInst->exec_mask = wf->execMask();
+wf->computeUnit->vfg[wf->simdId]->
+scheduleWriteOperandsFromLoad(wf, gpuDynInst);
+}
 return;
 }

@@ -40560,6 +40589,11 @@
 wf->decLGKMInstsIssued();
 wf->wrGmReqsInPipe--;
 wf->rdGmReqsInPipe--;
+if (instData.GLC) {
+gpuDynInst->exec_mask = wf->execMask();
+wf->computeUnit->vfg[wf->simdId]->
+scheduleWriteOperandsFromLoad(wf, gpuDynInst);
+}
 return;
 }

@@ -40650,6 +40684,11 @@
 wf->decLGKMInstsIssued();
 wf->wrGmReqsInPipe--;
 wf->rdGmReqsInPipe--;
+if (instData.GLC) {
+gpuDynInst->exec_mask = wf->execMask();
+wf->computeUnit->vfg[wf->simdId]->
+scheduleWriteOperandsFromLoad(wf, gpuDynInst);
+}
 return;
 }

@@ -40914,6 +40953,11 @@
 wf->decLGKMInstsIssued();
 wf->wrGmReqsInPipe--;
 wf->rdGmReqsInPipe--;
+if (instData.GLC) {
+

[gem5-dev] Change in gem5/gem5[develop]: util: Install python six module

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



Change subject: util: Install python six module
..

util: Install python six module

six is used in develop, but wasn't used in the GCN staging branch.

Change-Id: Ic1ca42df871d1e683c288282497267d00421609f
---
M util/dockerfiles/gcn-gpu/Dockerfile
1 file changed, 3 insertions(+), 0 deletions(-)



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

index 475918f..1033160 100644
--- a/util/dockerfiles/gcn-gpu/Dockerfile
+++ b/util/dockerfiles/gcn-gpu/Dockerfile
@@ -23,6 +23,7 @@
 python-dev \
 python \
 python-yaml \
+python-pip \
 wget \
 libpci3 \
 libelf1 \
@@ -34,6 +35,8 @@
 libboost-system-dev \
 libboost-dev

+RUN pip install six
+
 ARG gem5_dist=http://dist.gem5.org/dist/develop

 # Install ROCm 1.6 binaries

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

[gem5-dev] Change in gem5/gem5[develop]: arch-gcn3: make read2st64_b32 write proper registers

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



Change subject: arch-gcn3: make read2st64_b32 write proper registers
..

arch-gcn3: make read2st64_b32 write proper registers

Per the GCN3 ISA, read2st64_b32 writes to consecutive registers

Change-Id: Ibc1672584a72cf7de12e06068a03fe304b34dce2
---
M src/arch/gcn3/insts/instructions.cc
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/arch/gcn3/insts/instructions.cc  
b/src/arch/gcn3/insts/instructions.cc

index 6e81e2c..955d801 100644
--- a/src/arch/gcn3/insts/instructions.cc
+++ b/src/arch/gcn3/insts/instructions.cc
@@ -32206,7 +32206,7 @@
 Inst_DS__DS_READ2ST64_B32::completeAcc(GPUDynInstPtr gpuDynInst)
 {
 VecOperandU32 vdst0(gpuDynInst, extData.VDST);
-VecOperandU32 vdst1(gpuDynInst, extData.VDST + 2);
+VecOperandU32 vdst1(gpuDynInst, extData.VDST + 1);

 for (int lane = 0; lane < NumVecElemPerVecReg; ++lane) {
 if (gpuDynInst->exec_mask[lane]) {

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

[gem5-dev] Change in gem5/gem5[develop]: scons: Remove explicitly set defaults in calls to AddOption.

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


Change subject: scons: Remove explicitly set defaults in calls to AddOption.
..

scons: Remove explicitly set defaults in calls to AddOption.

Like the optparse module's add_option method, most keyword arguments
have sensible default values. We should avoid setting those explicitly
when calling AddOption, since it usually doesn't make anything clearer
and just adds more text to wade through.

Change-Id: I70e425d9f1a0da1cafcc3d7dd24bfde18c0b3f35
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32116
Tested-by: kokoro 
Reviewed-by: Gabe Black 
Maintainer: Gabe Black 
---
M SConstruct
1 file changed, 14 insertions(+), 17 deletions(-)

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



diff --git a/SConstruct b/SConstruct
index 27a5a61..96bb979 100755
--- a/SConstruct
+++ b/SConstruct
@@ -138,36 +138,33 @@
help="Add color to abbreviated scons output")
 AddLocalOption('--no-colors', dest='use_colors', action='store_false',
help="Don't add color to abbreviated scons output")
-AddLocalOption('--with-cxx-config', dest='with_cxx_config',
-   action='store_true',
+AddLocalOption('--with-cxx-config', action='store_true',
help="Build with support for C++-based configuration")
-AddLocalOption('--default', dest='default', type='string', action='store',
+AddLocalOption('--default',
help='Override which build_opts file to use for defaults')
-AddLocalOption('--ignore-style', dest='ignore_style', action='store_true',
+AddLocalOption('--ignore-style', action='store_true',
help='Disable style checking hooks')
-AddLocalOption('--gold-linker', dest='gold_linker', action='store_true',
+AddLocalOption('--gold-linker', action='store_true',
help='Use the gold linker')
-AddLocalOption('--no-lto', dest='no_lto', action='store_true',
+AddLocalOption('--no-lto', action='store_true',
help='Disable Link-Time Optimization for fast')
-AddLocalOption('--force-lto', dest='force_lto', action='store_true',
+AddLocalOption('--force-lto', action='store_true',
help='Use Link-Time Optimization instead of partial  
linking' +
 ' when the compiler doesn\'t support using them  
together.')

-AddLocalOption('--update-ref', dest='update_ref', action='store_true',
+AddLocalOption('--update-ref', action='store_true',
help='Update test reference outputs')
-AddLocalOption('--verbose', dest='verbose', action='store_true',
+AddLocalOption('--verbose', action='store_true',
help='Print full tool command lines')
-AddLocalOption('--without-python', dest='without_python',
-   action='store_true',
+AddLocalOption('--without-python', action='store_true',
help='Build without Python configuration support')
-AddLocalOption('--without-tcmalloc', dest='without_tcmalloc',
-   action='store_true',
+AddLocalOption('--without-tcmalloc', action='store_true',
help='Disable linking against tcmalloc')
-AddLocalOption('--with-ubsan', dest='with_ubsan', action='store_true',
+AddLocalOption('--with-ubsan', action='store_true',
help='Build with Undefined Behavior Sanitizer if available')
-AddLocalOption('--with-asan', dest='with_asan', action='store_true',
+AddLocalOption('--with-asan', action='store_true',
help='Build with Address Sanitizer if available')
-AddLocalOption('--with-systemc-tests', dest='with_systemc_tests',
-   action='store_true', help='Build systemc tests')
+AddLocalOption('--with-systemc-tests', action='store_true',
+   help='Build systemc tests')

 from gem5_scons import Transform, error, warning, summarize_warnings


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32116
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: I70e425d9f1a0da1cafcc3d7dd24bfde18c0b3f35
Gerrit-Change-Number: 32116
Gerrit-PatchSet: 5
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: scons: Delete the now unused --update-ref option.

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


Change subject: scons: Delete the now unused --update-ref option.
..

scons: Delete the now unused --update-ref option.

This option was for use with the old scons based regression tests.
Those had been deleted for a while, but some other bits and pieces
related to them were still lying around, depending on this option. Now
that those have been cleaned up, this option can go away.

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

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



diff --git a/SConstruct b/SConstruct
index 96bb979..4dc48ae 100755
--- a/SConstruct
+++ b/SConstruct
@@ -151,8 +151,6 @@
 AddLocalOption('--force-lto', action='store_true',
help='Use Link-Time Optimization instead of partial  
linking' +
 ' when the compiler doesn\'t support using them  
together.')

-AddLocalOption('--update-ref', action='store_true',
-   help='Update test reference outputs')
 AddLocalOption('--verbose', action='store_true',
help='Print full tool command lines')
 AddLocalOption('--without-python', action='store_true',

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32122
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: I95b41dd0a14c51e74d1e527eb40e09f49aaeaf7e
Gerrit-Change-Number: 32122
Gerrit-PatchSet: 5
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Re: AMD GCN3 - HSA Memory Mapping

2020-08-05 Thread Poremba, Matthew via gem5-dev
[AMD Official Use Only - Approved for External Use]

Hi Sampad,


I'm fairly certain the map call is not needed. The scripts I use do not have 
this, for example. My guess is this was intended to be 
"map(hsapp_gpu_map_vaddr, hsapp_gpu_map_paddr, hsapp_gpu_map_size)".  If that 
is the case the unused variables and the map call can be removed from the 
script.


-Matt

From: Matt Sinclair 
Sent: Wednesday, August 5, 2020 10:32 AM
To: gem5 Developer List 
Cc: Poremba, Matthew ; Beckmann, Brad 
; Gutierrez, Anthony ; Dutu, 
Alexandru 
Subject: Re: [gem5-dev] AMD GCN3 - HSA Memory Mapping

[CAUTION: External Email]
Hi Sampad,

I don't know the answer to this question directly, but I'm CC'ing the AMD folks 
who hopefully can provide the answer.  I mentioned this to Matt P earlier and 
he thinks it may be a bug.

Thanks,
Matt

On Fri, Jul 31, 2020 at 10:47 AM Sampad Mohapatra via gem5-dev 
mailto:gem5-dev@gem5.org>> wrote:
Hi All,

I have two queries related to apu_se.py.

(1)
In both AMD staging and public/develop, apu_se.py has two unused variables:

  hsapp_gpu_map_vaddr = 0x2
  hsapp_gpu_map_size = 0x1000

Are they unnecessary or should they actually be used somewhere ?

(2)
The following is passed as pioAddr to the HSAPacketProcessor.
  hsapp_gpu_map_paddr = int(Addr(options.mem_size))

And then the following assignment is done.
  # Map workload to this address space
  host_cpu.workload[0].map(0x1000, 0x2, 4096)

Should the physical address to the workload map be the same as pioAddr of 
HSAPacketProcessor, i.e. greater than physical memory size and should the 
virtual address of the workload map remain 0x1000 ?

As a whole, are the above mentioned variables related ? If yes, then how ?
Are some of them accidentally hardcoded and should actually be variables?
Please advise.

Thank you,
Sampad
___
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]: sim: Convert stat functions to use VPtr.

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


Change subject: sim: Convert stat functions to use VPtr.
..

sim: Convert stat functions to use VPtr.

Change-Id: I1fe43ad7508b5fbbcbf6c84195858455fc8f3e85
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29402
Reviewed-by: Matthew Poremba 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M src/sim/syscall_emul.hh
1 file changed, 97 insertions(+), 167 deletions(-)

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



diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 5569578..f793dfd 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -554,11 +554,12 @@
  buffer.  Also copies the target buffer out to the simulated
  memory space.  Used by stat(), fstat(), and lstat().

-template 
+template 
 void
-convertStatBuf(target_stat &tgt, host_stat *host,
-   ByteOrder bo, bool fakeTTY=false)
+copyOutStatBuf(TgtStatPtr tgt, HostStatPtr host, bool fakeTTY=false)
 {
+constexpr ByteOrder bo = OS::byteOrder;
+
 if (fakeTTY)
 tgt->st_dev = 0xA;
 else
@@ -602,13 +603,15 @@

 // Same for stat64

-template 
+template 
 void
-convertStat64Buf(target_stat &tgt, host_stat64 *host,
- ByteOrder bo, bool fakeTTY=false)
+copyOutStat64Buf(TgtStatPtr tgt, HostStatPtr host,
+ bool fakeTTY=false)
 {
-convertStatBuf(tgt, host, bo, fakeTTY);
+copyOutStatBuf(tgt, host, fakeTTY);
 #if defined(STAT_HAVE_NSEC)
+constexpr ByteOrder bo = OS::byteOrder;
+
 tgt->st_atime_nsec = host->st_atime_nsec;
 tgt->st_atime_nsec = htog(tgt->st_atime_nsec, bo);
 tgt->st_mtime_nsec = host->st_mtime_nsec;
@@ -622,38 +625,11 @@
 #endif
 }

-// Here are a couple of convenience functions
-template
+template 
 void
-copyOutStatBuf(PortProxy &mem, Addr addr,
-   hst_stat *host, bool fakeTTY = false)
+copyOutStatfsBuf(TgtStatPtr tgt, HostStatPtr host)
 {
-typedef TypedBufferArg tgt_stat_buf;
-tgt_stat_buf tgt(addr);
-convertStatBuf(tgt, host, OS::byteOrder,  
fakeTTY);

-tgt.copyOut(mem);
-}
-
-template
-void
-copyOutStat64Buf(PortProxy &mem, Addr addr,
- hst_stat64 *host, bool fakeTTY = false)
-{
-typedef TypedBufferArg tgt_stat_buf;
-tgt_stat_buf tgt(addr);
-convertStat64Buf(
-tgt, host, OS::byteOrder, fakeTTY);
-tgt.copyOut(mem);
-}
-
-template 
-void
-copyOutStatfsBuf(PortProxy &mem, Addr addr,
- hst_statfs *host)
-{
-TypedBufferArg tgt(addr);
-
-const ByteOrder bo = OS::byteOrder;
+constexpr ByteOrder bo = OS::byteOrder;

 tgt->f_type = htog(host->f_type, bo);
 #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
@@ -687,8 +663,6 @@
  */
 memset(&tgt->f_spare, 0, sizeof(tgt->f_spare));
 #endif
-
-tgt.copyOut(mem);
 }

 /// Target ioctl() handler.  For the most part, programs call ioctl()
@@ -979,18 +953,15 @@
 /// Target sysinfo() handler.
 template 
 SyscallReturn
-sysinfoFunc(SyscallDesc *desc, ThreadContext *tc, Addr info)
+sysinfoFunc(SyscallDesc *desc, ThreadContext *tc,
+VPtr sysinfo)
 {
 auto process = tc->getProcessPtr();

-TypedBufferArg sysinfo(info);
-
 sysinfo->uptime = seconds_since_epoch;
 sysinfo->totalram = process->system->memSize();
 sysinfo->mem_unit = 1;

-sysinfo.copyOut(tc->getVirtProxy());
-
 return 0;
 }

@@ -1199,7 +1170,8 @@
 /// Target stat() handler.
 template 
 SyscallReturn
-statFunc(SyscallDesc *desc, ThreadContext *tc, Addr pathname, Addr bufPtr)
+statFunc(SyscallDesc *desc, ThreadContext *tc,
+ Addr pathname, VPtr tgt_stat)
 {
 std::string path;
 auto process = tc->getProcessPtr();
@@ -1216,7 +1188,7 @@
 if (result < 0)
 return -errno;

-copyOutStatBuf(tc->getVirtProxy(), bufPtr, &hostBuf);
+copyOutStatBuf(tgt_stat, &hostBuf);

 return 0;
 }
@@ -1225,7 +1197,8 @@
 /// Target stat64() handler.
 template 
 SyscallReturn
-stat64Func(SyscallDesc *desc, ThreadContext *tc, Addr pathname, Addr  
bufPtr)

+stat64Func(SyscallDesc *desc, ThreadContext *tc,
+   Addr pathname, VPtr tgt_stat)
 {
 std::string path;
 auto process = tc->getProcessPtr();
@@ -1247,7 +1220,7 @@
 if (result < 0)
 return -errno;

-copyOutStat64Buf(tc->getVirtProxy(), bufPtr, &hostBuf);
+copyOutStat64Buf(tgt_stat, &hostBuf);

 return 0;
 }
@@ -1257,7 +1230,7 @@
 template 
 SyscallReturn
 fstatat64Func(SyscallDesc *desc, ThreadContext *tc,
-  int dirfd, Addr pathname, Addr bufPtr)
+  int dirfd, Addr pathname, VPtr  
tgt_stat)

 {
 auto process = tc->getProcessPtr();
 if (dirfd != OS::TGT_AT_FDCWD)
@@ -1281,7 +1254,7 @@
 if (result < 0)
 return -errno;

-copyOutStat64Buf(tc->getVir

[gem5-dev] Change in gem5/gem5[develop]: arch: Use VPtr for uname.

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


Change subject: arch: Use VPtr for uname.
..

arch: Use VPtr for uname.

Change-Id: Ia4b6c9135f16e6c68bbcf3a9c15ba7433a0a6682
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29403
Maintainer: Gabe Black 
Tested-by: kokoro 
Reviewed-by: Matthew Poremba 
---
M src/arch/arm/linux/process.cc
M src/arch/mips/linux/process.cc
M src/arch/power/linux/process.cc
M src/arch/riscv/linux/process.cc
M src/arch/sparc/linux/syscalls.cc
M src/arch/sparc/solaris/process.cc
M src/arch/x86/linux/process.cc
7 files changed, 14 insertions(+), 41 deletions(-)

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



diff --git a/src/arch/arm/linux/process.cc b/src/arch/arm/linux/process.cc
index a78c8e2..65f1cd1 100644
--- a/src/arch/arm/linux/process.cc
+++ b/src/arch/arm/linux/process.cc
@@ -100,10 +100,9 @@

 /// Target uname() handler.
 static SyscallReturn
-unameFunc32(SyscallDesc *desc, ThreadContext *tc, Addr utsname)
+unameFunc32(SyscallDesc *desc, ThreadContext *tc, VPtr  
name)

 {
 auto process = tc->getProcessPtr();
-TypedBufferArg name(utsname);

 strcpy(name->sysname, "Linux");
 strcpy(name->nodename, "m5.eecs.umich.edu");
@@ -111,16 +110,14 @@
 strcpy(name->version, "#1 SMP Sat Dec  1 00:00:00 GMT 2012");
 strcpy(name->machine, "armv7l");

-name.copyOut(tc->getVirtProxy());
 return 0;
 }

 /// Target uname() handler.
 static SyscallReturn
-unameFunc64(SyscallDesc *desc, ThreadContext *tc, Addr utsname)
+unameFunc64(SyscallDesc *desc, ThreadContext *tc, VPtr  
name)

 {
 auto process = tc->getProcessPtr();
-TypedBufferArg name(utsname);

 strcpy(name->sysname, "Linux");
 strcpy(name->nodename, "gem5");
@@ -128,7 +125,6 @@
 strcpy(name->version, "#1 SMP Sat Dec  1 00:00:00 GMT 2012");
 strcpy(name->machine, "armv8l");

-name.copyOut(tc->getVirtProxy());
 return 0;
 }

diff --git a/src/arch/mips/linux/process.cc b/src/arch/mips/linux/process.cc
index b8b2267..8f1ec16 100644
--- a/src/arch/mips/linux/process.cc
+++ b/src/arch/mips/linux/process.cc
@@ -77,10 +77,9 @@

 /// Target uname() handler.
 static SyscallReturn
-unameFunc(SyscallDesc *desc, ThreadContext *tc, Addr utsname)
+unameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr name)
 {
 auto process = tc->getProcessPtr();
-TypedBufferArg name(utsname);

 strcpy(name->sysname, "Linux");
 strcpy(name->nodename,"sim.gem5.org");
@@ -88,7 +87,6 @@
 strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
 strcpy(name->machine, "mips");

-name.copyOut(tc->getVirtProxy());
 return 0;
 }

@@ -103,10 +101,9 @@
   case 45:
 {
 // GSI_IEEE_FP_CONTROL
-TypedBufferArg fpcr(bufPtr);
+VPtr fpcr(bufPtr, tc);
 // I don't think this exactly matches the HW FPCR
 *fpcr = 0;
-fpcr.copyOut(tc->getVirtProxy());
 return 0;
 }
   default:
@@ -128,11 +125,11 @@
   case 14:
 {
 // SSI_IEEE_FP_CONTROL
-TypedBufferArg fpcr(bufPtr);
+ConstVPtr fpcr(bufPtr, tc);
 // I don't think this exactly matches the HW FPCR
 fpcr.copyIn(tc->getVirtProxy());
  
DPRINTFR(SyscallVerbose, "sys_setsysinfo(SSI_IEEE_FP_CONTROL): "

-   " setting FPCR to 0x%x\n", letoh(*(uint64_t*)fpcr));
+   " setting FPCR to 0x%x\n", letoh(*fpcr));
 return 0;
 }
   default:
diff --git a/src/arch/power/linux/process.cc  
b/src/arch/power/linux/process.cc

index d613d52..fd07947 100644
--- a/src/arch/power/linux/process.cc
+++ b/src/arch/power/linux/process.cc
@@ -76,10 +76,9 @@

 /// Target uname() handler.
 static SyscallReturn
-unameFunc(SyscallDesc *desc, ThreadContext *tc, Addr utsname)
+unameFunc(SyscallDesc *desc, ThreadContext *tc, VPtr name)
 {
 auto process = tc->getProcessPtr();
-TypedBufferArg name(utsname);

 strcpy(name->sysname, "Linux");
 strcpy(name->nodename, "sim.gem5.org");
@@ -87,7 +86,6 @@
 strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
 strcpy(name->machine, "power");

-name.copyOut(tc->getVirtProxy());
 return 0;
 }

diff --git a/src/arch/riscv/linux/process.cc  
b/src/arch/riscv/linux/process.cc

index e70a07f..fa6bf01 100644
--- a/src/arch/riscv/linux/process.cc
+++ b/src/arch/riscv/linux/process.cc
@@ -84,10 +84,9 @@

 /// Target uname() handler.
 static SyscallReturn
-unameFunc64(SyscallDesc *desc, ThreadContext *tc, Addr utsname)
+unameFunc64(SyscallDesc *desc, ThreadContext *tc, VPtr  
name)

 {
 auto process = tc->getProcessPtr();
-TypedBufferArg name(utsname);

 strcpy(name->sysname, "Linux");
 strcpy(name->nodename,"sim.gem5.org");
@@ -95,16 +

[gem5-dev] Change in gem5/gem5[develop]: scons: Make src/systemc/tests/SConscript python 3 compatible.

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


Change subject: scons: Make src/systemc/tests/SConscript python 3  
compatible.

..

scons: Make src/systemc/tests/SConscript python 3 compatible.

The os.path.walk method was removed in python 3. Replace it with os.walk
which is available in both python 2 and 3.

Change-Id: I7919b6a2063c65bc3619927aa4514d8d6d1b2038
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32123
Reviewed-by: Jason Lowe-Power 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M src/systemc/tests/SConscript
1 file changed, 17 insertions(+), 17 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved
  Bobby R. Bruce: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/systemc/tests/SConscript b/src/systemc/tests/SConscript
index e791059..cf50514 100644
--- a/src/systemc/tests/SConscript
+++ b/src/systemc/tests/SConscript
@@ -31,6 +31,7 @@

 from gem5_scons import Transform

+import os
 import os.path
 import json

@@ -75,7 +76,7 @@
 # Turn off extra warnings and Werror for the tests.
 to_remove = ['-Wall', '-Wundef', '-Wextra', '-Werror']
 env['CCFLAGS'] = \
-filter(lambda f: f not in to_remove, env['CCFLAGS'])
+list(filter(lambda f: f not in to_remove, env['CCFLAGS']))

 env.Append(CPPPATH=test_dir.Dir('include'))

@@ -112,26 +113,28 @@


 def scan_dir_for_tests(subdir):
-def visitor(arg, dirname, names):
+subdir_src = Dir('.').srcdir.Dir(subdir)
+for root, dirs, files in os.walk(str(subdir_src)):
 # If there's a 'DONTRUN' file in this directory, skip it and  
any

 # child directories.
-if 'DONTRUN' in names:
-del names[:]
+if 'DONTRUN' in files:
+del dirs[:]
 return

-endswith = lambda sfx: filter(lambda n: n.endswith(sfx), names)
+endswith = lambda sfx: list(filter(
+lambda n: n.endswith(sfx), files))

 cpps = endswith('.cpp')
 if not cpps:
-return
+continue

 def get_entries(fname):
-with open(os.path.join(dirname, fname)) as content:
+with open(os.path.join(root, fname)) as content:
 lines = content.readlines
 # Get rid of leading and trailing whitespace.
 lines = map(lambda x: x.strip(), content.readlines())
 # Get rid of blank lines.
-lines = filter(lambda x: x, lines)
+lines = list(filter(lambda x: x, lines))
 return lines

 # If there's only one source file, then that files name is the  
test

@@ -139,7 +142,7 @@
 if len(cpps) == 1:
 cpp = cpps[0]

-test = new_test(dirname, os.path.splitext(cpp)[0])
+test = new_test(root, os.path.splitext(cpp)[0])
 test.add_source(cpp)

 # Otherwise, expect there to be a file that ends in .f. That  
files

@@ -149,25 +152,22 @@
 fs = endswith('.f')
 if len(fs) != 1:
 print("In %s, expected 1 *.f file, but found %d.",
-  dirname, len(fs))
+  root, len(fs))
 for f in fs:
-print(os.path.join(dirname, f))
+print(os.path.join(root, f))
 return
 f = fs[0]

-test = new_test(dirname, os.path.splitext(f)[0])
+test = new_test(root, os.path.splitext(f)[0])
 # Add all the sources to this test.
 test.add_sources(get_entries(f))

-if 'COMPILE' in names:
+if 'COMPILE' in files:
 test.compile_only = True

-if 'DEPS' in names:
+if 'DEPS' in files:
 test.deps = get_entries('DEPS')

-subdir_src = Dir('.').srcdir.Dir(subdir)
-os.path.walk(str(subdir_src), visitor, None)
-
 scan_dir_for_tests('systemc')
 scan_dir_for_tests('tlm')


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32123
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: I7919b6a2063c65bc3619927aa4514d8d6d1b2038
Gerrit-Change-Number: 32123
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
__

[gem5-dev] Change in gem5/gem5[develop]: scons,fastmodel: Limit how many instances of simgen can run at once.

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


Change subject: scons,fastmodel: Limit how many instances of simgen can run  
at once.

..

scons,fastmodel: Limit how many instances of simgen can run at once.

Each instance of simgen uses a license. If there are only so many to
go around, running many instances at once could exhaust the pool of
licenses and break the build.

The number of licenses may be less than the number of regular build
steps we want to do in parallel, but may be greater than zero. To
limit them to at most n in parallel where n might be less than j
and/or more than 1, we create a group of license slots, assign simgen
invocations to a slot, and then use scons's side effect mechanism to
ensure no two invocations in the same slot run at the same time.

This may be a suboptimal packing if the commands take significantly
different amounts of time to run since the slots are preallocated and
not demand allocated, but the difference shouldn't normally matter in
practice, and scons doesn't provide a better mechanism for partially
serializing certain build steps.

Change-Id: Ifae58b48ae1b989c1915444bf7564f352f042305
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32124
Reviewed-by: Bobby R. Bruce 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M src/arch/arm/fastmodel/SConscript
M src/arch/arm/fastmodel/SConsopts
2 files changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/src/arch/arm/fastmodel/SConscript  
b/src/arch/arm/fastmodel/SConscript

index c9b08b1..3980373 100644
--- a/src/arch/arm/fastmodel/SConscript
+++ b/src/arch/arm/fastmodel/SConscript
@@ -36,6 +36,7 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

 from __future__ import print_function
+from itertools import cycle

 Import('*')

@@ -242,6 +243,10 @@
 t[0] = t[1]


+license_count = int(env['ARMLMD_LICENSE_COUNT'])
+arm_licenses = list((Value(i) for i in range(license_count)))
+license_cycle = cycle(arm_licenses)
+
 class ArmFastModelComponent(object):
 def __init__(self, project_file, *extra_deps):
 project_file = File(project_file)
@@ -312,6 +317,14 @@
 sources = [project_file]
 sources.extend(extra_deps)
 env.Command(lib_nodes + self.headers, sources, simgen_action)
+# Distribute simgen actions among ARM license slots. All actions  
which
+# have a given license as a "side effect" will be serialized  
relative
+# to each other, meaning the number of licenses being used  
concurrently

+# will never be larger than the number of license nodes.
+#
+# This allocation is fixed and may not be as optimal as a dynamic  
one,

+# but the difference is probably not significant.
+env.SideEffect(next(license_cycle), lib_nodes[0])

 def prepare_env(self, env):
 env.Append(LIBPATH=self.libpaths)
diff --git a/src/arch/arm/fastmodel/SConsopts  
b/src/arch/arm/fastmodel/SConsopts

index 35e3895..74165fe 100644
--- a/src/arch/arm/fastmodel/SConsopts
+++ b/src/arch/arm/fastmodel/SConsopts
@@ -41,6 +41,8 @@
  os.environ.get('MAXCORE_HOME', '')),
 ('ARMLMD_LICENSE_FILE', 'ARM license file location',
  os.environ.get('ARMLMD_LICENSE_FILE', '')),
+('ARMLMD_LICENSE_COUNT',
+ 'The maximum number of ARM licenses to use concurrently', 1),
 ('SIMGEN', 'simgen executable', os.environ.get('SIMGEN',  
default_simgen)),

 )


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32124
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: Ifae58b48ae1b989c1915444bf7564f352f042305
Gerrit-Change-Number: 32124
Gerrit-PatchSet: 4
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Andreas Sandberg 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
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]: systemc: Adjust some type names in a couple tests.

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


Change subject: systemc: Adjust some type names in a couple tests.
..

systemc: Adjust some type names in a couple tests.

These names happened to collide with names from gem5 itself, and when
linked together produced strange and incorrect results.

Ideally gem5's names should go inside a gem5 namespace, but that's a
much larger change.

Change-Id: Ie7c5f2236678d5dbb722a86321296fce395fbd37
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32175
Reviewed-by: Bobby R. Bruce 
Reviewed-by: Jason Lowe-Power 
Maintainer: Jason Lowe-Power 
Tested-by: kokoro 
---
M src/systemc/tests/systemc/compliance_1666/test200/test200.cpp
M src/systemc/tests/systemc/compliance_1666/test234/test234.cpp
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/src/systemc/tests/systemc/compliance_1666/test200/test200.cpp  
b/src/systemc/tests/systemc/compliance_1666/test200/test200.cpp

index 5f68240..e807bab 100644
--- a/src/systemc/tests/systemc/compliance_1666/test200/test200.cpp
+++ b/src/systemc/tests/systemc/compliance_1666/test200/test200.cpp
@@ -10,7 +10,7 @@
 {
 };

-struct Port: sc_port
+struct SCPort: sc_port
 {
   Chan chan;
 };
@@ -33,7 +33,7 @@

 SC_MODULE(M)
 {
-  Port port;
+  SCPort port;

   SC_CTOR(M)
   {
diff --git a/src/systemc/tests/systemc/compliance_1666/test234/test234.cpp  
b/src/systemc/tests/systemc/compliance_1666/test234/test234.cpp

index 1b54675..4d29381 100644
--- a/src/systemc/tests/systemc/compliance_1666/test234/test234.cpp
+++ b/src/systemc/tests/systemc/compliance_1666/test234/test234.cpp
@@ -17,7 +17,7 @@
   sc_event ev;
 };

-struct Port: sc_port
+struct SCPort: sc_port
 {
   sc_event_finder& find_event() const
   {
@@ -27,7 +27,7 @@

 SC_MODULE(M)
 {
-  Port mp;
+  SCPort mp;
   bool flag, flag2;

   SC_CTOR(M)

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32175
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: Ie7c5f2236678d5dbb722a86321296fce395fbd37
Gerrit-Change-Number: 32175
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Earl Ou 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: systemc: Filter a pydot warning message out when checking test output.

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


Change subject: systemc: Filter a pydot warning message out when checking  
test output.

..

systemc: Filter a pydot warning message out when checking test output.

This warning can show up if pydot isn't set up properly and doesn't have
anything to do with the success of the test.

Change-Id: Iddcea5aa27196bc5cf747bf5a295b6c9a91b3d2c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32174
Reviewed-by: Bobby R. Bruce 
Maintainer: Bobby R. Bruce 
Tested-by: kokoro 
---
M src/systemc/tests/verify.py
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/src/systemc/tests/verify.py b/src/systemc/tests/verify.py
index 5ca783f..2c0ebc9 100755
--- a/src/systemc/tests/verify.py
+++ b/src/systemc/tests/verify.py
@@ -266,6 +266,8 @@
 r'^Global frequency set at \d* ticks per second\n',
 r'^info: Entering event queue @ \d*\.  Starting  
simulation\.\.\.\n',

 r'warn: Ignoring request to set stack size\.\n',
+r'^warn: No dot file generated. Please install pydot ' +
+r'to generate the dot file and pdf.\n',
 info_filt(804),
 in_file_filt,
 )

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/32174
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: Iddcea5aa27196bc5cf747bf5a295b6c9a91b3d2c
Gerrit-Change-Number: 32174
Gerrit-PatchSet: 3
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Earl Ou 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Giacomo Travaglini 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: kokoro 
Gerrit-MessageType: merged
___
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

[gem5-dev] Change in gem5/gem5[develop]: cpu: Remove the "profile" parameter and plumbing.

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


Change subject: cpu: Remove the "profile" parameter and plumbing.
..

cpu: Remove the "profile" parameter and plumbing.

This parameter is associated with a periodic event which would take a
sample for a kernel profile in FS mode. Unfortunately the only ISA which
had working versions of the necessary classes was alpha, and that has
been deleted. That means that without additional work for any given ISA,
the profile parameter has no chance of working.

Ideally, this parameter should be moved to the Workload classes. There
it can intrinsically be tied to a particular kernel, rather than having
to assume a particular kernel and gate everything on whether you're in
FS mode.

Because this isn't (IMHO) where this parameter should live in the long
term, and because it's currently unusable without additional development
for each of the ISAs, I think it makes the most sense to remove the
front end for this mechanism from the CPU.

Since the sampling/profiling mechanism itself could be useful and could
be re-plumbed somewhere else, the back end and its classes are left alone.

Change-Id: I2a3319c1d5ad0ef8c99f5d35953b93c51b2a8a0b
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32214
Reviewed-by: Jason Lowe-Power 
Maintainer: Gabe Black 
Tested-by: kokoro 
---
M src/arch/arm/fastmodel/iris/thread_context.hh
M src/cpu/BaseCPU.py
M src/cpu/base.cc
M src/cpu/base.hh
M src/cpu/checker/thread_context.hh
M src/cpu/o3/commit_impl.hh
M src/cpu/o3/thread_context.hh
M src/cpu/o3/thread_context_impl.hh
M src/cpu/o3/thread_state.hh
M src/cpu/simple/base.cc
M src/cpu/simple_thread.cc
M src/cpu/simple_thread.hh
M src/cpu/thread_context.hh
M src/cpu/thread_state.cc
M src/cpu/thread_state.hh
15 files changed, 1 insertion(+), 211 deletions(-)

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



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

index 8386e23..363e1d7 100644
--- a/src/arch/arm/fastmodel/iris/thread_context.hh
+++ b/src/arch/arm/fastmodel/iris/thread_context.hh
@@ -238,12 +238,6 @@
 void halt() override { setStatus(Halted); }

 void
-dumpFuncProfile() override
-{
-panic("%s not implemented.", __FUNCTION__);
-}
-
-void
 takeOverFrom(::ThreadContext *old_context) override
 {
 panic("%s not implemented.", __FUNCTION__);
@@ -264,17 +258,6 @@
 }

 void
-profileClear() override
-{
-panic("%s not implemented.", __FUNCTION__);
-}
-void
-profileSample() override
-{
-panic("%s not implemented.", __FUNCTION__);
-}
-
-void
 copyArchRegs(::ThreadContext *tc) override
 {
 panic("%s not implemented.", __FUNCTION__);
diff --git a/src/cpu/BaseCPU.py b/src/cpu/BaseCPU.py
index e487cbb..96e96fc 100644
--- a/src/cpu/BaseCPU.py
+++ b/src/cpu/BaseCPU.py
@@ -148,8 +148,6 @@
 do_statistics_insts = Param.Bool(True,
 "enable statistics pseudo instructions")

-profile = Param.Latency('0ns', "trace the kernel stack")
-
 wait_for_remote_gdb = Param.Bool(False,
 "Wait for a remote GDB connection");

diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index c903145..084c1e5 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -54,7 +54,6 @@
 #include "base/output.hh"
 #include "base/trace.hh"
 #include "cpu/checker/cpu.hh"
-#include "cpu/profile.hh"
 #include "cpu/thread_context.hh"
 #include "debug/Mwait.hh"
 #include "debug/SyscallVerbose.hh"
@@ -127,8 +126,7 @@
   _dataMasterId(p->system->getMasterId(this, "data")),
   _taskId(ContextSwitchTaskId::Unknown), _pid(invldPid),
   _switchedOut(p->switched_out),  
_cacheLineSize(p->system->cacheLineSize()),

-  interrupts(p->interrupts), profileEvent(NULL),
-  numThreads(p->numThreads), system(p->system),
+  interrupts(p->interrupts), numThreads(p->numThreads),  
system(p->system),

   previousCycle(0), previousState(CPU_STATE_SLEEP),
   functionTraceStream(nullptr), currentFunctionStart(0),
   currentFunctionEnd(0), functionEntryTick(0),
@@ -169,12 +167,6 @@
 }
 }

-if (FullSystem) {
-if (params()->profile)
-profileEvent = new EventFunctionWrapper(
-[this]{ processProfileEvent(); },
-name());
-}
 tracer = params()->tracer;

 if (params()->isa.size() != numThreads) {
@@ -191,7 +183,6 @@

 BaseCPU::~BaseCPU()
 {
-delete profileEvent;
 }

 void
@@ -307,11 +298,6 @@
 void
 BaseCPU::startup()
 {
-if (FullSystem) {
-if (!params()->switched_out && profileEvent)
-schedule(profileEvent, curTick());
-}
-
 if (params()->progress_interval) {
 new CPUProgressEvent(this, params()->progress_interva

[gem5-dev] Change in gem5/gem5[develop]: wip

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



Change subject: wip
..

wip

Change-Id: If79ce0733a7a61274a818e39ecb9cf383cc4e8ba
---
M src/arch/arm/aapcs32.hh
M src/arch/sparc/linux/syscalls.cc
M src/arch/x86/linux/process.cc
M src/kern/linux/events.hh
M src/sim/proxy_ptr.hh
M src/sim/syscall_emul.cc
M src/sim/syscall_emul.hh
7 files changed, 373 insertions(+), 357 deletions(-)



diff --git a/src/arch/arm/aapcs32.hh b/src/arch/arm/aapcs32.hh
index 01663ff..7f40bd3 100644
--- a/src/arch/arm/aapcs32.hh
+++ b/src/arch/arm/aapcs32.hh
@@ -37,6 +37,7 @@
 #include "arch/arm/utility.hh"
 #include "base/intmath.hh"
 #include "cpu/thread_context.hh"
+#include "mem/port_proxy.hh"
 #include "sim/guest_abi.hh"
 #include "sim/proxy_ptr.hh"

diff --git a/src/arch/sparc/linux/syscalls.cc  
b/src/arch/sparc/linux/syscalls.cc

index 304f2cf..32f6ef3 100644
--- a/src/arch/sparc/linux/syscalls.cc
+++ b/src/arch/sparc/linux/syscalls.cc
@@ -27,6 +27,7 @@
  */

 #include "arch/sparc/linux/process.hh"
+#include "sim/proxy_ptr.hh"
 #include "sim/syscall_desc.hh"
 #include "sim/syscall_emul.hh"

@@ -53,28 +54,19 @@

 SyscallReturn
 getresuidFunc(SyscallDesc *desc, ThreadContext *tc,
-  Addr ruid, Addr euid, Addr suid)
+  VPtr ruid, VPtr euid, VPtr  
suid)

 {
 const uint64_t id = htobe(100);
 // Handle the EFAULT case
 // Set the ruid
-if (ruid) {
-BufferArg ruidBuff(ruid, sizeof(uint64_t));
-memcpy(ruidBuff.bufferPtr(), &id, sizeof(uint64_t));
-ruidBuff.copyOut(tc->getVirtProxy());
-}
+if (ruid)
+*ruid = id;
 // Set the euid
-if (euid) {
-BufferArg euidBuff(euid, sizeof(uint64_t));
-memcpy(euidBuff.bufferPtr(), &id, sizeof(uint64_t));
-euidBuff.copyOut(tc->getVirtProxy());
-}
+if (euid)
+*euid = id;
 // Set the suid
-if (suid) {
-BufferArg suidBuff(suid, sizeof(uint64_t));
-memcpy(suidBuff.bufferPtr(), &id, sizeof(uint64_t));
-suidBuff.copyOut(tc->getVirtProxy());
-}
+if (suid)
+*suid = id;
 return 0;
 }

diff --git a/src/arch/x86/linux/process.cc b/src/arch/x86/linux/process.cc
index 9460a4b..97fb3e3 100644
--- a/src/arch/x86/linux/process.cc
+++ b/src/arch/x86/linux/process.cc
@@ -178,12 +178,8 @@

 assert((maxTLSEntry + 1) * sizeof(uint64_t) <= x86p->gdtSize());

-TypedBufferArg
-gdt(x86p->gdtStart() + minTLSEntry * sizeof(uint64_t),
-numTLSEntries * sizeof(uint64_t));
-
-if (!gdt.copyIn(tc->getVirtProxy()))
-panic("Failed to copy in GDT for %s.\n", desc->name());
+VBuf gdt(x86p->gdtStart() + minTLSEntry * sizeof(uint64_t),
+   numTLSEntries, tc);

 if (userDesc->entry_number == (uint32_t)(-1)) {
 // Find a free TLS entry.
@@ -234,9 +230,6 @@

 gdt[index] = (uint64_t)segDesc;

-if (!gdt.copyOut(tc->getVirtProxy()))
-panic("Failed to copy out GDT for %s.\n", desc->name());
-
 return 0;
 }

diff --git a/src/kern/linux/events.hh b/src/kern/linux/events.hh
index c5a297b..2ca97a4 100644
--- a/src/kern/linux/events.hh
+++ b/src/kern/linux/events.hh
@@ -48,6 +48,7 @@
 #include "debug/DebugPrintf.hh"
 #include "kern/linux/printk.hh"
 #include "kern/system_events.hh"
+#include "mem/se_translating_port_proxy.hh"
 #include "sim/guest_abi.hh"

 class ThreadContext;
diff --git a/src/sim/proxy_ptr.hh b/src/sim/proxy_ptr.hh
index a59bbff..0f481c1 100644
--- a/src/sim/proxy_ptr.hh
+++ b/src/sim/proxy_ptr.hh
@@ -85,6 +85,13 @@
 }

 void
+discard()
+{
+markClean();
+load();
+}
+
+void
 load()
 {
 panic_if(isDirty(), "Overwriting dirty ProxyPtr.");
@@ -265,6 +272,13 @@
 this->buffer->flush(force);
 }

+void
+discard()
+{
+if (this->buffer)
+this->buffer->discard();
+}
+
 template 
 typename std::enable_if::value, PP>::type
 operator + (A a) const
@@ -364,11 +378,158 @@
 return os;
 }

+template 
+class ConstProxyBuf
+{
+  protected:
+ProxyPtrBuffer buffer;
+
+Addr _count;
+
+void
+boundsCheck(int i)
+{
+panic_if(i < 0 || i >= this->count(),
+"Out of bounds access in ProxyBuf.");
+}
+
+  public:
+using Type = T;
+
+Addr count() const { return _count; }
+Addr addr() const { return buffer.addr(); }
+
+template ::value, int>::type = 0>
+explicit ConstProxyBuf(Addr _ptr, Addr __count, Args&&... args) :
+buffer(std::make_shared(args...), _ptr, sizeof(T) *  
__count),

+_count(__count)
+{
+panic_if(!_ptr, "ProxyBuf with zero address.");
+}
+
+const T &
+operator [](int i) const
+{
+boundsCheck(i);
+return *(&buffer.template asConst() + i);
+}
+
+operator const T*() const
+{
+return &b

[gem5-dev] Change in gem5/gem5[feature-heterogarnet]: ruby: Optimal matrix iteration for topology weight tree

2020-08-05 Thread Srikant Bharadwaj (Gerrit) via gem5-dev
Srikant Bharadwaj has uploaded this change for review. (  
https://gem5-review.googlesource.com/c/public/gem5/+/32275 )



Change subject: ruby: Optimal matrix iteration for topology weight tree
..

ruby: Optimal matrix iteration for topology weight tree

This change updates the way we iterate the weight tree when
calculating the shortest distance tree for a given topology.
Instead of parsing over all vnets for a given pair of source
and destination, we now split it into pairs for each vnet
reflective of how the algorithm accesses values.

Change-Id: Iad15c9b2406d2bf026b3ef2a70c0ba0fad4b03a5
---
M src/mem/ruby/network/Topology.cc
1 file changed, 30 insertions(+), 16 deletions(-)



diff --git a/src/mem/ruby/network/Topology.cc  
b/src/mem/ruby/network/Topology.cc

index 3e8d00c..1c8497f 100644
--- a/src/mem/ruby/network/Topology.cc
+++ b/src/mem/ruby/network/Topology.cc
@@ -121,9 +121,9 @@

 // Initialize weight, latency, and inter switched vectors
 int num_switches = max_switch_id+1;
-Matrix topology_weights(num_switches,
+Matrix topology_weights(m_vnets,
 vector>(num_switches,
-vector(m_vnets, INFINITE_LATENCY)));
+vector(num_switches, INFINITE_LATENCY)));
 Matrix component_latencies(num_switches,
 vector>(num_switches,
 vector(m_vnets, -1)));
@@ -132,9 +132,9 @@
 vector(m_vnets, 0)));

 // Set identity weights to zero
-for (int i = 0; i < topology_weights.size(); i++) {
+for (int i = 0; i < topology_weights[0].size(); i++) {
 for (int v = 0; v < m_vnets; v++) {
-topology_weights[i][i][v] = 0;
+topology_weights[v][i][i] = 0;
 }
 }

@@ -159,7 +159,7 @@
 " and destination cannot support same vnets");

 component_latencies[src][dst][v] = link->m_latency;
-topology_weights[src][dst][v] = link->m_weight;
+topology_weights[v][src][dst] = link->m_weight;
 vnet_done[v] = true;
 }
 } else {
@@ -171,7 +171,7 @@
 " and destination cannot support same vnets");

 component_latencies[src][dst][vnet] = link->m_latency;
-topology_weights[src][dst][vnet] = link->m_weight;
+topology_weights[vnet][src][dst] = link->m_weight;
 vnet_done[vnet] = true;
 }
 }
@@ -182,8 +182,8 @@
 Matrix dist = shortest_path(topology_weights, component_latencies,
 component_inter_switches);

-for (int i = 0; i < topology_weights.size(); i++) {
-for (int j = 0; j < topology_weights[i].size(); j++) {
+for (int i = 0; i < topology_weights[0].size(); i++) {
+for (int j = 0; j < topology_weights[0][i].size(); j++) {
 std::vector routingMap;
 routingMap.resize(m_vnets);

@@ -193,7 +193,7 @@
 bool realLink = false;

 for (int v = 0; v < m_vnets; v++) {
-int weight = topology_weights[i][j][v];
+int weight = topology_weights[v][i][j];
 if (weight > 0 && weight != INFINITE_LATENCY) {
 realLink = true;
 routingMap[v] =
@@ -333,23 +333,37 @@
 Topology::extend_shortest_path(Matrix ¤t_dist, Matrix &latencies,
 Matrix &inter_switches)
 {
-int nodes = current_dist.size();
+int nodes = current_dist[0].size();

 // We find the shortest path for each vnet for a given pair of
 // source and destinations. This is done simply by traversing via
 // all other nodes and finding the minimum distance.
 for (int v = 0; v < m_vnets; v++) {
+// There is a different topology for each vnet. Here we try to
+// build a topology by finding the minimum number of intermediate
+// switches needed to reach the destination
 bool change = true;
 while (change) {
 change = false;
 for (int i = 0; i < nodes; i++) {
 for (int j = 0; j < nodes; j++) {
-int minimum = current_dist[i][j][v];
+// We follow an iterative process to build the shortest
+// path tree:
+// 1. Start from the direct connection (if there is  
one,
+// otherwise assume a hypothetical infinite weight  
link).
+// 2. Then we iterate through all other nodes  
considering

+// new potential intermediate switches. If we find any
+// lesser weight combination, we set(update) that as  
the

+// new weight between the source and destination.
+// 3. Repeat for all pairs of nodes.
+// 4. Go to step 1 if there was any new update done in
+   

[gem5-dev] Change in gem5/gem5[feature-heterogarnet]: mem-garnet: Fix topology initialization bug

2020-08-05 Thread Srikant Bharadwaj (Gerrit) via gem5-dev

Hello Onur Kayıran,

I'd like you to do a code review. Please visit

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

to review the following change.


Change subject: mem-garnet: Fix topology initialization bug
..

mem-garnet: Fix topology initialization bug

This change fixes an issue when links are iterated during topology
initialization. The bug falsely can cause an assert statement to be
true when multiple physical links between the same
source-destination pair are used.

Change-Id: Idd3fcd1ade7bab6d24391cc20f79643167be087a
---
M src/mem/ruby/network/Topology.cc
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/mem/ruby/network/Topology.cc  
b/src/mem/ruby/network/Topology.cc

index 1c8497f..e1622d8 100644
--- a/src/mem/ruby/network/Topology.cc
+++ b/src/mem/ruby/network/Topology.cc
@@ -167,7 +167,7 @@
 int vnet = link->mVnets[v];
 // Two links connecting same src and destination
 // cannot carry same vnets.
-fatal_if(vnet_done[v], "Two links connecting same src"
+fatal_if(vnet_done[vnet], "Two links connecting same  
src"

 " and destination cannot support same vnets");

 component_latencies[src][dst][vnet] = link->m_latency;

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


Gerrit-Project: public/gem5
Gerrit-Branch: feature-heterogarnet
Gerrit-Change-Id: Idd3fcd1ade7bab6d24391cc20f79643167be087a
Gerrit-Change-Number: 32276
Gerrit-PatchSet: 1
Gerrit-Owner: Srikant Bharadwaj 
Gerrit-Reviewer: Onur Kayıran 
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[feature-heterogarnet]: mem-garnet: Initialize unused Credit members

2020-08-05 Thread Srikant Bharadwaj (Gerrit) via gem5-dev

Hello Michael LeBeane,

I'd like you to do a code review. Please visit

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

to review the following change.


Change subject: mem-garnet: Initialize unused Credit members
..

mem-garnet: Initialize unused Credit members

The Credit class doesn't initialize a number of its unused base class
fields.  This leads to non-determanistic traces when printing flits that
are Credits.  This patch initializes all unused fields to 0.

Change-Id: Ib73c652c71a10be57b24c0d6e1ac22eafa421e11
---
M src/mem/ruby/network/garnet2.0/CommonTypes.hh
M src/mem/ruby/network/garnet2.0/Credit.cc
2 files changed, 6 insertions(+), 3 deletions(-)



diff --git a/src/mem/ruby/network/garnet2.0/CommonTypes.hh  
b/src/mem/ruby/network/garnet2.0/CommonTypes.hh

index 72febed..bc80131 100644
--- a/src/mem/ruby/network/garnet2.0/CommonTypes.hh
+++ b/src/mem/ruby/network/garnet2.0/CommonTypes.hh
@@ -47,6 +47,11 @@

 struct RouteInfo
 {
+RouteInfo()
+: vnet(0), src_ni(0), src_router(0), dest_ni(0), dest_router(0),
+  hops_traversed(0)
+{}
+
 // destination format for table-based routing
 int vnet;
 NetDest net_dest;
diff --git a/src/mem/ruby/network/garnet2.0/Credit.cc  
b/src/mem/ruby/network/garnet2.0/Credit.cc

index 868f622..7c293cf 100644
--- a/src/mem/ruby/network/garnet2.0/Credit.cc
+++ b/src/mem/ruby/network/garnet2.0/Credit.cc
@@ -35,11 +35,9 @@
 // and m_is_free_signal (whether VC is free or not)

 Credit::Credit(int vc, bool is_free_signal, Tick curTime)
+: flit(0, vc, 0, RouteInfo(), 0, nullptr, 0, 0, curTime)
 {
-m_id = 0;
-m_vc = vc;
 m_is_free_signal = is_free_signal;
-m_time = curTime;
 m_type = CREDIT_;
 }


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


Gerrit-Project: public/gem5
Gerrit-Branch: feature-heterogarnet
Gerrit-Change-Id: Ib73c652c71a10be57b24c0d6e1ac22eafa421e11
Gerrit-Change-Number: 32296
Gerrit-PatchSet: 1
Gerrit-Owner: Srikant Bharadwaj 
Gerrit-Reviewer: Michael LeBeane 
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