< prev index next >

src/hotspot/share/prims/jvmtiThreadState.hpp

Print this page




 401   static ByteSize earlyret_oop_offset()   { return byte_offset_of(JvmtiThreadState, _earlyret_oop); }
 402   static ByteSize earlyret_value_offset() { return byte_offset_of(JvmtiThreadState, _earlyret_value); }
 403 
 404   void oops_do(OopClosure* f) NOT_JVMTI_RETURN; // GC support
 405 
 406 public:
 407   void set_should_post_on_exceptions(bool val) { _thread->set_should_post_on_exceptions_flag(val ? JNI_TRUE : JNI_FALSE); }
 408 };
 409 
 410 class RedefineVerifyMark : public StackObj {
 411  private:
 412   JvmtiThreadState* _state;
 413   Klass*            _scratch_class;
 414   Handle            _scratch_mirror;
 415 
 416  public:
 417   RedefineVerifyMark(Klass* the_class, Klass* scratch_class,
 418                      JvmtiThreadState *state) : _state(state), _scratch_class(scratch_class)
 419   {
 420     _state->set_class_versions_map(the_class, scratch_class);
 421     _scratch_mirror = Handle(Thread::current(), _scratch_class->java_mirror());
 422     _scratch_class->set_java_mirror(the_class->java_mirror());


 423   }
 424 
 425   ~RedefineVerifyMark() {
 426     // Restore the scratch class's mirror, so when scratch_class is removed
 427     // the correct mirror pointing to it can be cleared.
 428     _scratch_class->set_java_mirror(_scratch_mirror());
 429     _state->clear_class_versions_map();
 430   }
 431 };
 432 
 433 #endif // SHARE_VM_PRIMS_JVMTITHREADSTATE_HPP


 401   static ByteSize earlyret_oop_offset()   { return byte_offset_of(JvmtiThreadState, _earlyret_oop); }
 402   static ByteSize earlyret_value_offset() { return byte_offset_of(JvmtiThreadState, _earlyret_value); }
 403 
 404   void oops_do(OopClosure* f) NOT_JVMTI_RETURN; // GC support
 405 
 406 public:
 407   void set_should_post_on_exceptions(bool val) { _thread->set_should_post_on_exceptions_flag(val ? JNI_TRUE : JNI_FALSE); }
 408 };
 409 
 410 class RedefineVerifyMark : public StackObj {
 411  private:
 412   JvmtiThreadState* _state;
 413   Klass*            _scratch_class;
 414   Handle            _scratch_mirror;
 415 
 416  public:
 417   RedefineVerifyMark(Klass* the_class, Klass* scratch_class,
 418                      JvmtiThreadState *state) : _state(state), _scratch_class(scratch_class)
 419   {
 420     _state->set_class_versions_map(the_class, scratch_class);
 421     Thread* thread = Thread::current();
 422     _scratch_mirror = Handle(thread, _scratch_class->java_mirror());
 423     Handle the_mirror(thread, the_class->java_mirror());
 424     _scratch_class->set_java_mirror(the_mirror);
 425   }
 426 
 427   ~RedefineVerifyMark() {
 428     // Restore the scratch class's mirror, so when scratch_class is removed
 429     // the correct mirror pointing to it can be cleared.
 430     _scratch_class->set_java_mirror(_scratch_mirror);
 431     _state->clear_class_versions_map();
 432   }
 433 };
 434 
 435 #endif // SHARE_VM_PRIMS_JVMTITHREADSTATE_HPP
< prev index next >