[gem5-dev] Change in gem5/gem5[develop]: tests: Standardized used of the ISA constants tags
Bobby R. Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/38278 ) Change subject: tests: Standardized used of the ISA constants tags .. tests: Standardized used of the ISA constants tags Change-Id: I4a3966168a1d159bf4ac4cc3148e9c7a43c880e3 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38278 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- M tests/gem5/asmtest/tests.py M tests/gem5/cpu_tests/test.py M tests/gem5/dram-lowp/test_dram_lowp.py M tests/gem5/hello_se/test_hello_se.py M tests/gem5/insttest_se/test.py M tests/gem5/learning_gem5/part1_test.py M tests/gem5/learning_gem5/part2_test.py M tests/gem5/learning_gem5/part3_test.py M tests/gem5/m5_util/test_exit.py M tests/gem5/m5threads_test_atomic/test.py M tests/gem5/memory/test.py M tests/gem5/x86-boot-tests/test_linux_boot.py 12 files changed, 61 insertions(+), 54 deletions(-) Approvals: Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/tests/gem5/asmtest/tests.py b/tests/gem5/asmtest/tests.py index 026b230..f267b91 100755 --- a/tests/gem5/asmtest/tests.py +++ b/tests/gem5/asmtest/tests.py @@ -83,7 +83,7 @@ gem5_args = gem5_args, config = config_file, config_args = config_args, -valid_isas = ('RISCV',), +valid_isas = (constants.riscv_tag,), valid_hosts = constants.supported_hosts ) diff --git a/tests/gem5/cpu_tests/test.py b/tests/gem5/cpu_tests/test.py index 44f0574..33a9c12 100644 --- a/tests/gem5/cpu_tests/test.py +++ b/tests/gem5/cpu_tests/test.py @@ -46,23 +46,25 @@ workloads = ('Bubblesort','FloatMM') valid_isas = { -'x86': ('AtomicSimpleCPU', 'TimingSimpleCPU', 'DerivO3CPU'), -'arm': ('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'), -'riscv': ('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'), +constants.x86_tag : ('AtomicSimpleCPU', 'TimingSimpleCPU', 'DerivO3CPU'), +constants.arm_tag: +('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'), +constants.riscv_tag: +('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'), } base_path = joinpath(config.bin_path, 'cpu_tests') base_url = config.resource_url + '/gem5/cpu_tests/benchmarks/bin/' for isa in valid_isas: -path = joinpath(base_path, isa) +path = joinpath(base_path, isa.lower()) for workload in workloads: ref_path = joinpath(getcwd(), 'ref', workload) verifiers = ( verifier.MatchStdout(ref_path), ) -url = base_url + isa + '/' + workload +url = base_url + isa.lower() + '/' + workload workload_binary = DownloadedProgram(url, path, workload) binary = joinpath(workload_binary.path, workload) @@ -72,6 +74,6 @@ verifiers=verifiers, config=joinpath(getcwd(), 'run.py'), config_args=['--cpu={}'.format(cpu), binary], - valid_isas=(isa.upper(),), + valid_isas=(isa,), fixtures=[workload_binary] ) diff --git a/tests/gem5/dram-lowp/test_dram_lowp.py b/tests/gem5/dram-lowp/test_dram_lowp.py index 7a065f0..b90fca4 100644 --- a/tests/gem5/dram-lowp/test_dram_lowp.py +++ b/tests/gem5/dram-lowp/test_dram_lowp.py @@ -36,7 +36,7 @@ verifiers=verifiers, config=joinpath(config.base_dir, 'configs', 'dram','low_power_sweep.py'), config_args=['-p', 'close_adaptive', '-r', '2'], -valid_isas=('NULL',), +valid_isas=(constants.null_tag,), valid_hosts=constants.supported_hosts, ) @@ -46,6 +46,6 @@ verifiers=verifiers, config=joinpath(config.base_dir, 'configs', 'dram','low_power_sweep.py'), config_args=['-p', 'open_adaptive', '-r', '2'], -valid_isas=('NULL',), +valid_isas=(constants.null_tag,), valid_hosts=constants.supported_hosts, ) diff --git a/tests/gem5/hello_se/test_hello_se.py b/tests/gem5/hello_se/test_hello_se.py index abae3cf..5ebdd0c 100644 --- a/tests/gem5/hello_se/test_hello_se.py +++ b/tests/gem5/hello_se/test_hello_se.py @@ -45,41 +45,42 @@ from testlib import * static_progs = { -'x86': ('hello64-static', 'hello32-static'), -'arm': ('hello64-static', 'hello32-static'), -'mips': ('hello',), -'riscv': ('hello',), -'sparc': ('hello',) +constants.x86_tag : ('hello64-static', 'hello32-static'), +constants.arm_tag : ('hello64-static', 'hello32-static'), +constants.mips_tag : ('hello',), +constants.riscv_tag : ('hello',), +constants.sparc_tag : ('hello',) } dynamic_progs = { -'x86': ('hello64-dynamic',) +constants.x86_tag : ('hello64-dynamic',) } cpu_types = { -'x86': ('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'), -'arm' : ('TimingSimpleCPU', 'AtomicSimpleCPU','DerivO3
[gem5-dev] Change in gem5/gem5[develop]: tests,arch-gcn3,arch-x86: Changed X86 testlib tests to GCN3_X86
Bobby R. Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/38279 ) Change subject: tests,arch-gcn3,arch-x86: Changed X86 testlib tests to GCN3_X86 .. tests,arch-gcn3,arch-x86: Changed X86 testlib tests to GCN3_X86 In an effort to get better test coverage, we've changed all X86 tests to use GCN3_X86. This will, as a minimum, ensure that GCN3 is regularly compiled. GCN3_X86 is a superset of X86 and all X86 tests should pass on GCN3_X86. Change-Id: I2684edfc4e48c3e311a400231293a9e04c701130 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38279 Reviewed-by: Matt Sinclair Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- M ext/testlib/configuration.py M tests/gem5/cpu_tests/test.py M tests/gem5/hello_se/test_hello_se.py M tests/gem5/learning_gem5/part1_test.py M tests/gem5/learning_gem5/part2_test.py M tests/gem5/learning_gem5/part3_test.py M tests/gem5/m5_util/test_exit.py M tests/gem5/test_build/test_build.py M tests/gem5/x86-boot-tests/test_linux_boot.py 9 files changed, 56 insertions(+), 36 deletions(-) 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/ext/testlib/configuration.py b/ext/testlib/configuration.py index c9c10ea..e5b7598 100644 --- a/ext/testlib/configuration.py +++ b/ext/testlib/configuration.py @@ -233,6 +233,7 @@ constants.isa_tag_type = 'isa' constants.x86_tag = 'X86' +constants.gcn3_x86_tag = 'GCN3_X86' constants.sparc_tag = 'SPARC' constants.riscv_tag = 'RISCV' constants.arm_tag = 'ARM' @@ -256,6 +257,7 @@ constants.supported_tags = { constants.isa_tag_type : ( constants.x86_tag, +constants.gcn3_x86_tag, constants.sparc_tag, constants.riscv_tag, constants.arm_tag, @@ -283,6 +285,7 @@ constants.target_host = { constants.arm_tag : (constants.host_arm_tag,), constants.x86_tag : (constants.host_x86_64_tag,), +constants.gcn3_x86_tag : (constants.host_x86_64_tag,), constants.sparc_tag : (constants.host_x86_64_tag,), constants.riscv_tag : (constants.host_x86_64_tag,), constants.mips_tag : (constants.host_x86_64_tag,), diff --git a/tests/gem5/cpu_tests/test.py b/tests/gem5/cpu_tests/test.py index 33a9c12..393ff26 100644 --- a/tests/gem5/cpu_tests/test.py +++ b/tests/gem5/cpu_tests/test.py @@ -46,16 +46,25 @@ workloads = ('Bubblesort','FloatMM') valid_isas = { -constants.x86_tag : ('AtomicSimpleCPU', 'TimingSimpleCPU', 'DerivO3CPU'), +constants.gcn3_x86_tag : +('AtomicSimpleCPU', 'TimingSimpleCPU', 'DerivO3CPU'), constants.arm_tag: ('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'), constants.riscv_tag: ('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'), } + base_path = joinpath(config.bin_path, 'cpu_tests') base_url = config.resource_url + '/gem5/cpu_tests/benchmarks/bin/' + +isa_url = { +constants.gcn3_x86_tag : base_url + "x86" +constants.arm_tag : base_url + "arm" +constants.riscv_tag : base_url + "riscv" +} + for isa in valid_isas: path = joinpath(base_path, isa.lower()) for workload in workloads: @@ -64,7 +73,7 @@ verifier.MatchStdout(ref_path), ) -url = base_url + isa.lower() + '/' + workload +url = isa_url[isa] + '/' + workload workload_binary = DownloadedProgram(url, path, workload) binary = joinpath(workload_binary.path, workload) diff --git a/tests/gem5/hello_se/test_hello_se.py b/tests/gem5/hello_se/test_hello_se.py index 5ebdd0c..77fd18f 100644 --- a/tests/gem5/hello_se/test_hello_se.py +++ b/tests/gem5/hello_se/test_hello_se.py @@ -45,7 +45,7 @@ from testlib import * static_progs = { -constants.x86_tag : ('hello64-static', 'hello32-static'), +constants.gcn3_x86_tag : ('hello64-static', 'hello32-static'), constants.arm_tag : ('hello64-static', 'hello32-static'), constants.mips_tag : ('hello',), constants.riscv_tag : ('hello',), @@ -53,11 +53,12 @@ } dynamic_progs = { -constants.x86_tag : ('hello64-dynamic',) +constants.gcn3_x86_tag : ('hello64-dynamic',) } cpu_types = { -constants.x86_tag : ('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'), +constants.gcn3_x86_tag : +('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'), constants.arm_tag : ('TimingSimpleCPU', 'AtomicSimpleCPU','DerivO3CPU'), constants.mips_tag : ('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'), constants.riscv_tag : @@ -65,18 +66,10 @@ constants.sparc_tag : ('TimingSimpleCPU', 'AtomicSimpleCPU') } -supported_os = { -constants.x86_tag : ('linux',), -constants.arm_tag : ('linux
[gem5-dev] Change in gem5/gem5[develop]: tests,misc: Removing cloudbuild_presubmit.yaml
Bobby R. Bruce has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/38375 ) Change subject: tests,misc: Removing cloudbuild_presubmit.yaml .. tests,misc: Removing cloudbuild_presubmit.yaml This is not used. It can be removed. Change-Id: I2e25a5407ca70a18b4e619f4e65b69b98c873511 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38375 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- D cloudbuild_presubmit.yaml 1 file changed, 0 insertions(+), 31 deletions(-) Approvals: Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/cloudbuild_presubmit.yaml b/cloudbuild_presubmit.yaml deleted file mode 100644 index 5fd46ad..000 --- a/cloudbuild_presubmit.yaml +++ /dev/null @@ -1,31 +0,0 @@ -steps: - -- name: 'gcr.io/cloud-builders/docker' - entrypoint: 'bash' - args: - - '-c' - - | -docker pull gcr.io/$PROJECT_ID/ubuntu-18.04_all-dependencies:latest \ -|| exit 0 - -- name: 'gcr.io/cloud-builders/docker' - args: ['build', - '-t', - 'gcr.io/$PROJECT_ID/ubuntu-18.04_all-dependencies:latest', - '--cache-from', - 'gcr.io/$PROJECT_ID/ubuntu-18.04_all-dependencies:latest', - 'util/dockerfiles/ubuntu-18.04_all-dependencies'] - -- name: 'gcr.io/$PROJECT_ID/ubuntu-18.04_all-dependencies:latest' - entrypoint: 'scons' - args: ['build/NULL/unittests.opt', '-j', '4'] - -- name: 'gcr.io/$PROJECT_ID/ubuntu-18.04_all-dependencies:latest' - dir: 'tests' - entrypoint: 'python' - args: ['main.py', 'run', '-j', '4', '-t', '8', '--length', 'quick'] - -images: ['gcr.io/$PROJECT_ID/ubuntu-18.04_all-dependencies:latest'] -options: - machineType: 'N1_HIGHCPU_8' -timeout: 18000s # 5 Hours -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/38375 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: I2e25a5407ca70a18b4e619f4e65b69b98c873511 Gerrit-Change-Number: 38375 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: kokoro Gerrit-MessageType: merged ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
[gem5-dev] Change in gem5/gem5[develop]: util: m5ops, optional extra build flags
Adrian Herrera has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/38416 ) Change subject: util: m5ops, optional extra build flags .. util: m5ops, optional extra build flags This increases compilation control for users. Main use case is building m5ops as part of an image distribution. Specifying a different sysroot or dynamic linker may be required when the cross toolchain is built as part of the process. Change-Id: Icbd3faa92ea6e084fc4a9b2db83129bce73faf21 Signed-off-by: Adrian Herrera --- M util/m5/SConstruct 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/util/m5/SConstruct b/util/m5/SConstruct index 6f1ca9f..61cee6a 100644 --- a/util/m5/SConstruct +++ b/util/m5/SConstruct @@ -197,16 +197,22 @@ # # This also considers scons command line settings which may look like # environment variables, but are set after "scons" on the command line. -def get_abi_opt(name, default): +def get_abi_opt_val(name, default): var_name = env.subst('${ABI}.%s' % name) -env[name] = os.environ.get( -var_name, ARGUMENTS.get(var_name, default)) +return os.environ.get(var_name, ARGUMENTS.get(var_name, default)) +def get_abi_opt(name, default): +env[name] = get_abi_opt_val(name, default) # Process the ABI's settings in the SConsopts file, storing them # in a copy of the primary environment. env.SConscript(Dir(root).File('SConsopts'), exports=[ 'env', 'get_abi_opt' ]) +# The user can pass extra build flags for each ABI +env.Append(CFLAGS=[get_abi_opt_val('CFLAGS', '')]) +env.Append(CXXFLAGS=[get_abi_opt_val('CXXFLAGS', '')]) +env.Append(CXXFLAGS=[get_abi_opt_val('LDFLAGS', '')]) + # Check if this version of QEMU is available for running unit tests. env['HAVE_QEMU'] = env.Detect('${QEMU}') is not None if env['HAVE_QEMU'] and env.Detect('${CC}'): -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/38416 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: Icbd3faa92ea6e084fc4a9b2db83129bce73faf21 Gerrit-Change-Number: 38416 Gerrit-PatchSet: 1 Gerrit-Owner: Adrian Herrera Gerrit-MessageType: newchange ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
[gem5-dev] Change in gem5/gem5[develop]: util: term, remove install target
Adrian Herrera has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/38415 ) Change subject: util: term, remove install target .. util: term, remove install target Installing the term utility within the host filesystem is an unlikely scenario. Most times, the utility will be used in place or trivially copied to a local directory within the PATH. Furthermore, the install target hardcoded a privileged installation, which is a non-standard and insecure technique. Change-Id: I1592a304017c6b24a9421aa353229fb5a5baae43 Signed-off-by: Adrian Herrera --- M util/term/Makefile 1 file changed, 0 insertions(+), 3 deletions(-) diff --git a/util/term/Makefile b/util/term/Makefile index 4aa1c52..ab4f749 100644 --- a/util/term/Makefile +++ b/util/term/Makefile @@ -31,9 +31,6 @@ m5term: term.c $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) -install: m5term - $(SUDO) install -o root -m 555 m5term /usr/local/bin - clean: @rm -f m5term *~ .#* -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/38415 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: I1592a304017c6b24a9421aa353229fb5a5baae43 Gerrit-Change-Number: 38415 Gerrit-PatchSet: 1 Gerrit-Owner: Adrian Herrera 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]: cpu: MinorCPU not updating cycle counter value
Giacomo Travaglini has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/38095 ) Change subject: cpu: MinorCPU not updating cycle counter value .. cpu: MinorCPU not updating cycle counter value By not updating the cycle counter value for every tick in the MinorCPU meant that a read to the associated performance counter was always returning 0. For more info check the following email thread in gem5-users: https://www.mail-archive.com/gem5-users@gem5.org/msg18742.html Change-Id: Ibc033b536669cbb43d40c8a7c0659eb5565bdf93 Signed-off-by: Giacomo Travaglini Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/38095 Tested-by: kokoro Reviewed-by: Gabe Black Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power --- M src/cpu/minor/cpu.hh M src/cpu/minor/pipeline.cc 2 files changed, 11 insertions(+), 2 deletions(-) Approvals: Jason Lowe-Power: Looks good to me, but someone else must approve; Looks good to me, approved Gabe Black: Looks good to me, approved kokoro: Regressions pass diff --git a/src/cpu/minor/cpu.hh b/src/cpu/minor/cpu.hh index 0e919f33..1e846565 100644 --- a/src/cpu/minor/cpu.hh +++ b/src/cpu/minor/cpu.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2014 ARM Limited + * Copyright (c) 2012-2014, 2020 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -181,6 +181,12 @@ return prio_list; } +/** The tick method in the MinorCPU is simply updating the cycle + * counters as the ticking of the pipeline stages is already + * handled by the Pipeline object. + */ +void tick() { updateCycleCounters(BaseCPU::CPU_STATE_ON); } + /** Interface for stages to signal that they have become active after * a callback or eventq event where the pipeline itself may have * already been idled. The stage argument should be from the diff --git a/src/cpu/minor/pipeline.cc b/src/cpu/minor/pipeline.cc index 78c2020..3997c89 100644 --- a/src/cpu/minor/pipeline.cc +++ b/src/cpu/minor/pipeline.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2014 ARM Limited + * Copyright (c) 2013-2014, 2020 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -121,6 +121,9 @@ void Pipeline::evaluate() { +/** We tick the CPU to update the BaseCPU cycle counters */ +cpu.tick(); + /* Note that it's important to evaluate the stages in order to allow * 'immediate', 0-time-offset TimeBuffer activity to be visible from * later stages to earlier ones in the same cycle */ -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/38095 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: Ibc033b536669cbb43d40c8a7c0659eb5565bdf93 Gerrit-Change-Number: 38095 Gerrit-PatchSet: 4 Gerrit-Owner: Giacomo Travaglini Gerrit-Reviewer: Andreas Sandberg Gerrit-Reviewer: Anthony Gutierrez Gerrit-Reviewer: Ciro Santilli Gerrit-Reviewer: Gabe Black Gerrit-Reviewer: Giacomo Travaglini Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: Jason Lowe-Power Gerrit-Reviewer: Matthew Poremba Gerrit-Reviewer: kokoro Gerrit-MessageType: merged ___ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s