src/share/vm/classfile/dictionary.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File

## src/share/vm/classfile/dictionary.hpp

Print this page

      61   DictionaryEntry** bucket_addr(int i) {
      62     return (DictionaryEntry**)Hashtable<Klass*, mtClass>::bucket_addr(i);
      63   }
      64
      65   void add_entry(int index, DictionaryEntry* new_entry) {
      66     Hashtable<Klass*, mtClass>::add_entry(index, (HashtableEntry<Klass*, mtClass>*)new_entry);
      67   }
      68
      69 public:
      70   Dictionary(int table_size);
      71   Dictionary(int table_size, HashtableBucket<mtClass>* t, int number_of_entries);
      72
      73   DictionaryEntry* new_entry(unsigned int hash, Klass* klass, ClassLoaderData* loader_data);
      74
      75   DictionaryEntry* new_entry();
      76
      77   void free_entry(DictionaryEntry* entry);
      78
      79   void add_klass(Symbol* class_name, ClassLoaderData* loader_data,KlassHandle obj);
      80
      81   Klass* find_class(int index, unsigned int hash,
      82                       Symbol* name, ClassLoaderData* loader_data);
      83
      84   Klass* find_shared_class(int index, unsigned int hash, Symbol* name);
      85
      86   // Compiler support
      87   Klass* try_get_next_class();
      88
      89   // GC support
      90   void oops_do(OopClosure* f);
      91   void always_strong_oops_do(OopClosure* blk);
      92   void roots_oops_do(OopClosure* strong, OopClosure* weak);
      93
      94   void always_strong_classes_do(KlassClosure* closure);
      95
      96   void classes_do(void f(Klass*));
      97   void classes_do(void f(Klass*, TRAPS), TRAPS);
      98   void classes_do(void f(Klass*, ClassLoaderData*));
      99
     100   void methods_do(void f(Method*));
     101
     102   void unlink(BoolObjectClosure* is_alive);
     103   void remove_classes_in_error_state();
     104
     105   // Classes loaded by the bootstrap loader are always strongly reachable.
     106   // If we're not doing class unloading, all classes are strongly reachable.
     107   static bool is_strongly_reachable(ClassLoaderData* loader_data, Klass* klass) {
     108     assert (klass != NULL, "should have non-null klass");
     109     return (loader_data->is_the_null_class_loader_data() || !ClassUnloading);
     110   }
     111
     112   // Unload (that is, break root links to) all unmarked classes and loaders.
     113   void do_unloading();
     114
     115   // Protection domains
     116   Klass* find(int index, unsigned int hash, Symbol* name,
     117                 ClassLoaderData* loader_data, Handle protection_domain, TRAPS);
     118   bool is_valid_protection_domain(int index, unsigned int hash,
     119                                   Symbol* name, ClassLoaderData* loader_data,
     120                                   Handle protection_domain);
     121   void add_protection_domain(int index, unsigned int hash,
     122                              instanceKlassHandle klass, ClassLoaderData* loader_data,
     123                              Handle protection_domain, TRAPS);
     124
     125   // Sharing support
     126   void reorder_dictionary();
     127
     128   ProtectionDomainCacheEntry* cache_get(oop protection_domain);
     129
     130   void print(bool details = true);
     131   void verify();
     132 };
     133
     134 // The following classes can be in dictionary.cpp, but we need these
     135 // to be in header file so that SA's vmStructs can access them.
     136 class ProtectionDomainCacheEntry : public HashtableEntry<oop, mtClass> {
     137   friend class VMStructs;
     138  private:
     139   // Flag indicating whether this protection domain entry is strongly reachable.
     140   // Used during iterating over the system dictionary to remember oops that need
     141   // to be updated.
      61   DictionaryEntry** bucket_addr(int i) {
      62     return (DictionaryEntry**)Hashtable<Klass*, mtClass>::bucket_addr(i);
      63   }
      64
      65   void add_entry(int index, DictionaryEntry* new_entry) {
      66     Hashtable<Klass*, mtClass>::add_entry(index, (HashtableEntry<Klass*, mtClass>*)new_entry);
      67   }
      68
      69 public:
      70   Dictionary(int table_size);
      71   Dictionary(int table_size, HashtableBucket<mtClass>* t, int number_of_entries);
      72
      73   DictionaryEntry* new_entry(unsigned int hash, Klass* klass, ClassLoaderData* loader_data);
      74
      75   DictionaryEntry* new_entry();
      76
      77   void free_entry(DictionaryEntry* entry);
      78
      79   void add_klass(Symbol* class_name, ClassLoaderData* loader_data,KlassHandle obj);
      80
      81   Klass* find_class(unsigned int hash,
      82                       Symbol* name, ClassLoaderData* loader_data);
      83
      84   Klass* find_shared_class(unsigned int hash, Symbol* name);
      85
      86   // Compiler support
      87   Klass* try_get_next_class();
      88
      89   // GC support
      90   void oops_do(OopClosure* f);
      91   void always_strong_oops_do(OopClosure* blk);
      92   void roots_oops_do(OopClosure* strong, OopClosure* weak);
      93
      94   void always_strong_classes_do(KlassClosure* closure);
      95
      96   void classes_do(void f(Klass*));
      97   void classes_do(void f(Klass*, TRAPS), TRAPS);
      98   void classes_do(void f(Klass*, ClassLoaderData*));
      99
     100   void methods_do(void f(Method*));
     101
     102   void unlink(BoolObjectClosure* is_alive);
     103   void remove_classes_in_error_state();
     104
     105   // Classes loaded by the bootstrap loader are always strongly reachable.
     106   // If we're not doing class unloading, all classes are strongly reachable.
     107   static bool is_strongly_reachable(ClassLoaderData* loader_data, Klass* klass) {
     108     assert (klass != NULL, "should have non-null klass");
     109     return (loader_data->is_the_null_class_loader_data() || !ClassUnloading);
     110   }
     111
     112   // Unload (that is, break root links to) all unmarked classes and loaders.
     113   void do_unloading();
     114
     115   // Protection domains
     116   Klass* find(unsigned int hash, Symbol* name,
     117                 ClassLoaderData* loader_data, Handle protection_domain, TRAPS);
     118   bool is_valid_protection_domain(unsigned int hash,
     119                                   Symbol* name, ClassLoaderData* loader_data,
     120                                   Handle protection_domain);
     121   void add_protection_domain(unsigned int hash,
     122                              instanceKlassHandle klass, ClassLoaderData* loader_data,
     123                              Handle protection_domain, TRAPS);
     124
     125   // Sharing support
     126   void reorder_dictionary();
     127
     128   ProtectionDomainCacheEntry* cache_get(oop protection_domain);
     129
     130   void print(bool details = true);
     131   void verify();
     132 };
     133
     134 // The following classes can be in dictionary.cpp, but we need these
     135 // to be in header file so that SA's vmStructs can access them.
     136 class ProtectionDomainCacheEntry : public HashtableEntry<oop, mtClass> {
     137   friend class VMStructs;
     138  private:
     139   // Flag indicating whether this protection domain entry is strongly reachable.
     140   // Used during iterating over the system dictionary to remember oops that need
     141   // to be updated.

src/share/vm/classfile/dictionary.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File