changeset 47980:1772ebf07d1f

8152470: Add COMPILER2_OR_JVMCI definition Summary: defined(COMPILER2) || INCLUDE_JVMCI changed replaced with COMPILER2_OR_JVMCI Reviewed-by: kvn
author jcm
date Mon, 06 Nov 2017 21:28:03 -0800
parents 9fe9292f5931
children df4f4688b13d
files src/hotspot/cpu/aarch64/frame_aarch64.cpp src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp src/hotspot/cpu/arm/compiledIC_arm.cpp src/hotspot/cpu/x86/frame_x86.cpp src/hotspot/cpu/x86/globals_x86.hpp src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp src/hotspot/cpu/x86/vm_version_x86.cpp src/hotspot/os_cpu/bsd_x86/thread_bsd_x86.cpp src/hotspot/os_cpu/linux_x86/thread_linux_x86.cpp src/hotspot/os_cpu/windows_x86/thread_windows_x86.cpp src/hotspot/share/code/scopeDesc.cpp src/hotspot/share/compiler/oopMap.cpp src/hotspot/share/compiler/oopMap.hpp src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp src/hotspot/share/gc/g1/g1CollectedHeap.cpp src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp src/hotspot/share/gc/g1/g1MarkSweep.cpp src/hotspot/share/gc/parallel/psMarkSweep.cpp src/hotspot/share/gc/parallel/psParallelCompact.cpp src/hotspot/share/gc/parallel/psScavenge.cpp src/hotspot/share/gc/serial/genMarkSweep.cpp src/hotspot/share/gc/shared/collectedHeap.cpp src/hotspot/share/gc/shared/genCollectedHeap.cpp src/hotspot/share/oops/method.hpp src/hotspot/share/oops/methodCounters.hpp src/hotspot/share/runtime/arguments.cpp src/hotspot/share/runtime/deoptimization.cpp src/hotspot/share/runtime/deoptimization.hpp src/hotspot/share/runtime/frame.cpp src/hotspot/share/runtime/globals.hpp src/hotspot/share/runtime/rframe.cpp src/hotspot/share/runtime/sharedRuntime.cpp src/hotspot/share/runtime/thread.cpp
diffstat 33 files changed, 88 insertions(+), 89 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/cpu/aarch64/frame_aarch64.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/cpu/aarch64/frame_aarch64.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -431,11 +431,11 @@
   // This is the sp before any possible extension (adapter/locals).
   intptr_t* unextended_sp = interpreter_frame_sender_sp();
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   if (map->update_map()) {
     update_map_with_saved_link(map, (intptr_t**) addr_at(link_offset));
   }
-#endif // COMPILER2 || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
 
   return frame(sender_sp, unextended_sp, link(), sender_pc());
 }
--- a/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -41,7 +41,7 @@
 #ifdef COMPILER1
 #include "c1/c1_Runtime1.hpp"
 #endif
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
 #include "adfiles/ad_aarch64.hpp"
 #include "opto/runtime.hpp"
 #endif
@@ -114,7 +114,7 @@
 };
 
 OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_frame_words, int* total_frame_words, bool save_vectors) {
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   if (save_vectors) {
     // Save upper half of vector registers
     int vect_words = 32 * 8 / wordSize;
@@ -2688,7 +2688,7 @@
   return 0;
 }
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
 //------------------------------generate_uncommon_trap_blob--------------------
 void SharedRuntime::generate_uncommon_trap_blob() {
   // Allocate space for the code
@@ -2894,7 +2894,7 @@
   }
 #endif
 }
-#endif // COMPILER2
+#endif // COMPILER2_OR_JVMCI
 
 
 //------------------------------generate_handler_blob------
@@ -3070,8 +3070,7 @@
   return RuntimeStub::new_runtime_stub(name, &buffer, frame_complete, frame_size_in_words, oop_maps, true);
 }
 
-
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
 // This is here instead of runtime_x86_64.cpp because it uses SimpleRuntimeFrame
 //
 //------------------------------generate_exception_blob---------------------------
@@ -3200,4 +3199,4 @@
   // Set exception blob
   _exception_blob =  ExceptionBlob::create(&buffer, oop_maps, SimpleRuntimeFrame::framesize >> 1);
 }
