comparison src/share/vm/ci/ciEnv.cpp @ 17780:606acabe7b5c

8031320: Use Intel RTM instructions for locks Summary: Use RTM for inflated locks and stack locks. Reviewed-by: iveresov, twisti, roland, dcubed
author kvn
date Thu, 20 Mar 2014 17:49:27 -0700
parents 849eb7bfceac
children 18f752639eb2
comparison
equal deleted inserted replaced
17778:a48e16541e6b 17780:606acabe7b5c
924 ExceptionHandlerTable* handler_table, 924 ExceptionHandlerTable* handler_table,
925 ImplicitExceptionTable* inc_table, 925 ImplicitExceptionTable* inc_table,
926 AbstractCompiler* compiler, 926 AbstractCompiler* compiler,
927 int comp_level, 927 int comp_level,
928 bool has_unsafe_access, 928 bool has_unsafe_access,
929 bool has_wide_vectors) { 929 bool has_wide_vectors,
930 RTMState rtm_state) {
930 VM_ENTRY_MARK; 931 VM_ENTRY_MARK;
931 nmethod* nm = NULL; 932 nmethod* nm = NULL;
932 { 933 {
933 // To prevent compile queue updates. 934 // To prevent compile queue updates.
934 MutexLocker locker(MethodCompileQueue_lock, THREAD); 935 MutexLocker locker(MethodCompileQueue_lock, THREAD);
971 validate_compile_task_dependencies(target); 972 validate_compile_task_dependencies(target);
972 } 973 }
973 974
974 methodHandle method(THREAD, target->get_Method()); 975 methodHandle method(THREAD, target->get_Method());
975 976
977 #if INCLUDE_RTM_OPT
978 if (!failing() && (rtm_state != NoRTM) &&
979 (method()->method_data() != NULL) &&
980 (method()->method_data()->rtm_state() != rtm_state)) {
981 // Preemptive decompile if rtm state was changed.
982 record_failure("RTM state change invalidated rtm code");
983 }
984 #endif
985
976 if (failing()) { 986 if (failing()) {
977 // While not a true deoptimization, it is a preemptive decompile. 987 // While not a true deoptimization, it is a preemptive decompile.
978 MethodData* mdo = method()->method_data(); 988 MethodData* mdo = method()->method_data();
979 if (mdo != NULL) { 989 if (mdo != NULL) {
980 mdo->inc_decompile_count(); 990 mdo->inc_decompile_count();
997 orig_pc_offset, 1007 orig_pc_offset,
998 debug_info(), dependencies(), code_buffer, 1008 debug_info(), dependencies(), code_buffer,
999 frame_words, oop_map_set, 1009 frame_words, oop_map_set,
1000 handler_table, inc_table, 1010 handler_table, inc_table,
1001 compiler, comp_level); 1011 compiler, comp_level);
1002 1012 #if INCLUDE_RTM_OPT
1013 nm->set_rtm_state(rtm_state);
1014 #endif
1003 // Free codeBlobs 1015 // Free codeBlobs
1004 code_buffer->free_blob(); 1016 code_buffer->free_blob();
1005 1017
1006 if (nm != NULL) { 1018 if (nm != NULL) {
1007 nm->set_has_unsafe_access(has_unsafe_access); 1019 nm->set_has_unsafe_access(has_unsafe_access);