Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into da/static_object_move
Browse files Browse the repository at this point in the history
  • Loading branch information
ansalond committed Jul 8, 2021
2 parents 76e02a9 + 83aa8e9 commit 1cd0768
Show file tree
Hide file tree
Showing 297 changed files with 5,449 additions and 2,864 deletions.
18 changes: 9 additions & 9 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
"README": "This file contains definitions that are useful for the hocon and jsonnet CI files of multiple repositories.",

"jdks": {
"openjdk8": {"name": "openjdk", "version": "8u302+05-jvmci-21.2-b04", "platformspecific": true },
"oraclejdk8": {"name": "oraclejdk", "version": "8u301+09-jvmci-21.2-b04", "platformspecific": true },
"oraclejdk8Debug": {"name": "oraclejdk", "version": "8u301+09-jvmci-21.2-b04-fastdebug", "platformspecific": true },
"openjdk8": {"name": "openjdk", "version": "8u302+06-jvmci-21.2-b05", "platformspecific": true },
"oraclejdk8": {"name": "oraclejdk", "version": "8u301+09-jvmci-21.2-b05", "platformspecific": true },
"oraclejdk8Debug": {"name": "oraclejdk", "version": "8u301+09-jvmci-21.2-b05-fastdebug", "platformspecific": true },

"openjdk11": {"name": "openjdk", "version": "11.0.11+9", "platformspecific": true },
"oraclejdk11": {"name": "oraclejdk", "version": "11.0.11+9", "platformspecific": true },
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.12+5-jvmci-21.2-b04", "platformspecific": true },
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.12+8-jvmci-21.2-b04", "platformspecific": true },
"labsjdk-ce-11": {"name": "labsjdk", "version": "ce-11.0.12+5-jvmci-21.2-b05", "platformspecific": true },
"labsjdk-ee-11": {"name": "labsjdk", "version": "ee-11.0.12+8-jvmci-21.2-b05", "platformspecific": true },

"oraclejdk16": {"name": "oraclejdk", "version": "16.0.1+4", "platformspecific": true },
"labsjdk-ce-16": {"name": "labsjdk", "version": "ce-16.0.2+6-jvmci-21.2-b04", "platformspecific": true },
"labsjdk-ce-16Debug": {"name": "labsjdk", "version": "ce-16.0.2+6-jvmci-21.2-b04-debug", "platformspecific": true },
"labsjdk-ee-16": {"name": "labsjdk", "version": "ee-16.0.2+6-jvmci-21.2-b04", "platformspecific": true },
"labsjdk-ee-16Debug": {"name": "labsjdk", "version": "ee-16.0.2+6-jvmci-21.2-b04-debug", "platformspecific": true }
"labsjdk-ce-16": {"name": "labsjdk", "version": "ce-16.0.2+7-jvmci-21.2-b05", "platformspecific": true },
"labsjdk-ce-16Debug": {"name": "labsjdk", "version": "ce-16.0.2+7-jvmci-21.2-b05-debug", "platformspecific": true },
"labsjdk-ee-16": {"name": "labsjdk", "version": "ee-16.0.2+7-jvmci-21.2-b05", "platformspecific": true },
"labsjdk-ee-16Debug": {"name": "labsjdk", "version": "ee-16.0.2+7-jvmci-21.2-b05-debug", "platformspecific": true }
},

