src/hotspot/share/gc/shared/weakProcessorPhases.cpp
changeset 51599 3198179d97fa
parent 51546 b9f6a4427da9
child 53536 482109fae02b
--- a/src/hotspot/share/gc/shared/weakProcessorPhases.cpp	Thu Aug 30 16:16:19 2018 -0400
+++ b/src/hotspot/share/gc/shared/weakProcessorPhases.cpp	Thu Aug 30 16:33:14 2018 -0400
@@ -59,7 +59,14 @@
 }
 
 bool WeakProcessorPhases::is_serial(Phase phase) {
+  // serial_phase_count is 0 if JFR and JVMTI are both not built,
+  // making this check with unsigned lhs redundant
+#if INCLUDE_JVMTI || INCLUDE_JFR
   return (index(phase) - serial_phase_start) < serial_phase_count;
+#else
+  STATIC_ASSERT(serial_phase_count == 0);
+  return false;
+#endif
 }
 
 bool WeakProcessorPhases::is_oop_storage(Phase phase) {