-#endif // COMPILER2
+#endif // COMPILER2_OR_JVMCI
--- a/src/hotspot/cpu/arm/compiledIC_arm.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/cpu/arm/compiledIC_arm.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -33,7 +33,7 @@
 #include "runtime/safepoint.hpp"
 
 // ----------------------------------------------------------------------------
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
 #define __ _masm.
 // emit call stub, compiled java to interpreter
 address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark) {
@@ -89,7 +89,7 @@
 int CompiledStaticCall::reloc_to_interp_stub() {
   return 10;  // 4 in emit_to_interp_stub + 1 in Java_Static_Call
 }
-#endif // COMPILER2 || JVMCI
+#endif // COMPILER2_OR_JVMCI
 
 // size of C2 call stub, compiled java to interpretor
 int CompiledStaticCall::to_interp_stub_size() {
--- a/src/hotspot/cpu/x86/frame_x86.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/cpu/x86/frame_x86.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -436,11 +436,11 @@
   // This is the sp before any possible extension (adapter/locals).
   intptr_t* unextended_sp = interpreter_frame_sender_sp();
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   if (map->update_map()) {
     update_map_with_saved_link(map, (intptr_t**) addr_at(link_offset));
   }
-#endif // COMPILER2 || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
 
   return frame(sender_sp, unextended_sp, link(), sender_pc());
 }
--- a/src/hotspot/cpu/x86/globals_x86.hpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/cpu/x86/globals_x86.hpp	Mon Nov 06 21:28:03 2017 -0800
@@ -46,11 +46,11 @@
 // the the vep is aligned at CodeEntryAlignment whereas c2 only aligns
 // the uep and the vep doesn't get real alignment but just slops on by
 // only assured that the entry instruction meets the 5 byte size requirement.
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
 define_pd_global(intx, CodeEntryAlignment,       32);
 #else
 define_pd_global(intx, CodeEntryAlignment,       16);
-#endif // COMPILER2
+#endif // COMPILER2_OR_JVMCI
 define_pd_global(intx, OptoLoopAlignment,        16);
 define_pd_global(intx, InlineFrequencyCount,     100);
 define_pd_global(intx, InlineSmallCode,          1000);
--- a/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -151,7 +151,7 @@
   if (UseAVX < 3) {
     num_xmm_regs = num_xmm_regs/2;
   }
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   if (save_vectors) {
     assert(UseAVX > 0, "Vectors larger than 16 byte long are supported only with AVX");
     assert(MaxVectorSize <= 64, "Only up to 64 byte long vectors are supported");
@@ -260,7 +260,7 @@
     }
   }
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   if (save_vectors) {
     off = ymm0_off;
     int delta = ymm1_off - off;
@@ -270,7 +270,7 @@
       off += delta;
     }
   }
-#endif // COMPILER2 || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
 
   // %%% These should all be a waste but we'll keep things as they were for now
   if (true) {
@@ -323,7 +323,7 @@
     __ addptr(rsp, frame::arg_reg_save_area_bytes);
   }
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   if (restore_vectors) {
     assert(UseAVX > 0, "Vectors larger than 16 byte long are supported only with AVX");
     assert(MaxVectorSize <= 64, "Only up to 64 byte long vectors are supported");
--- a/src/hotspot/cpu/x86/vm_version_x86.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/cpu/x86/vm_version_x86.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -944,7 +944,7 @@
     }
   }
 #endif
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   if (MaxVectorSize > 0) {
     if (!is_power_of_2(MaxVectorSize)) {
       warning("MaxVectorSize must be a power of 2");
@@ -996,7 +996,7 @@
     }
 #endif // COMPILER2 && ASSERT
   }
-#endif // COMPILER2 || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
 
 #ifdef COMPILER2
 #ifdef _LP64
