< prev index next >

src/hotspot/share/interpreter/interpreterRuntime.cpp

Print this page




1047   return mcs;
1048 IRT_END
1049 
1050 
1051 IRT_ENTRY(void, InterpreterRuntime::at_safepoint(JavaThread* thread))
1052   // We used to need an explict preserve_arguments here for invoke bytecodes. However,
1053   // stack traversal automatically takes care of preserving arguments for invoke, so
1054   // this is no longer needed.
1055 
1056   // IRT_END does an implicit safepoint check, hence we are guaranteed to block
1057   // if this is called during a safepoint
1058 
1059   if (JvmtiExport::should_post_single_step()) {
1060     // We are called during regular safepoints and when the VM is
1061     // single stepping. If any thread is marked for single stepping,
1062     // then we may have JVMTI work to do.
1063     JvmtiExport::at_single_stepping_point(thread, method(thread), bcp(thread));
1064   }
1065 IRT_END
1066 








1067 IRT_ENTRY(void, InterpreterRuntime::post_field_access(JavaThread *thread, oopDesc* obj,
1068 ConstantPoolCacheEntry *cp_entry))
1069 
1070   // check the access_flags for the field in the klass
1071 
1072   InstanceKlass* ik = InstanceKlass::cast(cp_entry->f1_as_klass());
1073   int index = cp_entry->field_index();
1074   if ((ik->field_access_flags(index) & JVM_ACC_FIELD_ACCESS_WATCHED) == 0) return;
1075 
1076   bool is_static = (obj == NULL);
1077   HandleMark hm(thread);
1078 
1079   Handle h_obj;
1080   if (!is_static) {
1081     // non-static field accessors have an object, but we need a handle
1082     h_obj = Handle(thread, obj);
1083   }
1084   InstanceKlass* cp_entry_f1 = InstanceKlass::cast(cp_entry->f1_as_klass());
1085   jfieldID fid = jfieldIDWorkaround::to_jfieldID(cp_entry_f1, cp_entry->f2_as_index(), is_static);
1086   JvmtiExport::post_field_access(thread, method(thread), bcp(thread), cp_entry_f1, h_obj, fid);




1047   return mcs;
1048 IRT_END
1049 
1050 
1051 IRT_ENTRY(void, InterpreterRuntime::at_safepoint(JavaThread* thread))
1052   // We used to need an explict preserve_arguments here for invoke bytecodes. However,
1053   // stack traversal automatically takes care of preserving arguments for invoke, so
1054   // this is no longer needed.
1055 
1056   // IRT_END does an implicit safepoint check, hence we are guaranteed to block
1057   // if this is called during a safepoint
1058 
1059   if (JvmtiExport::should_post_single_step()) {
1060     // We are called during regular safepoints and when the VM is
1061     // single stepping. If any thread is marked for single stepping,
1062     // then we may have JVMTI work to do.
1063     JvmtiExport::at_single_stepping_point(thread, method(thread), bcp(thread));
1064   }
1065 IRT_END
1066 
1067 IRT_ENTRY(void, InterpreterRuntime::enter_continuation(JavaThread* thread, oopDesc* cont))
1068   tty->print_cr(" --- cont enter ---");
1069   Handle receiver(thread, cont);
1070   JavaValue result(T_VOID);
1071   JavaCalls::call_virtual(&result, receiver, SystemDictionary::Continuation_klass(), vmSymbols::enter_name(), vmSymbols::continuationEnter_signature(), thread);
1072   tty->print_cr(" --- cont exit ---");
1073 IRT_END
1074 
1075 IRT_ENTRY(void, InterpreterRuntime::post_field_access(JavaThread *thread, oopDesc* obj,
1076 ConstantPoolCacheEntry *cp_entry))
1077 
1078   // check the access_flags for the field in the klass
1079 
1080   InstanceKlass* ik = InstanceKlass::cast(cp_entry->f1_as_klass());
1081   int index = cp_entry->field_index();
1082   if ((ik->field_access_flags(index) & JVM_ACC_FIELD_ACCESS_WATCHED) == 0) return;
1083 
1084   bool is_static = (obj == NULL);
1085   HandleMark hm(thread);
1086 
1087   Handle h_obj;
1088   if (!is_static) {
1089     // non-static field accessors have an object, but we need a handle
1090     h_obj = Handle(thread, obj);
1091   }
1092   InstanceKlass* cp_entry_f1 = InstanceKlass::cast(cp_entry->f1_as_klass());
1093   jfieldID fid = jfieldIDWorkaround::to_jfieldID(cp_entry_f1, cp_entry->f2_as_index(), is_static);
1094   JvmtiExport::post_field_access(thread, method(thread), bcp(thread), cp_entry_f1, h_obj, fid);


< prev index next >