src/hotspot/share/gc/shared/weakProcessorPhases.cpp
changeset 51599 3198179d97fa
parent 51546 b9f6a4427da9
child 53536 482109fae02b
equal deleted inserted replaced
51598:c88019b32bc4 51599:3198179d97fa
    57   assert(is_oop_storage(phase), "not oop storage phase %u", index(phase));
    57   assert(is_oop_storage(phase), "not oop storage phase %u", index(phase));
    58   return index(phase) - oop_storage_phase_start;
    58   return index(phase) - oop_storage_phase_start;
    59 }
    59 }
    60 
    60 
    61 bool WeakProcessorPhases::is_serial(Phase phase) {
    61 bool WeakProcessorPhases::is_serial(Phase phase) {
       
    62   // serial_phase_count is 0 if JFR and JVMTI are both not built,
       
    63   // making this check with unsigned lhs redundant
       
    64 #if INCLUDE_JVMTI || INCLUDE_JFR
    62   return (index(phase) - serial_phase_start) < serial_phase_count;
    65   return (index(phase) - serial_phase_start) < serial_phase_count;
       
    66 #else
       
    67   STATIC_ASSERT(serial_phase_count == 0);
       
    68   return false;
       
    69 #endif
    63 }
    70 }
    64 
    71 
    65 bool WeakProcessorPhases::is_oop_storage(Phase phase) {
    72 bool WeakProcessorPhases::is_oop_storage(Phase phase) {
    66   return (index(phase) - oop_storage_phase_start) < oop_storage_phase_count;
    73   return (index(phase) - oop_storage_phase_start) < oop_storage_phase_count;
    67 }
    74 }