--- a/src/hotspot/os_cpu/bsd_x86/thread_bsd_x86.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/os_cpu/bsd_x86/thread_bsd_x86.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -73,7 +73,7 @@
 
     frame ret_frame(ret_sp, ret_fp, addr.pc());
     if (!ret_frame.safe_for_sender(jt)) {
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
       // C2 and JVMCI use ebp as a general register see if NULL fp helps
       frame ret_frame2(ret_sp, NULL, addr.pc());
       if (!ret_frame2.safe_for_sender(jt)) {
@@ -84,7 +84,7 @@
 #else
       // nothing else to try if the frame isn't good
       return false;
-#endif /* COMPILER2 || INCLUDE_JVMCI */
+#endif // COMPILER2_OR_JVMCI
     }
     *fr_addr = ret_frame;
     return true;
--- a/src/hotspot/os_cpu/linux_x86/thread_linux_x86.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/os_cpu/linux_x86/thread_linux_x86.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -74,7 +74,7 @@
 
     frame ret_frame(ret_sp, ret_fp, addr.pc());
     if (!ret_frame.safe_for_sender(jt)) {
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
       // C2 and JVMCI use ebp as a general register see if NULL fp helps
       frame ret_frame2(ret_sp, NULL, addr.pc());
       if (!ret_frame2.safe_for_sender(jt)) {
@@ -85,7 +85,7 @@
 #else
       // nothing else to try if the frame isn't good
       return false;
-#endif /* COMPILER2 || INCLUDE_JVMCI */
+#endif // COMPILER2_OR_JVMCI
     }
     *fr_addr = ret_frame;
     return true;
--- a/src/hotspot/os_cpu/windows_x86/thread_windows_x86.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/os_cpu/windows_x86/thread_windows_x86.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -81,7 +81,7 @@
 
     frame ret_frame(ret_sp, ret_fp, addr.pc());
     if (!ret_frame.safe_for_sender(jt)) {
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
       // C2 and JVMCI use ebp as a general register see if NULL fp helps
       frame ret_frame2(ret_sp, NULL, addr.pc());
       if (!ret_frame2.safe_for_sender(jt)) {
@@ -92,7 +92,7 @@
 #else
       // nothing else to try if the frame isn't good
       return false;
-#endif /* COMPILER2 || INCLUDE_JVMCI */
+#endif // COMPILER2_OR_JVMCI
     }
     *fr_addr = ret_frame;
     return true;
--- a/src/hotspot/share/code/scopeDesc.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/code/scopeDesc.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -228,7 +228,7 @@
     }
   }
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   if (NOT_JVMCI(DoEscapeAnalysis &&) is_top() && _objects != NULL) {
     st->print_cr("   Objects");
     for (int i = 0; i < _objects->length(); i++) {
@@ -239,7 +239,7 @@
       st->cr();
     }
   }
-#endif // COMPILER2 || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
 }
 
 #endif
--- a/src/hotspot/share/compiler/oopMap.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/compiler/oopMap.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -268,9 +268,9 @@
 #if !defined(TIERED) && !defined(INCLUDE_JVMCI)
   COMPILER1_PRESENT(ShouldNotReachHere();)
 #endif // !defined(TIERED) && !defined(INCLUDE_JVMCI)
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   DerivedPointerTable::add(derived, base);
-#endif // COMPILER2 || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
 }
 
 
@@ -461,12 +461,12 @@
 #if !defined(TIERED) && !defined(INCLUDE_JVMCI)
   COMPILER1_PRESENT(return false);
 #endif // !TIERED
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   OopMapStream oms(this,OopMapValue::derived_oop_value);
   return oms.is_done();
 #else
   return false;
-#endif // COMPILER2 || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
 }
 
 #endif //PRODUCT
@@ -726,7 +726,7 @@
 
 //------------------------------DerivedPointerTable---------------------------
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
 
 class DerivedPointerEntry : public CHeapObj<mtCompiler> {
  private:
@@ -819,4 +819,4 @@
   _active = false;
 }
 
-#endif // COMPILER2 || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
--- a/src/hotspot/share/compiler/oopMap.hpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/compiler/oopMap.hpp	Mon Nov 06 21:28:03 2017 -0800
@@ -427,7 +427,7 @@
 // oops, it is filled in with references to all locations that contains a
 // derived oop (assumed to be very few).  When the GC is complete, the derived
 // pointers are updated based on their base pointers new value and an offset.
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
 class DerivedPointerTable : public AllStatic {
   friend class VMStructs;
  private:
@@ -463,6 +463,6 @@
     }
   }
 };