"COMMENT" : "The devkits versions reflect those used to build the JVMCI JDKs (e.g., see devkit_platform_revisions in <jdk>/make/conf/jib-profiles.js)",
Expand Down
42 changes: 24 additions & 18 deletions compiler/ci_common/benchmark-suites.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -170,41 +170,47 @@
},
local upload = ["bench-uploader.py", "bench-results.json"],
run+: [
self.benchmark_cmd + ["shopcart-jmeter:large", "--"] + self.extra_vm_args + ["-Xms8g", "-Xmx8g"],
self.benchmark_cmd + ["shopcart-jmeter:large", "--"] + self.extra_vm_args + ["-Xms8g", "-Xmx8g"],
upload,
self.benchmark_cmd + ["petclinic-jmeter:tiny", "--"] + self.extra_vm_args + ["-Xms8g", "-Xmx8g"],
self.benchmark_cmd + ["petclinic-jmeter:tiny", "--"] + self.extra_vm_args + ["-Xms8g", "-Xmx8g"],
upload,
self.benchmark_cmd + ["shopcart-wrk:mixed-tiny", "--"] + self.extra_vm_args + ["-Xms32m", "-Xmx112m", "-XX:ActiveProcessorCount=1", "-XX:MaxDirectMemorySize=256m"],
self.benchmark_cmd + ["shopcart-wrk:mixed-tiny", "--"] + self.extra_vm_args + ["-Xms32m", "-Xmx112m", "-XX:ActiveProcessorCount=1", "-XX:MaxDirectMemorySize=256m"],
upload,
self.benchmark_cmd + ["shopcart-wrk:mixed-small", "--"] + self.extra_vm_args + ["-Xms64m", "-Xmx224m", "-XX:ActiveProcessorCount=2", "-XX:MaxDirectMemorySize=512m"],
self.benchmark_cmd + ["shopcart-wrk:mixed-small", "--"] + self.extra_vm_args + ["-Xms64m", "-Xmx224m", "-XX:ActiveProcessorCount=2", "-XX:MaxDirectMemorySize=512m"],
upload,
self.benchmark_cmd + ["shopcart-wrk:mixed-medium", "--"] + self.extra_vm_args + ["-Xms128m", "-Xmx512m", "-XX:ActiveProcessorCount=4", "-XX:MaxDirectMemorySize=1024m"],
self.benchmark_cmd + ["shopcart-wrk:mixed-medium", "--"] + self.extra_vm_args + ["-Xms128m", "-Xmx512m", "-XX:ActiveProcessorCount=4", "-XX:MaxDirectMemorySize=1024m"],
upload,
self.benchmark_cmd + ["shopcart-wrk:mixed-large", "--"] + self.extra_vm_args + ["-Xms512m", "-Xmx3072m", "-XX:ActiveProcessorCount=16", "-XX:MaxDirectMemorySize=4096m"],
self.benchmark_cmd + ["shopcart-wrk:mixed-large", "--"] + self.extra_vm_args + ["-Xms512m", "-Xmx3072m", "-XX:ActiveProcessorCount=16", "-XX:MaxDirectMemorySize=4096m"],
upload,
self.benchmark_cmd + ["shopcart-wrk:mixed-huge", "--"] + self.extra_vm_args + ["-Xms1024m", "-Xmx8192m", "-XX:ActiveProcessorCount=32", "-XX:MaxDirectMemorySize=8192m"],
self.benchmark_cmd + ["shopcart-wrk:mixed-huge", "--"] + self.extra_vm_args + ["-Xms1024m", "-Xmx8192m", "-XX:ActiveProcessorCount=32", "-XX:MaxDirectMemorySize=8192m"],
upload,
self.benchmark_cmd + ["tika-wrk:odt-tiny", "--"] + self.extra_vm_args + ["-Xms32m", "-Xmx150m", "-XX:ActiveProcessorCount=1"],
self.benchmark_cmd + ["tika-wrk:odt-tiny", "--"] + self.extra_vm_args + ["-Xms32m", "-Xmx150m", "-XX:ActiveProcessorCount=1"],
upload,
self.benchmark_cmd + ["tika-wrk:odt-small", "--"] + self.extra_vm_args + ["-Xms64m", "-Xmx250m", "-XX:ActiveProcessorCount=2"],
self.benchmark_cmd + ["tika-wrk:odt-small", "--"] + self.extra_vm_args + ["-Xms64m", "-Xmx250m", "-XX:ActiveProcessorCount=2"],
upload,
self.benchmark_cmd + ["tika-wrk:odt-medium", "--"] + self.extra_vm_args + ["-Xms128m", "-Xmx600m", "-XX:ActiveProcessorCount=4"],
self.benchmark_cmd + ["tika-wrk:odt-medium", "--"] + self.extra_vm_args + ["-Xms128m", "-Xmx600m", "-XX:ActiveProcessorCount=4"],
upload,
self.benchmark_cmd + ["tika-wrk:pdf-tiny", "--"] + self.extra_vm_args + ["-Xms20m", "-Xmx80m", "-XX:ActiveProcessorCount=1"],
self.benchmark_cmd + ["tika-wrk:pdf-tiny", "--"] + self.extra_vm_args + ["-Xms20m", "-Xmx80m", "-XX:ActiveProcessorCount=1"],
upload,
self.benchmark_cmd + ["tika-wrk:pdf-small", "--"] + self.extra_vm_args + ["-Xms40m", "-Xmx200m", "-XX:ActiveProcessorCount=2"],
self.benchmark_cmd + ["tika-wrk:pdf-small", "--"] + self.extra_vm_args + ["-Xms40m", "-Xmx200m", "-XX:ActiveProcessorCount=2"],
upload,
self.benchmark_cmd + ["tika-wrk:pdf-medium", "--"] + self.extra_vm_args + ["-Xms80m", "-Xmx500m", "-XX:ActiveProcessorCount=4"],
self.benchmark_cmd + ["tika-wrk:pdf-medium", "--"] + self.extra_vm_args + ["-Xms80m", "-Xmx500m", "-XX:ActiveProcessorCount=4"],
upload,
self.benchmark_cmd + ["petclinic-wrk:mixed-tiny", "--"] + self.extra_vm_args + ["-Xms32m", "-Xmx100m", "-XX:ActiveProcessorCount=1"],
self.benchmark_cmd + ["petclinic-wrk:mixed-tiny", "--"] + self.extra_vm_args + ["-Xms32m", "-Xmx100m", "-XX:ActiveProcessorCount=1"],
upload,
self.benchmark_cmd + ["petclinic-wrk:mixed-small", "--"] + self.extra_vm_args + ["-Xms40m", "-Xmx128m", "-XX:ActiveProcessorCount=2"],
self.benchmark_cmd + ["petclinic-wrk:mixed-small", "--"] + self.extra_vm_args + ["-Xms40m", "-Xmx128m", "-XX:ActiveProcessorCount=2"],
upload,
self.benchmark_cmd + ["petclinic-wrk:mixed-medium", "--"] + self.extra_vm_args + ["-Xms80m", "-Xmx256m", "-XX:ActiveProcessorCount=4"],
self.benchmark_cmd + ["petclinic-wrk:mixed-medium", "--"] + self.extra_vm_args + ["-Xms80m", "-Xmx256m", "-XX:ActiveProcessorCount=4"],
upload,
self.benchmark_cmd + ["petclinic-wrk:mixed-large", "--"] + self.extra_vm_args + ["-Xms320m", "-Xmx1280m", "-XX:ActiveProcessorCount=16"],
self.benchmark_cmd + ["petclinic-wrk:mixed-large", "--"] + self.extra_vm_args + ["-Xms320m", "-Xmx1280m", "-XX:ActiveProcessorCount=16"],
upload,
self.benchmark_cmd + ["petclinic-wrk:mixed-huge", "--"] + self.extra_vm_args + ["-Xms640m", "-Xmx3072m", "-XX:ActiveProcessorCount=32"],
self.benchmark_cmd + ["petclinic-wrk:mixed-huge", "--"] + self.extra_vm_args + ["-Xms640m", "-Xmx3072m", "-XX:ActiveProcessorCount=32"],
upload,
self.benchmark_cmd + ["micronaut-helloworld-wrk:helloworld", "--"] + self.extra_vm_args + ["-Xms8m", "-Xmx64m", "-XX:ActiveProcessorCount=1", "-XX:MaxDirectMemorySize=256m"],
upload,
self.benchmark_cmd + ["quarkus-helloworld-wrk:helloworld", "--"] + self.extra_vm_args + ["-Xms8m", "-Xmx64m", "-XX:ActiveProcessorCount=1", "-XX:MaxDirectMemorySize=256m"],
upload,
self.benchmark_cmd + ["spring-helloworld-wrk:helloworld", "--"] + self.extra_vm_args + ["-Xms8m", "-Xmx64m", "-XX:ActiveProcessorCount=1", "-XX:MaxDirectMemorySize=256m"],
upload
],
timelimit: "7:00:00"
Expand Down
5 changes: 4 additions & 1 deletion compiler/ci_common/gate.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,14 @@ gateTestAVX1 : ${gateTest} {
}
}

