Skip to content
This repository was archived by the owner on Aug 16, 2023. It is now read-only.

Commit 6a4b077

Browse files
[GR-8609] Remove creation of "original" VM.
PullRequest: graal-jvmci-8/39
2 parents 3aa6c78 + 5f4955a commit 6a4b077

File tree

1 file changed

+15
-31
lines changed

1 file changed

+15
-31
lines changed

mx.jvmci/mx_jvmci.py

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
_vmChoices = {
4747
'server' : 'Normal compilation is performed with a tiered system (C1 + C2 or Graal) and Graal is available for hosted compilation.',
4848
'client' : None, # VM compilation with client compiler, hosted compilation with Graal
49-
'original' : None, # default VM copied from bootstrap JDK
5049
}
5150

5251
_jvmciModes = {
@@ -535,11 +534,7 @@ def get_jvmci_jdk_dir(build=None, vmToCheck=None, create=False, deployDists=True
535534
with open(jvmCfg) as f:
536535
jvmCfgLines = f.readlines()
537536

538-
jvmCfgLines += ['-original KNOWN\n']
539-
540-
defaultVM = 'server'
541537
chmodRecursive(jdkDir, JDK_UNIX_PERMISSIONS_DIR)
542-
shutil.move(join(vmLibDirInJdk(jdkDir), defaultVM), join(vmLibDirInJdk(jdkDir), 'original'))
543538

544539
if mx.get_os() != 'windows':
545540
os.chmod(jvmCfg, JDK_UNIX_PERMISSIONS_FILE)
@@ -981,10 +976,6 @@ def needsBuild(self, newestInput):
981976
def buildForbidden(self):
982977
if mx.NativeBuildTask.buildForbidden(self):
983978
return True
984-
if self.vm == 'original':
985-
if self.vmbuild != 'product':
986-
mx.log('only product build of original VM exists')
987-
return True
988979
if not isVMSupported(self.vm):
989980
mx.log('The ' + self.vm + ' VM is not supported on this platform - skipping')
990981
return True
@@ -1057,23 +1048,21 @@ def run_vm(args, vm=None, nonZeroIsFatal=True, out=None, err=None, cwd=None, tim
10571048

10581049
def _unittest_config_participant(config):
10591050
vmArgs, mainClass, mainClassArgs = config
1060-
if isJVMCIEnabled(get_vm()):
1061-
# Remove entries from class path that are in JVMCI loaded jars
1062-
cpIndex, cp = mx.find_classpath_arg(vmArgs)
1063-
if cp:
1064-
excluded = set()
1065-
for jdkDist in jdkDeployedDists:
1066-
dist = jdkDist.dist()
1067-
excluded.update([d.output_dir() for d in dist.archived_deps() if d.isJavaProject()])
1068-
excluded.add(dist.path)
1069-
cp = os.pathsep.join([e for e in cp.split(os.pathsep) if e not in excluded])
1070-
vmArgs[cpIndex] = cp
1071-
1072-
# Run the VM in a mode where application/test classes can
1073-
# access JVMCI loaded classes.
1074-
vmArgs = ['-XX:-UseJVMCIClassLoader'] + vmArgs
1075-
return (vmArgs, mainClass, mainClassArgs)
1076-
return config
1051+
# Remove entries from class path that are in JVMCI loaded jars
1052+
cpIndex, cp = mx.find_classpath_arg(vmArgs)
1053+
if cp:
1054+
excluded = set()
1055+
for jdkDist in jdkDeployedDists:
1056+
dist = jdkDist.dist()
1057+
excluded.update([d.output_dir() for d in dist.archived_deps() if d.isJavaProject()])
1058+
excluded.add(dist.path)
1059+
cp = os.pathsep.join([e for e in cp.split(os.pathsep) if e not in excluded])
1060+
vmArgs[cpIndex] = cp
1061+
1062+
# Run the VM in a mode where application/test classes can
1063+
# access JVMCI loaded classes.
1064+
vmArgs = ['-XX:-UseJVMCIClassLoader'] + vmArgs
1065+
return (vmArgs, mainClass, mainClassArgs)
10771066

10781067
def _unittest_vm_launcher(vmArgs, mainClass, mainClassArgs):
10791068
run_vm(vmArgs + [mainClass] + mainClassArgs)
@@ -1109,8 +1098,6 @@ def buildvms(args):
11091098
continue
11101099

11111100
for vmbuild in builds:
1112-
if vm == 'original' and vmbuild != 'product':
1113-
continue
11141101
if not args.console:
11151102
logFile = join(vm + '-' + vmbuild + '.log')
11161103
log = open(join(_suite.dir, logFile), 'wb')
@@ -1351,9 +1338,6 @@ def hcfdis(args):
13511338
for l in lines:
13521339
print >> fp, l
13531340

1354-
def isJVMCIEnabled(vm):
1355-
return vm != 'original'
1356-
13571341
def jol(args):
13581342
"""Java Object Layout"""
13591343
joljar = mx.library('JOL_INTERNALS').get_path(resolve=True)

0 commit comments

Comments
 (0)