-#endif // COMPILER2 || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
 
 #endif // SHARE_VM_COMPILER_OOPMAP_HPP
--- a/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/gc/cms/concurrentMarkSweepGeneration.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -2296,7 +2296,7 @@
   // way with the marking information used by GC.
   NoRefDiscovery no_discovery(ref_processor());
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   DerivedPointerTableDeactivate dpt_deact;
 #endif
 
@@ -2869,7 +2869,7 @@
   print_eden_and_survivor_chunk_arrays();
 
   {
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
     DerivedPointerTableDeactivate dpt_deact;
 #endif
     if (CMSParallelInitialMarkEnabled) {
@@ -4171,7 +4171,7 @@
   print_eden_and_survivor_chunk_arrays();
 
   {
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
     DerivedPointerTableDeactivate dpt_deact;
 #endif
 
--- a/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/gc/g1/g1CollectedHeap.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -2597,7 +2597,7 @@
   // FIXME: what is this about?
   // I'm ignoring the "fill_newgen()" call if "alloc_event_enabled"
   // is set.
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   assert(DerivedPointerTable::is_empty(), "derived pointer present");
 #endif
   // always_do_update_barrier = true;
@@ -3010,7 +3010,7 @@
 
       _verifier->check_bitmaps("GC Start");
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
       DerivedPointerTable::clear();
 #endif
 
@@ -4439,7 +4439,7 @@
   purge_code_root_memory();
 
   redirty_logged_cards();
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   double start = os::elapsedTime();
   DerivedPointerTable::update_pointers();
   g1_policy()->phase_times()->record_derived_pointer_table_update_time((os::elapsedTime() - start) * 1000.0);
--- a/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/gc/g1/g1GCPhaseTimes.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -414,7 +414,7 @@
 
   debug_time("Redirty Cards", _recorded_redirty_logged_cards_time_ms);
   trace_phase(_gc_par_phases[RedirtyCards]);
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   debug_time("DerivedPointerTable Update", _cur_derived_pointer_table_update_time_ms);
 #endif
 
--- a/src/hotspot/share/gc/g1/g1MarkSweep.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/gc/g1/g1MarkSweep.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -62,7 +62,7 @@
   assert(SafepointSynchronize::is_at_safepoint(), "must be at a safepoint");
   HandleMark hm;  // Discard invalid handles created during gc
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   DerivedPointerTable::clear();
 #endif
 #ifdef ASSERT
@@ -96,7 +96,7 @@
   // Prepare compaction.
   mark_sweep_phase2();
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   // Don't add any more derived pointers during phase3
   DerivedPointerTable::set_active(false);
 #endif
@@ -111,7 +111,7 @@
   BiasedLocking::restore_marks();
   GenMarkSweep::deallocate_stacks();
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   // Now update the derived pointers.
   DerivedPointerTable::update_pointers();
 #endif
@@ -204,7 +204,7 @@
 
   if (VerifyDuringGC) {
     HandleMark hm;  // handle scope
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
     DerivedPointerTableDeactivate dpt_deact;
 #endif
     g1h->prepare_for_verify();
--- a/src/hotspot/share/gc/parallel/psMarkSweep.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/gc/parallel/psMarkSweep.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -192,7 +192,7 @@
 
     allocate_stacks();
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
     DerivedPointerTable::clear();
 #endif
 
@@ -203,7 +203,7 @@
 
     mark_sweep_phase2();
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
     // Don't add any more derived pointers during phase3
     assert(DerivedPointerTable::is_active(), "Sanity");
     DerivedPointerTable::set_active(false);
@@ -252,7 +252,7 @@
     CodeCache::gc_epilogue();
     JvmtiExport::gc_epilogue();
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
     DerivedPointerTable::update_pointers();
 #endif
 
--- a/src/hotspot/share/gc/parallel/psParallelCompact.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/gc/parallel/psParallelCompact.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -1032,7 +1032,7 @@
   CodeCache::gc_epilogue();
   JvmtiExport::gc_epilogue();
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   DerivedPointerTable::update_pointers();
 #endif
 
@@ -1783,7 +1783,7 @@
 
     CodeCache::gc_prologue();
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
     DerivedPointerTable::clear();
 #endif
 
@@ -1799,7 +1799,7 @@
       && GCCause::is_user_requested_gc(gc_cause);
     summary_phase(vmthread_cm, maximum_heap_compaction || max_on_system_gc);
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
     assert(DerivedPointerTable::is_active(), "Sanity");
     DerivedPointerTable::set_active(false);
 #endif
--- a/src/hotspot/share/gc/parallel/psScavenge.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/gc/parallel/psScavenge.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -331,7 +331,7 @@
 
     save_to_space_top_before_gc();
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
     DerivedPointerTable::clear();
 #endif
 
@@ -601,7 +601,7 @@
       assert(young_gen->to_space()->is_empty(), "to space should be empty now");
     }
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
     DerivedPointerTable::update_pointers();
 #endif
 
--- a/src/hotspot/share/gc/serial/genMarkSweep.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/gc/serial/genMarkSweep.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -92,7 +92,7 @@
   mark_sweep_phase2();
 
   // Don't add any more derived pointers during phase3
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   assert(DerivedPointerTable::is_active(), "Sanity");
   DerivedPointerTable::set_active(false);
 #endif
--- a/src/hotspot/share/gc/shared/collectedHeap.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/gc/shared/collectedHeap.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -241,7 +241,7 @@
 void CollectedHeap::pre_initialize() {
   // Used for ReduceInitialCardMarks (when COMPILER2 is used);
   // otherwise remains unused.
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   _defer_initial_card_mark = is_server_compilation_mode_vm() &&  ReduceInitialCardMarks && can_elide_tlab_store_barriers()
                              && (DeferInitialCardMark || card_mark_must_follow_store());
 #else
@@ -545,7 +545,7 @@
          " to threads list is doomed to failure!");
   for (JavaThread *thread = Threads::first(); thread; thread = thread->next()) {
      if (use_tlab) thread->tlab().make_parsable(retire_tlabs);
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
      // The deferred store barriers must all have been flushed to the
      // card-table (or other remembered set structure) before GC starts
      // processing the card-table (or other remembered set).
--- a/src/hotspot/share/gc/shared/genCollectedHeap.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/gc/shared/genCollectedHeap.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -1067,11 +1067,11 @@
 };
 
 void GenCollectedHeap::gc_epilogue(bool full) {
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   assert(DerivedPointerTable::is_empty(), "derived pointer present");
   size_t actual_gap = pointer_delta((HeapWord*) (max_uintx-3), *(end_addr()));
   guarantee(is_client_compilation_mode_vm() || actual_gap > (size_t)FastAllocateSizeLimit, "inline allocation wraps");
-#endif /* COMPILER2 || INCLUDE_JVMCI */
+#endif // COMPILER2_OR_JVMCI
 
   resize_all_tlabs();
 
--- a/src/hotspot/share/oops/method.hpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/oops/method.hpp	Mon Nov 06 21:28:03 2017 -0800
@@ -271,7 +271,7 @@
   int highest_osr_comp_level() const;
   void set_highest_osr_comp_level(int level);
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   // Count of times method was exited via exception while interpreting
   void interpreter_throwout_increment(TRAPS) {
     MethodCounters* mcs = get_method_counters(CHECK);
@@ -426,7 +426,7 @@
       return (mcs == NULL) ? 0 : mcs->interpreter_invocation_count();
     }
   }
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   int increment_interpreter_invocation_count(TRAPS) {
     if (TieredCompilation) ShouldNotReachHere();
     MethodCounters* mcs = get_method_counters(CHECK_0);
--- a/src/hotspot/share/oops/methodCounters.hpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/oops/methodCounters.hpp	Mon Nov 06 21:28:03 2017 -0800
@@ -40,7 +40,7 @@
 #if INCLUDE_AOT
   Method*           _method;                     // Back link to Method
 #endif
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   int               _interpreter_invocation_count; // Count of times invoked (reused as prev_event_count in tiered)
   u2                _interpreter_throwout_count; // Count of times method was exited via exception while interpreting
 #endif
@@ -130,7 +130,7 @@
   MetaspaceObj::Type type() const { return MethodCountersType; }
   void clear_counters();
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
 
   int interpreter_invocation_count() {
     return _interpreter_invocation_count;
@@ -154,7 +154,7 @@
     _interpreter_throwout_count = count;
   }
 
-#else // defined(COMPILER2) || INCLUDE_JVMCI
+#else // COMPILER2_OR_JVMCI
 
   int interpreter_invocation_count() {
     return 0;
@@ -170,7 +170,7 @@
     assert(count == 0, "count must be 0");
   }
 
-#endif // defined(COMPILER2) || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
 
 #if INCLUDE_JVMTI
   u2   number_of_breakpoints() const   { return _number_of_breakpoints; }
@@ -213,7 +213,7 @@
     return byte_offset_of(MethodCounters, _nmethod_age);
   }
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
 
   static ByteSize interpreter_invocation_counter_offset() {
     return byte_offset_of(MethodCounters, _interpreter_invocation_count);
@@ -223,14 +223,14 @@
     return offset_of(MethodCounters, _interpreter_invocation_count);
   }
 
-#else // defined(COMPILER2) || INCLUDE_JVMCI
+#else // COMPILER2_OR_JVMCI
 
   static ByteSize interpreter_invocation_counter_offset() {
     ShouldNotReachHere();
     return in_ByteSize(0);
   }
 
-#endif // defined(COMPILER2) || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
 
   static ByteSize invocation_counter_offset()    {
     return byte_offset_of(MethodCounters, _invocation_counter);
--- a/src/hotspot/share/runtime/arguments.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/runtime/arguments.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -1860,7 +1860,7 @@
 #endif
   select_gc();
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   // Shared spaces work fine with other GCs but causes bytecode rewriting
   // to be disabled, which hurts interpreter performance and decreases
   // server performance.  When -server is specified, keep the default off
--- a/src/hotspot/share/runtime/deoptimization.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/runtime/deoptimization.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -192,7 +192,7 @@
 
   bool realloc_failures = false;
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   // Reallocate the non-escaping objects and restore their fields. Then
   // relock objects if synchronization on them was eliminated.
 #ifndef INCLUDE_JVMCI
@@ -282,7 +282,7 @@
     }
   }
 #endif // INCLUDE_JVMCI
-#endif // COMPILER2 || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
 
   ScopeDesc* trap_scope = chunk->at(0)->scope();
   Handle exceptionObject;
@@ -303,7 +303,7 @@
   NoSafepointVerifier no_safepoint;
 
   vframeArray* array = create_vframeArray(thread, deoptee, &map, chunk, realloc_failures);
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   if (realloc_failures) {
     pop_frames_failed_reallocs(thread, array);
   }
@@ -792,7 +792,7 @@
 Deoptimization::DeoptAction Deoptimization::_unloaded_action
   = Deoptimization::Action_reinterpret;
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
 bool Deoptimization::realloc_objects(JavaThread* thread, frame* fr, GrowableArray<ScopeValue*>* objects, TRAPS) {
   Handle pending_exception(THREAD, thread->pending_exception());
   const char* exception_file = thread->exception_file();
@@ -1151,7 +1151,7 @@
   }
 }
 #endif
-#endif // COMPILER2 || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
 
 vframeArray* Deoptimization::create_vframeArray(JavaThread* thread, frame fr, RegisterMap *reg_map, GrowableArray<compiledVFrame*>* chunk, bool realloc_failures) {
   Events::log(thread, "DEOPT PACKING pc=" INTPTR_FORMAT " sp=" INTPTR_FORMAT, p2i(fr.pc()), p2i(fr.sp()));
@@ -1211,7 +1211,7 @@
   return array;
 }
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
 void Deoptimization::pop_frames_failed_reallocs(JavaThread* thread, vframeArray* array) {
   // Reallocation of some scalar replaced objects failed. Record
   // that we need to pop all the interpreter frames for the
@@ -1443,7 +1443,7 @@
   return mdo;
 }
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
 void Deoptimization::load_class_by_index(const constantPoolHandle& constant_pool, int index, TRAPS) {
   // in case of an unresolved klass entry, load the class.
   if (constant_pool->tag_at(index).is_unresolved_klass()) {
@@ -2350,7 +2350,7 @@
     if (xtty != NULL)  xtty->tail("statistics");
   }
 }
-#else // COMPILER2 || INCLUDE_JVMCI
+#else // COMPILER2_OR_JVMCI
 
 
 // Stubs for C1 only system.
@@ -2386,4 +2386,4 @@
   return buf;
 }
 
