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

Map and test -XX:MaxHeapSize and -XX:InitialHeapSize #2996

Merged
merged 2 commits into from
Oct 11, 2018
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions runtime/oti/jvminit.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ enum INIT_STAGE {
#define VMOPT_XMSO "-Xmso"
#define VMOPT_XMSCL "-Xmscl"
#define VMOPT_XMXCL "-Xmxcl"
#define VMOPT_XMX "-Xmx"
#define VMOPT_XMS "-Xms"
#define VMOPT_XDUMP "-Xdump"
#define VMOPT_XDUMP_NONE "-Xdump:none"
#define VMOPT_XDUMP_DIRECTORY_EQUALS "-Xdump:directory="
Expand Down Expand Up @@ -472,6 +474,8 @@ enum INIT_STAGE {
#define MAPOPT_XXDISABLEEXPLICITGC "-XX:+DisableExplicitGC"
#define MAPOPT_XXENABLEEXPLICITGC "-XX:-DisableExplicitGC"
#define MAPOPT_XXHEAPDUMPPATH_EQUALS "-XX:HeapDumpPath="
#define MAPOPT_XXMAXHEAPSIZE_EQUALS "-XX:MaxHeapSize="
#define MAPOPT_XXINITIALHEAPSIZE_EQUALS "-XX:InitialHeapSize="

#define VMOPT_XXACTIVEPROCESSORCOUNT_EQUALS "-XX:ActiveProcessorCount="

Expand Down
8 changes: 8 additions & 0 deletions runtime/vm/jvminit.c
Original file line number Diff line number Diff line change
Expand Up @@ -3797,6 +3797,14 @@ registerVMCmdLineMappings(J9JavaVM* vm)
if (registerCmdLineMapping(vm, MAPOPT_XXHEAPDUMPPATH_EQUALS, VMOPT_XDUMP_DIRECTORY_EQUALS, EXACT_MAP_WITH_OPTIONS) == RC_FAILED) {
return RC_FAILED;
}
/* Map -XX:MaxHeapSize= to -Xmx */
if (registerCmdLineMapping(vm, MAPOPT_XXMAXHEAPSIZE_EQUALS, VMOPT_XMX, EXACT_MAP_WITH_OPTIONS) == RC_FAILED) {
return RC_FAILED;
}
/* Map -XX:InitialHeapSize= to -Xms */
if (registerCmdLineMapping(vm, MAPOPT_XXINITIALHEAPSIZE_EQUALS, VMOPT_XMS, EXACT_MAP_WITH_OPTIONS) == RC_FAILED) {
return RC_FAILED;
}

return 0;
}
Expand Down
9 changes: 8 additions & 1 deletion test/functional/cmdLineTests/xxargtest/XXArgumentTesting.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,11 @@
<output type="failure" caseSensitive="no" regex="no" platforms="zos_390-64_cmprssptrs.*">32bit allocation regions</output>
</test>

</suite>
<test id="Verify -XX:MaxHeapSize -XX:InitialHeapSize -XX:ThreadStackSize">
<command>$EXE$ -XX:MaxHeapSize=234m -XX:InitialHeapSize=11m -verbose:sizes -version</command>
<output type="success" caseSensitive="no" regex="no">OpenJ9</output>
<output type="required" caseSensitive="no" regex="no">-Xmx234M</output>
<output type="required" caseSensitive="no" regex="no">-Xms11M</output>
</test>

</suite>