Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set vm.bits property #246

Merged
merged 1 commit into from
Dec 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions closed/test/jtreg-ext/requires/OpenJ9PropsExt.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* ===========================================================================
* (c) Copyright IBM Corp. 2019, 2019 All Rights Reserved
* (c) Copyright IBM Corp. 2019, 2020 All Rights Reserved
* ===========================================================================
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -35,10 +35,26 @@ public class OpenJ9PropsExt implements Callable<Map<String, String>> {
public Map<String, String> call() {

Map<String, String> map = new HashMap<>();
map.put("vm.graal.enabled", "false");

try {
map.put("vm.graal.enabled", "false");
map.put("vm.bits", vmBits());
}
catch (Exception e) {
e.printStackTrace();
System.exit(1);
}
return map;
}

/**
* @return VM bitness, the value of the "sun.arch.data.model" property.
*/
protected String vmBits() throws Exception {
String dataModel = System.getProperty("sun.arch.data.model");
if (dataModel != null) {
return dataModel;
} else {
throw new Exception("Can't get 'sun.arch.data.model' property");
}
}
}