-#endif // COMPILER2 || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
--- a/src/hotspot/share/runtime/deoptimization.hpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/runtime/deoptimization.hpp	Mon Nov 06 21:28:03 2017 -0800
@@ -151,7 +151,7 @@
   // executing in a particular CodeBlob if UseBiasedLocking is enabled
   static void revoke_biases_of_monitors(CodeBlob* cb);
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
 JVMCI_ONLY(public:)
 
   // Support for restoring non-escaping objects
@@ -162,7 +162,7 @@
   static void relock_objects(GrowableArray<MonitorInfo*>* monitors, JavaThread* thread, bool realloc_failures);
   static void pop_frames_failed_reallocs(JavaThread* thread, vframeArray* array);
   NOT_PRODUCT(static void print_objects(GrowableArray<ScopeValue*>* objects, bool realloc_failures);)
-#endif // COMPILER2 || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
 
   public:
   static vframeArray* create_vframeArray(JavaThread* thread, frame fr, RegisterMap *reg_map, GrowableArray<compiledVFrame*>* chunk, bool realloc_failures);
--- a/src/hotspot/share/runtime/frame.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/runtime/frame.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -1148,7 +1148,7 @@
       // make sure we have the right receiver type
     }
   }
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   assert(DerivedPointerTable::is_empty(), "must be empty before verify");
 #endif
   oops_do_internal(&VerifyOopClosure::verify_oop, NULL, (RegisterMap*)map, false);
