src/share/vm/prims/jvmtiExport.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/prims/jvmtiExport.cpp

src/share/vm/prims/jvmtiExport.cpp

Print this page

        

*** 585,594 **** --- 585,595 ---- JvmtiEnv * _curr_env; JvmtiCachedClassFileData ** _cached_class_file_ptr; JvmtiThreadState * _state; KlassHandle * _h_class_being_redefined; JvmtiClassLoadKind _load_kind; + bool _has_been_modified; public: inline JvmtiClassFileLoadHookPoster(Symbol* h_name, Handle class_loader, Handle h_protection_domain, unsigned char **data_ptr, unsigned char **end_ptr,
*** 601,610 **** --- 602,612 ---- _thread = JavaThread::current(); _curr_len = *end_ptr - *data_ptr; _curr_data = *data_ptr; _curr_env = NULL; _cached_class_file_ptr = cache_ptr; + _has_been_modified = false; _state = _thread->jvmti_thread_state(); if (_state != NULL) { _h_class_being_redefined = _state->get_class_being_redefined(); _load_kind = _state->get_class_load_kind();
*** 639,648 **** --- 641,652 ---- void post() { post_all_envs(); copy_modified_data(); } + bool has_been_modified() { return _has_been_modified; } + private: void post_all_envs() { if (_load_kind != jvmti_class_load_kind_retransform) { // for class load and redefine, // call the non-retransformable agents
*** 685,694 **** --- 689,699 ---- _curr_len, _curr_data, &new_len, &new_data); } if (new_data != NULL) { // this agent has modified class data. + _has_been_modified = true; if (caching_needed && *_cached_class_file_ptr == NULL) { // data has been changed by the new retransformable agent // and it hasn't already been cached, cache it JvmtiCachedClassFileData *p; p = (JvmtiCachedClassFileData *)os::malloc(
*** 732,756 **** }; bool JvmtiExport::_should_post_class_file_load_hook = false; // this entry is for class file load hook on class load, redefine and retransform ! void JvmtiExport::post_class_file_load_hook(Symbol* h_name, Handle class_loader, Handle h_protection_domain, unsigned char **data_ptr, unsigned char **end_ptr, JvmtiCachedClassFileData **cache_ptr) { if (JvmtiEnv::get_phase() < JVMTI_PHASE_PRIMORDIAL) { ! return; } JvmtiClassFileLoadHookPoster poster(h_name, class_loader, h_protection_domain, data_ptr, end_ptr, cache_ptr); poster.post(); } void JvmtiExport::report_unsupported(bool on) { // If any JVMTI service is turned on, we need to exit before native code // tries to access nonexistant services. --- 737,762 ---- }; bool JvmtiExport::_should_post_class_file_load_hook = false; // this entry is for class file load hook on class load, redefine and retransform ! bool JvmtiExport::post_class_file_load_hook(Symbol* h_name, Handle class_loader, Handle h_protection_domain, unsigned char **data_ptr, unsigned char **end_ptr, JvmtiCachedClassFileData **cache_ptr) { if (JvmtiEnv::get_phase() < JVMTI_PHASE_PRIMORDIAL) { ! return false; } JvmtiClassFileLoadHookPoster poster(h_name, class_loader, h_protection_domain, data_ptr, end_ptr, cache_ptr); poster.post(); + return poster.has_been_modified(); } void JvmtiExport::report_unsupported(bool on) { // If any JVMTI service is turned on, we need to exit before native code // tries to access nonexistant services.
src/share/vm/prims/jvmtiExport.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File