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

Add Deprecated warning for using Xlp, and Xlp<size> using Java 11+ #9187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
9 changes: 8 additions & 1 deletion runtime/nls/j9vm/j9vm.nls
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2000, 2019 IBM Corp. and others
# Copyright (c) 2000, 2020 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -1953,3 +1953,10 @@ J9NLS_VM_CLASS_RELATIONSHIP_INVALID.explanation=The specified child class fails
J9NLS_VM_CLASS_RELATIONSHIP_INVALID.system_action=The JVM will throw a java/lang/VerifyError.
J9NLS_VM_CLASS_RELATIONSHIP_INVALID.user_response=Ensure that all class relationships are valid.
# END NON-TRANSLATABLE

J9NLS_VM_XLP_DEPRECATED=Since Java 9 -Xlp, and -Xlp:<size> were deprecated for removal and may not be accepted options in the future.
# START NON-TRANSLATABLE
J9NLS_VM_XLP_DEPRECATED.explanation=Since Java 9 -Xlp, and -Xlp:<size> were deprecated for removal and may not be accepted options in the future.
J9NLS_VM_XLP_DEPRECATED.system_action=The JVM will show a warning and continue to recognize the options.
J9NLS_VM_XLP_DEPRECATED.user_response=Consider not using these options as they will likely be removed in a future release. Consider replacing with respective -Xlp:codecache, and -Xlp:objectheap options.
# END NON-TRANSLATABLE
1 change: 1 addition & 0 deletions runtime/oti/jvminit.h
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ enum INIT_STAGE {
#define VMOPT_XXDECOMP_COLON "-XXdecomp:"

#define VMOPT_XLP_CODECACHE "-Xlp:codecache:"
#define VMOPT_XLP "-Xlp"
#define VMOPT_XTLHPREFETCH "-XtlhPrefetch"

#define VMOPT_XXALLOWNONVIRTUALCALLS "-XX:+AllowNonVirtualCalls"
Expand Down
12 changes: 12 additions & 0 deletions runtime/vm/jvminit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1651,6 +1651,18 @@ IDATA VMInitStages(J9JavaVM *vm, IDATA stage, void* reserved) {
exit(0);
}

/* -Xlp commandline options parsing */
{
IDATA xlpExactIndex, xlpSizeIndex;
xlpSizeIndex = FIND_ARG_IN_VMARGS(EXACT_MEMORY_MATCH, VMOPT_XLP, NULL);
xlpExactIndex = FIND_ARG_IN_VMARGS(EXACT_MATCH, VMOPT_XLP, NULL);

/* -Xlp and -Xlp<size> options are deprecated in JDK11+ */
if (J2SE_VERSION(vm) >= J2SE_V11 && (xlpSizeIndex != -1 || xlpExactIndex != -1)) {
j9nls_printf(PORTLIB, J9NLS_WARNING, J9NLS_VM_XLP_DEPRECATED);
}
}

#if defined(J9VM_OPT_SHARED_CLASSES)
{
IDATA argIndex3, argIndex4, argIndex5, argIndex6, argIndex7, argIndex8;
Expand Down