--- a/src/hotspot/share/runtime/globals.hpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/runtime/globals.hpp	Mon Nov 06 21:28:03 2017 -0800
@@ -99,11 +99,11 @@
 #define CI_COMPILER_COUNT 0
 #else
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
 #define CI_COMPILER_COUNT 2
 #else
 #define CI_COMPILER_COUNT 1
-#endif // COMPILER2 || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
 
 #endif // no compilers
 
--- a/src/hotspot/share/runtime/rframe.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/runtime/rframe.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -155,7 +155,7 @@
 
 void RFrame::print(const char* kind) {
 #ifndef PRODUCT
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   int cnt = top_method()->interpreter_invocation_count();
 #else
   int cnt = top_method()->invocation_count();
--- a/src/hotspot/share/runtime/sharedRuntime.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/runtime/sharedRuntime.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -102,13 +102,13 @@
   _resolve_static_call_blob            = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_static_call_C),        "resolve_static_call");
   _resolve_static_call_entry           = _resolve_static_call_blob->entry_point();
 
-#if defined(COMPILER2) || INCLUDE_JVMCI
+#if COMPILER2_OR_JVMCI
   // Vectors are generated only by C2 and JVMCI.
   bool support_wide = is_wide_vector(MaxVectorSize);
   if (support_wide) {
     _polling_page_vectors_safepoint_handler_blob = generate_handler_blob(CAST_FROM_FN_PTR(address, SafepointSynchronize::handle_polling_page_exception), POLL_AT_VECTOR_LOOP);
   }
-#endif // COMPILER2 || INCLUDE_JVMCI
+#endif // COMPILER2_OR_JVMCI
   _polling_page_safepoint_handler_blob = generate_handler_blob(CAST_FROM_FN_PTR(address, SafepointSynchronize::handle_polling_page_exception), POLL_AT_LOOP);
   _polling_page_return_handler_blob    = generate_handler_blob(CAST_FROM_FN_PTR(address, SafepointSynchronize::handle_polling_page_exception), POLL_AT_RETURN);
 
--- a/src/hotspot/share/runtime/thread.cpp	Mon Nov 06 20:29:49 2017 -0800
+++ b/src/hotspot/share/runtime/thread.cpp	Mon Nov 06 21:28:03 2017 -0800
@@ -3724,7 +3724,7 @@
   }
 
   // initialize compiler(s)
-#if defined(COMPILER1) || defined(COMPILER2) || INCLUDE_JVMCI
+#if defined(COMPILER1) || COMPILER2_OR_JVMCI
   CompileBroker::compilation_init(CHECK_JNI_ERR);
 #endif