< prev index next >

src/share/vm/prims/jvmtiThreadState.hpp

Print this page

        

*** 91,101 **** private: ExceptionState _exception_state; // Used to send class being redefined/retransformed and kind of transform // info to the class file load hook event handler. ! KlassHandle *_class_being_redefined; JvmtiClassLoadKind _class_load_kind; // This is only valid when is_interp_only_mode() returns true int _cur_stack_depth; --- 91,101 ---- private: ExceptionState _exception_state; // Used to send class being redefined/retransformed and kind of transform // info to the class file load hook event handler. ! Klass* _class_being_redefined; JvmtiClassLoadKind _class_load_kind; // This is only valid when is_interp_only_mode() returns true int _cur_stack_depth;
*** 218,238 **** // Setter and getter method is used to send redefined class info // when class file load hook event is posted. // It is set while loading redefined class and cleared before the // class file load hook event is posted. ! inline void set_class_being_redefined(KlassHandle *h_class, JvmtiClassLoadKind kind) { ! _class_being_redefined = h_class; _class_load_kind = kind; } inline void clear_class_being_redefined() { _class_being_redefined = NULL; _class_load_kind = jvmti_class_load_kind_load; } ! inline KlassHandle *get_class_being_redefined() { return _class_being_redefined; } inline JvmtiClassLoadKind get_class_load_kind() { return _class_load_kind; --- 218,238 ---- // Setter and getter method is used to send redefined class info // when class file load hook event is posted. // It is set while loading redefined class and cleared before the // class file load hook event is posted. ! inline void set_class_being_redefined(Klass* k, JvmtiClassLoadKind kind) { ! _class_being_redefined = k; _class_load_kind = kind; } inline void clear_class_being_redefined() { _class_being_redefined = NULL; _class_load_kind = jvmti_class_load_kind_load; } ! inline Klass* get_class_being_redefined() { return _class_being_redefined; } inline JvmtiClassLoadKind get_class_load_kind() { return _class_load_kind;
*** 269,284 **** // No JNI functions need to be changed, they don't reference the klass guts. // The JavaThread pointer is already available in all JVM_* functions // used by the verifier, so there is no extra performance issue with it. private: ! KlassHandle *_the_class_for_redefinition_verification; ! KlassHandle *_scratch_class_for_redefinition_verification; public: ! inline void set_class_versions_map(KlassHandle *the_class, ! KlassHandle *scratch_class) { _the_class_for_redefinition_verification = the_class; _scratch_class_for_redefinition_verification = scratch_class; } inline void clear_class_versions_map() { set_class_versions_map(NULL, NULL); } --- 269,284 ---- // No JNI functions need to be changed, they don't reference the klass guts. // The JavaThread pointer is already available in all JVM_* functions // used by the verifier, so there is no extra performance issue with it. private: ! Klass* _the_class_for_redefinition_verification; ! Klass* _scratch_class_for_redefinition_verification; public: ! inline void set_class_versions_map(Klass* the_class, ! Klass* scratch_class) { _the_class_for_redefinition_verification = the_class; _scratch_class_for_redefinition_verification = scratch_class; } inline void clear_class_versions_map() { set_class_versions_map(NULL, NULL); }
*** 286,297 **** static inline Klass* class_to_verify_considering_redefinition(Klass* klass, JavaThread *thread) { JvmtiThreadState *state = thread->jvmti_thread_state(); if (state != NULL && state->_the_class_for_redefinition_verification != NULL) { ! if ((*(state->_the_class_for_redefinition_verification))() == klass) { ! klass = (*(state->_scratch_class_for_redefinition_verification))(); } } return klass; } --- 286,297 ---- static inline Klass* class_to_verify_considering_redefinition(Klass* klass, JavaThread *thread) { JvmtiThreadState *state = thread->jvmti_thread_state(); if (state != NULL && state->_the_class_for_redefinition_verification != NULL) { ! if (state->_the_class_for_redefinition_verification == klass) { ! klass = state->_scratch_class_for_redefinition_verification; } } return klass; }
*** 407,427 **** void set_should_post_on_exceptions(bool val) { _thread->set_should_post_on_exceptions_flag(val ? JNI_TRUE : JNI_FALSE); } }; class RedefineVerifyMark : public StackObj { private: ! JvmtiThreadState *_state; ! KlassHandle _scratch_class; Handle _scratch_mirror; public: ! RedefineVerifyMark(KlassHandle *the_class, KlassHandle *scratch_class, ! JvmtiThreadState *state) : _state(state), _scratch_class(*scratch_class) { _state->set_class_versions_map(the_class, scratch_class); _scratch_mirror = Handle(Thread::current(), _scratch_class->java_mirror()); ! (*scratch_class)->set_java_mirror((*the_class)->java_mirror()); } ~RedefineVerifyMark() { // Restore the scratch class's mirror, so when scratch_class is removed // the correct mirror pointing to it can be cleared. --- 407,427 ---- void set_should_post_on_exceptions(bool val) { _thread->set_should_post_on_exceptions_flag(val ? JNI_TRUE : JNI_FALSE); } }; class RedefineVerifyMark : public StackObj { private: ! JvmtiThreadState* _state; ! Klass* _scratch_class; Handle _scratch_mirror; public: ! RedefineVerifyMark(Klass* the_class, Klass* scratch_class, ! JvmtiThreadState *state) : _state(state), _scratch_class(scratch_class) { _state->set_class_versions_map(the_class, scratch_class); _scratch_mirror = Handle(Thread::current(), _scratch_class->java_mirror()); ! _scratch_class->set_java_mirror(the_class->java_mirror()); } ~RedefineVerifyMark() { // Restore the scratch class's mirror, so when scratch_class is removed // the correct mirror pointing to it can be cleared.
< prev index next >