84 // find_and_add returns probe pointer - old or new 85 // If no entry exists, add a placeholder entry and push SeenThread for classloadAction 86 // If entry exists, reuse entry and push SeenThread for classloadAction 87 PlaceholderEntry* find_and_add(int index, unsigned int hash, 88 Symbol* name, ClassLoaderData* loader_data, 89 classloadAction action, Symbol* supername, 90 Thread* thread); 91 92 void remove_entry(int index, unsigned int hash, 93 Symbol* name, ClassLoaderData* loader_data); 94 95 // find_and_remove first removes SeenThread for classloadAction 96 // If all queues are empty and definer is null, remove the PlacheholderEntry completely 97 void find_and_remove(int index, unsigned int hash, 98 Symbol* name, ClassLoaderData* loader_data, 99 classloadAction action, Thread* thread); 100 101 // GC support. 102 void classes_do(KlassClosure* f); 103 104 // JVMTI support 105 void entries_do(void f(Symbol*)); 106 107 #ifndef PRODUCT 108 void print(); 109 #endif 110 void verify(); 111 }; 112 113 // SeenThread objects represent list of threads that are 114 // currently performing a load action on a class. 115 // For class circularity, set before loading a superclass. 116 // For bootclasssearchpath, set before calling load_instance_class. 117 // Defining must be single threaded on a class/classloader basis 118 // For DEFINE_CLASS, the head of the queue owns the 119 // define token and the rest of the threads wait to return the 120 // result the first thread gets. 121 class SeenThread: public CHeapObj<mtInternal> { 122 private: 123 Thread *_thread; 124 SeenThread* _stnext; 125 SeenThread* _stprev; 126 public: | 84 // find_and_add returns probe pointer - old or new 85 // If no entry exists, add a placeholder entry and push SeenThread for classloadAction 86 // If entry exists, reuse entry and push SeenThread for classloadAction 87 PlaceholderEntry* find_and_add(int index, unsigned int hash, 88 Symbol* name, ClassLoaderData* loader_data, 89 classloadAction action, Symbol* supername, 90 Thread* thread); 91 92 void remove_entry(int index, unsigned int hash, 93 Symbol* name, ClassLoaderData* loader_data); 94 95 // find_and_remove first removes SeenThread for classloadAction 96 // If all queues are empty and definer is null, remove the PlacheholderEntry completely 97 void find_and_remove(int index, unsigned int hash, 98 Symbol* name, ClassLoaderData* loader_data, 99 classloadAction action, Thread* thread); 100 101 // GC support. 102 void classes_do(KlassClosure* f); 103 104 #ifndef PRODUCT 105 void print(); 106 #endif 107 void verify(); 108 }; 109 110 // SeenThread objects represent list of threads that are 111 // currently performing a load action on a class. 112 // For class circularity, set before loading a superclass. 113 // For bootclasssearchpath, set before calling load_instance_class. 114 // Defining must be single threaded on a class/classloader basis 115 // For DEFINE_CLASS, the head of the queue owns the 116 // define token and the rest of the threads wait to return the 117 // result the first thread gets. 118 class SeenThread: public CHeapObj<mtInternal> { 119 private: 120 Thread *_thread; 121 SeenThread* _stnext; 122 SeenThread* _stprev; 123 public: |