974 975 // Prevent SystemDictionary::add_to_hierarchy from running 976 // and invalidating our dependencies until we install this method. 977 // No safepoints are allowed. Otherwise, class redefinition can occur in between. 978 MutexLocker ml(Compile_lock); 979 NoSafepointVerifier nsv; 980 981 // Change in Jvmti state may invalidate compilation. 982 if (!failing() && jvmti_state_changed()) { 983 record_failure("Jvmti state change invalidated dependencies"); 984 } 985 986 // Change in DTrace flags may invalidate compilation. 987 if (!failing() && 988 ( (!dtrace_extended_probes() && ExtendedDTraceProbes) || 989 (!dtrace_method_probes() && DTraceMethodProbes) || 990 (!dtrace_alloc_probes() && DTraceAllocProbes) )) { 991 record_failure("DTrace flags change invalidated dependencies"); 992 } 993 994 if (!failing()) { 995 if (log() != NULL) { 996 // Log the dependencies which this compilation declares. 997 dependencies()->log_all_dependencies(); 998 } 999 1000 // Encode the dependencies now, so we can check them right away. 1001 dependencies()->encode_content_bytes(); 1002 1003 // Check for {class loads, evolution, breakpoints, ...} during compilation 1004 validate_compile_task_dependencies(target); 1005 } 1006 1007 methodHandle method(THREAD, target->get_Method()); 1008 1009 #if INCLUDE_RTM_OPT 1010 if (!failing() && (rtm_state != NoRTM) && 1011 (method()->method_data() != NULL) && 1012 (method()->method_data()->rtm_state() != rtm_state)) { 1013 // Preemptive decompile if rtm state was changed. | 974 975 // Prevent SystemDictionary::add_to_hierarchy from running 976 // and invalidating our dependencies until we install this method. 977 // No safepoints are allowed. Otherwise, class redefinition can occur in between. 978 MutexLocker ml(Compile_lock); 979 NoSafepointVerifier nsv; 980 981 // Change in Jvmti state may invalidate compilation. 982 if (!failing() && jvmti_state_changed()) { 983 record_failure("Jvmti state change invalidated dependencies"); 984 } 985 986 // Change in DTrace flags may invalidate compilation. 987 if (!failing() && 988 ( (!dtrace_extended_probes() && ExtendedDTraceProbes) || 989 (!dtrace_method_probes() && DTraceMethodProbes) || 990 (!dtrace_alloc_probes() && DTraceAllocProbes) )) { 991 record_failure("DTrace flags change invalidated dependencies"); 992 } 993 994 if (!failing() && target->needs_clinit_barrier() && 995 target->holder()->is_in_error_state()) { 996 record_failure("method holder is in error state"); 997 } 998 999 if (!failing()) { 1000 if (log() != NULL) { 1001 // Log the dependencies which this compilation declares. 1002 dependencies()->log_all_dependencies(); 1003 } 1004 1005 // Encode the dependencies now, so we can check them right away. 1006 dependencies()->encode_content_bytes(); 1007 1008 // Check for {class loads, evolution, breakpoints, ...} during compilation 1009 validate_compile_task_dependencies(target); 1010 } 1011 1012 methodHandle method(THREAD, target->get_Method()); 1013 1014 #if INCLUDE_RTM_OPT 1015 if (!failing() && (rtm_state != NoRTM) && 1016 (method()->method_data() != NULL) && 1017 (method()->method_data()->rtm_state() != rtm_state)) { 1018 // Preemptive decompile if rtm state was changed. |