Skip to content

Commit

Permalink
argument
Browse files Browse the repository at this point in the history
  • Loading branch information
mmyxym committed Nov 13, 2023
1 parent dfea02d commit bd866bb
Showing 1 changed file with 34 additions and 27 deletions.
61 changes: 34 additions & 27 deletions src/hotspot/share/runtime/arguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2094,33 +2094,6 @@ bool Arguments::check_vm_args_consistency() {
}
}

if (UseCompactObjectHeaders) {
#if !defined(_LP64) || !(defined(X86) || defined(AARCH64))
jio_fprintf(defaultStream::error_stream(), "Platform do not support UseCompactObjectHeaders.\n");
status = false;
#else
if (FLAG_IS_CMDLINE(UseCompressedClassPointers) && !UseCompressedClassPointers) {
FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
}
if (UseSerialGC || UseConcMarkSweepGC || UseEpsilonGC || UseZGC) {
FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
}
#if INCLUDE_SHENANDOAHGC
if (UseShenandoahGC) {
FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
}
#endif
if (EnableJVMCI || UseAOT) {
FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
}

if (UseCompactObjectHeaders) {
FLAG_SET_DEFAULT(UseAltFastLocking, true);
FLAG_SET_DEFAULT(UseAltGCForwarding, true);
}
#endif
}

if (UseAltFastLocking) {
#if !defined(_LP64) || !(defined(X86) || defined(AARCH64))
jio_fprintf(defaultStream::error_stream(), "Platform do not support UseAltFastLocking.\n");
Expand Down Expand Up @@ -4215,6 +4188,40 @@ jint Arguments::apply_ergo() {
}
}

if (UseCompactObjectHeaders) {
#if !defined(_LP64) || !(defined(X86) || defined(AARCH64))
warning("UseCompactObjectHeaders is not supported with current platform"
"; ignoring UseCompactObjectHeaders flag.");
FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
#else
if (FLAG_IS_CMDLINE(UseCompressedClassPointers) && !UseCompressedClassPointers) {
warning("UseCompactObjectHeaders is not supported with -XX:-UseCompressedClassPointers"
"; ignoring UseCompactObjectHeaders flag.");
FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
}
if (!(UseG1GC || (UseParallelGC && UseParallelOldGC))) {
warning("UseCompactObjectHeaders is not supported with current GC setting"
"; ignoring UseCompactObjectHeaders flag.");
FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
}
if (EnableJVMCI || UseAOT) {
warning("UseCompactObjectHeaders is not supported with EnableJVMCI or UseAOT"
"; ignoring UseCompactObjectHeaders flag.");
FLAG_SET_DEFAULT(UseCompactObjectHeaders, false);
}

if (UseCompactObjectHeaders) {
FLAG_SET_DEFAULT(UseAltFastLocking, true);
FLAG_SET_DEFAULT(UseAltGCForwarding, true);

if (UseBiasedLocking) {
FLAG_SET_DEFAULT(UseBiasedLocking, false);
}
}
#endif
}


#ifdef CC_INTERP
// Clear flags not supported on zero.
FLAG_SET_DEFAULT(ProfileInterpreter, false);
Expand Down

0 comments on commit bd866bb

Please sign in to comment.