hotspot/src/share/vm/prims/jvmtiEnvBase.hpp
changeset 46961 c9094b1e5f87
parent 46773 fb17cc9a6847
equal deleted inserted replaced
46959:1863b25339a9 46961:c9094b1e5f87
    28 #include "classfile/classLoader.hpp"
    28 #include "classfile/classLoader.hpp"
    29 #include "prims/jvmtiEnvThreadState.hpp"
    29 #include "prims/jvmtiEnvThreadState.hpp"
    30 #include "prims/jvmtiEventController.hpp"
    30 #include "prims/jvmtiEventController.hpp"
    31 #include "prims/jvmtiThreadState.hpp"
    31 #include "prims/jvmtiThreadState.hpp"
    32 #include "prims/jvmtiThreadState.inline.hpp"
    32 #include "prims/jvmtiThreadState.inline.hpp"
       
    33 #include "oops/oopHandle.hpp"
    33 #include "runtime/fieldDescriptor.hpp"
    34 #include "runtime/fieldDescriptor.hpp"
    34 #include "runtime/frame.hpp"
    35 #include "runtime/frame.hpp"
    35 #include "runtime/handles.inline.hpp"
    36 #include "runtime/handles.inline.hpp"
    36 #include "runtime/thread.hpp"
    37 #include "runtime/thread.hpp"
    37 #include "runtime/vm_operations.hpp"
    38 #include "runtime/vm_operations.hpp"
   702 
   703 
   703 
   704 
   704 // Jvmti module closure to collect all modules loaded to the system.
   705 // Jvmti module closure to collect all modules loaded to the system.
   705 class JvmtiModuleClosure : public StackObj {
   706 class JvmtiModuleClosure : public StackObj {
   706 private:
   707 private:
   707   static GrowableArray<jobject> *_tbl; // Protected with Module_lock
   708   static GrowableArray<OopHandle> *_tbl; // Protected with Module_lock
   708 
   709 
   709   static void do_module(ModuleEntry* entry) {
   710   static void do_module(ModuleEntry* entry) {
   710     assert_locked_or_safepoint(Module_lock);
   711     assert_locked_or_safepoint(Module_lock);
   711     jobject module = entry->module_handle();
   712     OopHandle module = entry->module_handle();
   712     guarantee(module != NULL, "module object is NULL");
   713     guarantee(module.resolve() != NULL, "module object is NULL");
   713     _tbl->push(module);
   714     _tbl->push(module);
   714   }
   715   }
   715 
   716 
   716 public:
   717 public:
   717   jvmtiError get_all_modules(JvmtiEnv* env, jint* module_count_ptr, jobject** modules_ptr);
   718   jvmtiError get_all_modules(JvmtiEnv* env, jint* module_count_ptr, jobject** modules_ptr);