Skip to content

Commit

Permalink
8236000: VM build without C2 fails
Browse files Browse the repository at this point in the history
C2 flags should be checked only when C2 is present.

Reviewed-by: kbarrett, thartmann
  • Loading branch information
Vladimir Kozlov committed Dec 18, 2019
1 parent ca11204 commit 4b1be3e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/shared/genCollectedHeap.cpp
Expand Up @@ -472,7 +472,7 @@ void GenCollectedHeap::collect_generation(Generation* gen, bool full, size_t siz
HandleMark hm; // Discard invalid handles created during verification
Universe::verify("Before GC");
}
COMPILER2_PRESENT(DerivedPointerTable::clear());
COMPILER2_OR_JVMCI_PRESENT(DerivedPointerTable::clear());

if (restore_marks_for_biased_locking) {
// We perform this mark word preservation work lazily
Expand Down Expand Up @@ -520,7 +520,7 @@ void GenCollectedHeap::collect_generation(Generation* gen, bool full, size_t siz
rp->verify_no_references_recorded();
}

COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
COMPILER2_OR_JVMCI_PRESENT(DerivedPointerTable::update_pointers());

gen->stat_record()->accumulated_time.stop();

Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/gc/z/zRootsIterator.cpp
Expand Up @@ -190,7 +190,7 @@ ZRootsIterator::ZRootsIterator(bool visit_jvmti_weak_export) :
assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");
ZStatTimer timer(ZSubPhasePauseRootsSetup);
Threads::change_thread_claim_token();
COMPILER2_PRESENT(DerivedPointerTable::clear());
COMPILER2_OR_JVMCI_PRESENT(DerivedPointerTable::clear());
if (ClassUnloading) {
nmethod::oops_do_marking_prologue();
} else {
Expand All @@ -207,7 +207,7 @@ ZRootsIterator::~ZRootsIterator() {
ZNMethod::oops_do_end();
}

COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
COMPILER2_OR_JVMCI_PRESENT(DerivedPointerTable::update_pointers());
Threads::assert_all_threads_claimed();
}

Expand Down
10 changes: 10 additions & 0 deletions src/hotspot/share/jvmci/jvmci_globals.cpp
Expand Up @@ -114,6 +114,16 @@ bool JVMCIGlobals::check_jvmci_flags_are_consistent() {
CHECK_NOT_SET(JVMCILibPath, EnableJVMCI)
CHECK_NOT_SET(JVMCILibDumpJNIConfig, EnableJVMCI)

#ifndef COMPILER2
JVMCI_FLAG_CHECKED(MaxVectorSize)
JVMCI_FLAG_CHECKED(ReduceInitialCardMarks)
JVMCI_FLAG_CHECKED(UseMultiplyToLenIntrinsic)
JVMCI_FLAG_CHECKED(UseSquareToLenIntrinsic)
JVMCI_FLAG_CHECKED(UseMulAddIntrinsic)
JVMCI_FLAG_CHECKED(UseMontgomeryMultiplyIntrinsic)
JVMCI_FLAG_CHECKED(UseMontgomerySquareIntrinsic)
#endif // !COMPILER2

#ifndef PRODUCT
#define JVMCI_CHECK4(type, name, value, doc) assert(name##checked, #name " flag not checked");
#define JVMCI_CHECK3(type, name, doc) assert(name##checked, #name " flag not checked");
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/runtime/deoptimization.cpp
Expand Up @@ -302,7 +302,7 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread

// Reallocate the non-escaping objects and restore their fields. Then
// relock objects if synchronization on them was eliminated.
if (jvmci_enabled || (DoEscapeAnalysis && EliminateAllocations)) {
if (jvmci_enabled COMPILER2_PRESENT( || (DoEscapeAnalysis && EliminateAllocations) )) {
realloc_failures = eliminate_allocations(thread, exec_mode, cm, deoptee, map, chunk);
}
#endif // COMPILER2_OR_JVMCI
Expand All @@ -318,7 +318,7 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread
NoSafepointVerifier no_safepoint;

#if COMPILER2_OR_JVMCI
if (jvmci_enabled || ((DoEscapeAnalysis || EliminateNestedLocks) && EliminateLocks)) {
if (jvmci_enabled COMPILER2_PRESENT( || ((DoEscapeAnalysis || EliminateNestedLocks) && EliminateLocks) )) {
eliminate_locks(thread, chunk, realloc_failures);
}
#endif // COMPILER2_OR_JVMCI
Expand Down

0 comments on commit 4b1be3e

Please sign in to comment.