gateTestCompileImmediately : ${gateTest} {
gateTestCompileImmediately : {
environment : {
EXTRA_VM_ARGS : "-Dpolyglot.engine.AllowExperimentalOptions=true -Dpolyglot.engine.CompileImmediately=true -Dpolyglot.engine.BackgroundCompilation=false -Dtck.inlineVerifierInstrument=false"
EXTRA_UNITTEST_ARGS : "truffle"
}
run : [
${gateCmd} ["build,unittest"]
]
}

gateTestCTW : {
Expand Down
53 changes: 46 additions & 7 deletions compiler/mx.compiler/mx_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ class GraalTags:
bootstraplite = ['bootstraplite', 'bootstrap', 'fulltest']
bootstrapfullverify = ['bootstrapfullverify', 'fulltest']
test = ['test', 'fulltest']
unittest = ['unittest', 'test', 'fulltest']
coverage = ['coverage']
benchmarktest = ['benchmarktest', 'fulltest']
ctw = ['ctw', 'fulltest']
Expand All @@ -360,7 +361,7 @@ def _remove_empty_entries(a):
return []
return [x for x in a if x]

def _gate_java_benchmark(args, successRe):
def _gate_java_benchmark(args, successRe, cwd=None):
"""
Runs a Java benchmark and aborts if the benchmark process exits with a non-zero
exit code or the `successRe` pattern is not in the output of the benchmark process.
Expand All @@ -370,7 +371,7 @@ def _gate_java_benchmark(args, successRe):
"""
out = mx.OutputCapture()
try:
run_java(args, out=mx.TeeOutputCapture(out), err=subprocess.STDOUT)
run_java(args, out=mx.TeeOutputCapture(out), err=subprocess.STDOUT, cwd=cwd)
finally:
jvmErrorFile = re.search(r'(([A-Z]:|/).*[/\\]hs_err_pid[0-9]+\.log)', out.data)
if jvmErrorFile:
Expand All @@ -396,6 +397,35 @@ def _is_batik_supported(jdk):
mx.warn('Batik uses Sun internal class com.sun.image.codec.jpeg.TruncatedFileException which is not present in ' + jdk.home)
return False

class DaCapoWrapper(object):
"""
A context manager that dumps the stdout and stderr logs of DaCapo and ScalaDacapo
executions return with a non-zero exit code.
"""

def __init__(self, scratch_dir):
"""
:param str scratch_dir: the directory in which the [Scala]DaCapo logs will be written
"""
self.scratch_dir = scratch_dir

def __enter__(self):
self._logs = self._gather_logs()
return self

def __exit__(self, exc_type, exc_value, traceback):
if exc_value is not None:
for before, after in zip(self._logs, self._gather_logs()):
if after.isNewerThan(before):
mx.log('Dumping ' + after.path)
mx.log('```')
with open(after.path) as fp:
mx.log(fp.read())
mx.log('```')

def _gather_logs(self):
return [mx.TimeStampFile(join(self.scratch_dir, name + '.log')) for name in ('stdout', 'stderr')]

def _gate_dacapo(name, iterations, extraVMarguments=None, force_serial_gc=True, set_start_heap_size=True, threads=None):
vmargs = ['-XX:+UseSerialGC'] if force_serial_gc else []
if set_start_heap_size:
Expand All @@ -404,10 +434,12 @@ def _gate_dacapo(name, iterations, extraVMarguments=None, force_serial_gc=True,
dacapoJar = mx.library('DACAPO').get_path(True)
if name == 'batik' and not _is_batik_supported(jdk):
return
args = ['-n', str(iterations)]
scratch_dir = join(os.getcwd(), 'scratch')
args = ['-n', str(iterations), '--preserve', '--scratch-directory', scratch_dir]
if threads is not None:
args += ['-t', str(threads)]
_gate_java_benchmark(vmargs + ['-jar', dacapoJar, name] + args, r'^===== DaCapo 9\.12 ([a-zA-Z0-9_]+) PASSED in ([0-9]+) msec =====')
with DaCapoWrapper(scratch_dir):
_gate_java_benchmark(vmargs + ['-jar', dacapoJar, name] + args, r'^===== DaCapo 9\.12 ([a-zA-Z0-9_]+) PASSED in ([0-9]+) msec =====')

def jdk_includes_corba(jdk):
# corba has been removed since JDK11 (http://openjdk.java.net/jeps/320)
Expand All @@ -418,8 +450,15 @@ def _gate_scala_dacapo(name, iterations, extraVMarguments=None):
if name == 'actors' and jdk.javaCompliance >= '9' and jdk_includes_corba(jdk):
vmargs += ['--add-modules', 'java.corba']
scalaDacapoJar = mx.library('DACAPO_SCALA').get_path(True)
_gate_java_benchmark(vmargs + ['-jar', scalaDacapoJar, name, '-n', str(iterations)], r'^===== DaCapo 0\.1\.0(-SNAPSHOT)? ([a-zA-Z0-9_]+) PASSED in ([0-9]+) msec =====')

scratch_dir = join(os.getcwd(), 'scratch')
with DaCapoWrapper(scratch_dir):
args = ['-jar', scalaDacapoJar, name, '-n', str(iterations), '--preserve', '--scratch-directory', scratch_dir]
cwd = None
if name == 'scaladoc':
# GR-32428: scaladoc scans $PWD for package.class files which can cause problems
# so run it in a directory most likely not containing extraneous package.class files.
cwd = dirname(scalaDacapoJar)
_gate_java_benchmark(vmargs + args, r'^===== DaCapo 0\.1\.0(-SNAPSHOT)? ([a-zA-Z0-9_]+) PASSED in ([0-9]+) msec =====', cwd=cwd)

def compiler_gate_runner(suites, unit_test_runs, bootstrap_tests, tasks, extraVMarguments=None, extraUnitTestArguments=None):
if jdk.javaCompliance >= '9':
Expand Down Expand Up @@ -579,7 +618,7 @@ def compiler_gate_benchmark_runner(tasks, extraVMarguments=None, prefix=''):


graal_unit_test_runs = [
UnitTestRun('UnitTests', [], tags=GraalTags.test + GraalTags.coverage),
UnitTestRun('UnitTests', [], tags=GraalTags.unittest + GraalTags.coverage),
]

_registers = {
Expand Down
5 changes: 3 additions & 2 deletions compiler/mx.compiler/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -2169,13 +2169,14 @@
],
"exports" : [
"* to com.oracle.graal.graal_enterprise,org.graalvm.nativeimage.pointsto,org.graalvm.nativeimage.builder,org.graalvm.nativeimage.llvm,com.oracle.svm.svm_enterprise",
"org.graalvm.compiler.core.common to jdk.internal.vm.compiler.management",
"org.graalvm.compiler.core.common to jdk.internal.vm.compiler.management,org.graalvm.nativeimage.agent.tracing",
"org.graalvm.compiler.debug to jdk.internal.vm.compiler.management,org.graalvm.nativeimage.objectfile",
"org.graalvm.compiler.hotspot to jdk.internal.vm.compiler.management",
"org.graalvm.compiler.nodes.graphbuilderconf to org.graalvm.nativeimage.driver",
"org.graalvm.compiler.options to jdk.internal.vm.compiler.management,org.graalvm.nativeimage.driver,org.graalvm.nativeimage.librarysupport",
"org.graalvm.compiler.phases.common to org.graalvm.nativeimage.agent.tracing,org.graalvm.nativeimage.configure",
"org.graalvm.compiler.phases.common.jmx to jdk.internal.vm.compiler.management",
"org.graalvm.compiler.serviceprovider to jdk.internal.vm.compiler.management,org.graalvm.nativeimage.driver",
"org.graalvm.compiler.serviceprovider to jdk.internal.vm.compiler.management,org.graalvm.nativeimage.driver,org.graalvm.nativeimage.agent.jvmtibase,org.graalvm.nativeimage.agent.diagnostics",
"org.graalvm.compiler.truffle.jfr to jdk.internal.vm.compiler.truffle.jfr",
"org.graalvm.libgraal to jdk.internal.vm.compiler.management",
"org.graalvm.util to jdk.internal.vm.compiler.management",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,9 @@ public enum Instruction {

public enum SystemRegister {
FPCR(0b11, 0b011, 0b0100, 0b0100, 0b000),
FPSR(0b11, 0b011, 0b0100, 0b0100, 0b001);
FPSR(0b11, 0b011, 0b0100, 0b0100, 0b001),
/* Counter-timer Virtual Count register */
CNTVCT_EL0(0b11, 0b011, 0b110, 0b0000, 0b010);

SystemRegister(int op0, int op1, int crn, int crm, int op2) {
this.op0 = op0;
Expand Down Expand Up @@ -3065,10 +3067,20 @@ public void isb() {
emitInt(ISB.encoding | BarrierOp | BarrierKind.SYSTEM.encoding << BarrierKindOffset);
}

/**
* C.6.2.194 Move System Register<br>
* <p>
* Reads an AArch64 System register into a general-purpose register.
*/
public void mrs(Register dst, SystemRegister systemRegister) {
emitInt(MRS.encoding | systemRegister.encoding() | rt(dst));
}

/**
* C.6.2.196 Move general-purpose register to System Register<br>
* <p>
* Writes an AArch64 System register from general-purpose register.
*/
public void msr(SystemRegister systemRegister, Register src) {
emitInt(MRS.encoding | systemRegister.encoding() | rt(src));
}
Expand Down
Loading

0 comments on commit 1cd0768

Please sign in to comment.