Skip to content

Commit

Permalink
Merge pull request eclipse-openj9#2323 from DanHeidinga/djh/explicitgc
Browse files Browse the repository at this point in the history
Map -XX:[+-]DisableExplicitGC to OpenJ9-equivalent
  • Loading branch information
dmitripivkine authored Jul 4, 2018
2 parents 43fc97e + b69520e commit 003fae6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions runtime/oti/jvminit.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ enum INIT_STAGE {
#define MAPOPT_XSHARE_AUTO "-Xshare:auto"
#define MAPOPT_XSHARECLASSES_UTILITIES "-Xshareclasses:utilities"
#define MAPOPT_XSHARECLASSES_NONFATAL "-Xshareclasses:nonfatal"
#define MAPOPT_XXDISABLEEXPLICITGC "-XX:+DisableExplicitGC"
#define MAPOPT_XXENABLEEXPLICITGC "-XX:-DisableExplicitGC"

#define VMOPT_XXDUMPLOADEDCLASSLIST "-XX:DumpLoadedClassList"

Expand Down
8 changes: 8 additions & 0 deletions runtime/vm/jvminit.c
Original file line number Diff line number Diff line change
Expand Up @@ -3752,6 +3752,14 @@ registerVMCmdLineMappings(J9JavaVM* vm)
if (registerCmdLineMapping(vm, MAPOPT_XSHARE_AUTO, MAPOPT_XSHARECLASSES_NONFATAL, EXACT_MAP_NO_OPTIONS) == RC_FAILED) {
return RC_FAILED;
}
/* Map -XX:+DisableExplicitGC to -Xdisableexplicitgc */
if (registerCmdLineMapping(vm, MAPOPT_XXDISABLEEXPLICITGC, "-Xdisableexplicitgc", EXACT_MAP_NO_OPTIONS) == RC_FAILED) {
return RC_FAILED;
}
/* Map -XX:+EnableExplicitGC to -Xenableexplicitgc */
if (registerCmdLineMapping(vm, MAPOPT_XXENABLEEXPLICITGC, "-Xenableexplicitgc", EXACT_MAP_NO_OPTIONS) == RC_FAILED) {
return RC_FAILED;
}

return 0;
}
Expand Down

0 comments on commit 003fae6

Please sign in to comment.