Skip to content

Commit

Permalink
Add cmdline opts to toggle extendedHCR
Browse files Browse the repository at this point in the history
Disable HCR by default. Add option to enabled it
if needed. Add warning message to indicate a
redefinition of retransformation failure caused by
the lack of extended HCR support.

Signed-off-by: Tobi Ajila <[email protected]>
  • Loading branch information
tajila committed Jun 10, 2024
1 parent 808ba6d commit 704a781
Show file tree
Hide file tree
Showing 19 changed files with 263 additions and 203 deletions.
7 changes: 7 additions & 0 deletions runtime/nls/vmut/j9vmutil.nls
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,10 @@ J9NLS_VMUTIL_RECEIVERCLASS_NOT_SAME_OR_SUBTYPE_OF_CURRENTCLASS.explanation=NOTAG
J9NLS_VMUTIL_RECEIVERCLASS_NOT_SAME_OR_SUBTYPE_OF_CURRENTCLASS.system_action=
J9NLS_VMUTIL_RECEIVERCLASS_NOT_SAME_OR_SUBTYPE_OF_CURRENTCLASS.user_response=
# END NON-TRANSLATABLE

J9NLS_VMUTIL_OPENJ9_EXTENDED_HCR_DISABLED_WARNING=Warning: Extended HCR is disabled, enable with -XX:+EnableExtendedHCR.
# START NON-TRANSLATABLE
J9NLS_VMUTIL_OPENJ9_EXTENDED_HCR_DISABLED_WARNING.explanation=This JVM disables extended HCR by default, this may cause JVMTI failures in extended capabilites are required.
J9NLS_VMUTIL_OPENJ9_EXTENDED_HCR_DISABLED_WARNING.system_action=None
J9NLS_VMUTIL_OPENJ9_EXTENDED_HCR_DISABLED_WARNING.user_response=Add -XX:+EnableExtendedHCR commandline option to enable extended HCR
# END NON-TRANSLATABLE
1 change: 1 addition & 0 deletions runtime/oti/j9consts.h
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ extern "C" {
#define J9_EXTENDED_RUNTIME2_ALWAYS_KEEP_JNI_IDS 0x2000000
#define J9_EXTENDED_RUNTIME2_NEVER_KEEP_JNI_IDS 0x4000000
#define J9_EXTENDED_RUNTIME2_FFI_PROTO 0x8000000
#define J9_EXTENDED_RUNTIME2_DISABLE_EXTENDED_HCR 0x10000000

#define J9_OBJECT_HEADER_AGE_DEFAULT 0xA /* OBJECT_HEADER_AGE_DEFAULT */
#define J9_OBJECT_HEADER_SHAPE_MASK 0xE /* OBJECT_HEADER_SHAPE_MASK */
Expand Down
2 changes: 2 additions & 0 deletions runtime/oti/jvminit.h
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,8 @@ enum INIT_STAGE {
#define VMOPT_XXNOOPENJ9COMMANDLINEENV "-XX:-OpenJ9CommandLineEnv"
#define VMOPT_XXCPULOADCOMPATIBILITY "-XX:+CpuLoadCompatibility"
#define VMOPT_XXNOCPULOADCOMPATIBILITY "-XX:-CpuLoadCompatibility"
#define VMOPT_XXENABLEEXTENDEDHCR "-XX:+EnableExtendedHCR"
#define VMOPT_XXDISABLEEXTENDEDHCR "-XX:-EnableExtendedHCR"

#if defined(J9VM_ZOS_3164_INTEROPERABILITY)
#define VMOPT_XXENABLE3164INTEROPERABILITY "-XX:+Enable3164Interoperability"
Expand Down
Loading

0 comments on commit 704a781

Please sign in to comment.